aiware-js 1.0.0-master.1437 → 1.0.0-master.1439
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.esm104.js +1 -1
- package/js-core.esm104.js.gz +0 -0
- package/js-core.esm107.js +1 -1
- package/js-core.esm107.js.gz +0 -0
- package/js-core.esm109.js +1 -1
- package/js-core.esm109.js.gz +0 -0
- package/js-core.esm11.js +1 -1
- package/js-core.esm11.js.gz +0 -0
- package/js-core.esm110.js +1 -1
- package/js-core.esm110.js.gz +0 -0
- package/js-core.esm117.js +1 -1
- package/js-core.esm117.js.gz +0 -0
- package/js-core.esm119.js +1 -1
- package/js-core.esm119.js.gz +0 -0
- package/js-core.esm121.js +1 -1
- package/js-core.esm121.js.gz +0 -0
- package/js-core.esm122.js +1 -1
- package/js-core.esm122.js.gz +0 -0
- package/js-core.esm126.js +1 -1
- package/js-core.esm126.js.gz +0 -0
- package/js-core.esm17.js +1 -1
- package/js-core.esm17.js.gz +0 -0
- package/js-core.esm26.js +1 -1
- package/js-core.esm26.js.gz +0 -0
- package/js-core.esm35.js +1 -1
- package/js-core.esm35.js.gz +0 -0
- package/js-core.esm4.js +2 -2
- package/js-core.esm4.js.gz +0 -0
- package/js-core.esm41.js +1 -1
- package/js-core.esm41.js.gz +0 -0
- package/js-core.esm49.js +1 -1
- package/js-core.esm49.js.gz +0 -0
- package/js-core.esm51.js +1 -1
- package/js-core.esm51.js.gz +0 -0
- package/js-core.esm63.js +1 -1
- package/js-core.esm63.js.gz +0 -0
- package/js-core.esm64.js +6 -6
- package/js-core.esm64.js.gz +0 -0
- package/js-core.esm65.js +1 -1
- package/js-core.esm65.js.gz +0 -0
- package/js-core.esm69.js +1 -1
- package/js-core.esm69.js.gz +0 -0
- package/js-core.esm7.js +1 -1
- package/js-core.esm7.js.gz +0 -0
- package/js-core.esm72.js +1 -1
- package/js-core.esm72.js.gz +0 -0
- package/js-core.esm76.js +1 -1
- package/js-core.esm76.js.gz +0 -0
- package/js-core.esm78.js +1 -1
- package/js-core.esm78.js.gz +0 -0
- package/js-core.esm8.js +1 -1
- package/js-core.esm8.js.gz +0 -0
- package/js-core.esm9.js +1 -1
- package/js-core.esm9.js.gz +0 -0
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.d.ts.map +1 -0
- package/src/lib/js.d.ts +1 -0
- package/src/lib/js.d.ts.map +1 -0
package/js-core.esm104.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as useSelector,aQ as selectUserCanCreatePackage,r as reactExports,j as jsxRuntimeExports,B as Box,C as CircularProgress}from"./js-core.esm4.js";import{m as makeStyles,F as FormControl,T as Typography,a9 as Information,S as Select,e as MenuItem}from"./js-core.esm7.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm105.js";import{ag as imageUpload,ao as characterCountTextField,G as debounce,S as Stack,c as TextField,T as Tooltip,I as IconButton,l as CheckCircle,ap as Error}from"./js-core.esm9.js";import{s as selectPreviewImage,a as selectPackageName,b as selectPackageDescription,c as selectDistributionType,d as selectors$4,e as selectIsEditMode,f as selectOriginalPackageName,g as actions,S as SHARED_TEXT,P as PDistributionType}from"./js-core.esm106.js";import"./js-core.esm12.js";import"./js-core.esm11.js";import"./js-core.esm13.js";import"./js-core.esm35.js";import"./js-core.esm63.js";import{u as useDispatch}from"./js-core.esm14.js";import"./js-core.esm45.js";import"./js-core.esm25.js";import"./js-core.esm30.js";import"./js-core.esm40.js";import"./js-core.esm61.js";import"./js-core.esm27.js";import"./js-core.esm28.js";import"./js-core.esm48.js";import"./js-core.esm49.js";import"./js-core.esm8.js";import"./js-core.esm26.js";import"./js-core.esm50.js";import"./js-core.esm24.js";import"./js-core.esm16.js";import"./js-core.esm65.js";import"./js-core.esm29.js";import"./js-core.esm66.js";import"./js-core.esm57.js";var ImageUpload=imageUpload.jsx.ImageUpload,CharacterCountTextField=characterCountTextField.jsx.CharacterCountTextField,useStyles=makeStyles()(function(e){return{formControlWrapper:{marginTop:15,width:"100%"}}}),menuItemValueContainerSx={width:"472px"},menuItemValueSx={fontSize:"14px",fontWeight:400,marginBottom:"5px",display:"block"},menuItemValueDescSx={fontSize:"12px",color:"#424242",marginTop:0,textTransform:"none",textWrap:"wrap",whiteSpace:"pre-line"},BasicInfoStep=function(){var e,t=useStyles().classes,s=useSelector(selectPreviewImage),i=useDispatch(),r=useSelector(selectPackageName)||"",a=useSelector(selectPackageDescription)||"",o=useSelector(selectDistributionType),n=useSelector(selectUserCanCreatePackage),c=useSelector(selectors$4.selectItems)||[],p=useSelector(selectors$4.selectReadStatus),x=useSelector(selectIsEditMode),l=useSelector(selectOriginalPackageName),m=reactExports.useCallback(debounce(function(e){i(actions.allOrgOwnedPackages.setSearchValue(e)),i(actions.allOrgOwnedPackages.resetList(
|
|
1
|
+
import{u as useSelector,aQ as selectUserCanCreatePackage,r as reactExports,j as jsxRuntimeExports,B as Box,C as CircularProgress}from"./js-core.esm4.js";import{m as makeStyles,F as FormControl,T as Typography,a9 as Information,S as Select,e as MenuItem}from"./js-core.esm7.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm105.js";import{ag as imageUpload,ao as characterCountTextField,G as debounce,S as Stack,c as TextField,T as Tooltip,I as IconButton,l as CheckCircle,ap as Error}from"./js-core.esm9.js";import{s as selectPreviewImage,a as selectPackageName,b as selectPackageDescription,c as selectDistributionType,d as selectors$4,e as selectIsEditMode,f as selectOriginalPackageName,g as actions,S as SHARED_TEXT,P as PDistributionType}from"./js-core.esm106.js";import"./js-core.esm12.js";import"./js-core.esm11.js";import"./js-core.esm13.js";import"./js-core.esm35.js";import"./js-core.esm63.js";import{u as useDispatch}from"./js-core.esm14.js";import"./js-core.esm45.js";import"./js-core.esm25.js";import"./js-core.esm30.js";import"./js-core.esm40.js";import"./js-core.esm61.js";import"./js-core.esm27.js";import"./js-core.esm28.js";import"./js-core.esm48.js";import"./js-core.esm49.js";import"./js-core.esm8.js";import"./js-core.esm26.js";import"./js-core.esm50.js";import"./js-core.esm24.js";import"./js-core.esm16.js";import"./js-core.esm65.js";import"./js-core.esm29.js";import"./js-core.esm66.js";import"./js-core.esm57.js";var ImageUpload=imageUpload.jsx.ImageUpload,CharacterCountTextField=characterCountTextField.jsx.CharacterCountTextField,useStyles=makeStyles()(function(e){return{formControlWrapper:{marginTop:15,width:"100%"}}}),menuItemValueContainerSx={width:"472px"},menuItemValueSx={fontSize:"14px",fontWeight:400,marginBottom:"5px",display:"block"},menuItemValueDescSx={fontSize:"12px",color:"#424242",marginTop:0,textTransform:"none",textWrap:"wrap",whiteSpace:"pre-line"},BasicInfoStep=function(){var e,t=useStyles().classes,s=useSelector(selectPreviewImage),i=useDispatch(),r=useSelector(selectPackageName)||"",a=useSelector(selectPackageDescription)||"",o=useSelector(selectDistributionType),n=useSelector(selectUserCanCreatePackage),c=useSelector(selectors$4.selectItems)||[],p=useSelector(selectors$4.selectReadStatus),x=useSelector(selectIsEditMode),l=useSelector(selectOriginalPackageName),m=reactExports.useCallback(debounce(function(e){i(actions.allOrgOwnedPackages.setSearchValue(e)),i(actions.allOrgOwnedPackages.resetList()),i(actions.allOrgOwnedPackages.readStart(null))},400),[]),c=void 0===c.find(function(e){return e.name===r}),u=0<r.length,p="pending"===p;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Stack,{direction:"column",alignItems:"flex-start",sx:{marginTop:"10px"},children:[jsxRuntimeExports.jsx(Box,{id:"meta-info-section",sx:{width:"100%"},children:jsxRuntimeExports.jsxs(Stack,{direction:"row",children:[jsxRuntimeExports.jsxs(Box,{id:"package-image-section",sx:{width:"180px"},children:[jsxRuntimeExports.jsx(FormControl,{className:t.formControlWrapper,error:!0,children:jsxRuntimeExports.jsx(ImageUpload,{image:s,getUrl:!0,handleChange:function(e){var t;e.unsignedUrl?(t=e.unsignedUrl,e=e.getUrl,i(actions.basicInfo.setIcon(t)),i(actions.basicInfo.setPreviewImage(e))):(i(actions.basicInfo.setIcon("")),i(actions.basicInfo.setPreviewImage("")))},testId:"rc-pm-image"})}),jsxRuntimeExports.jsxs(Box,{sx:{paddingRight:"20px"},children:[jsxRuntimeExports.jsx(Typography,{variant:"h5",sx:{fontSize:"14px",fontWeight:600,marginBottom:"5px",marginTop:"15px"},children:SHARED_TEXT.basicInfoStep.packageImageLabel}),jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{marginTop:0,fontSize:"12px",lineHeight:"16px"},children:SHARED_TEXT.basicInfoStep.packageImageLabelDesc})]})]}),jsxRuntimeExports.jsx(Box,{id:"basic-info-section",sx:{width:"100%",paddingLeft:"15px"},children:jsxRuntimeExports.jsxs(Stack,{direction:"column",justifyContent:"flex-start",children:[jsxRuntimeExports.jsx(FormControl,{className:t.formControlWrapper,error:!0,children:jsxRuntimeExports.jsx(TextField,{sx:{width:"100%"},error:!c,id:"package-manager-name",label:SHARED_TEXT.basicInfoStep.packageName,onChange:function(e){e=e.target.value;i(actions.basicInfo.setPackageName(e)),x&&e===l||m(e)},variant:"outlined",disabled:!n,InputLabelProps:0<r.length?{shrink:!0}:{},inputProps:{maxLength:100},value:r,helperText:(s=SHARED_TEXT.basicInfoStep.packageNameIsAvailable,e=jsxRuntimeExports.jsx(CheckCircle,{sx:{fontSize:"14px",color:"#40c057"}}),u||(s=SHARED_TEXT.basicInfoStep.packageNameRequired,e=void 0),c||(s=SHARED_TEXT.basicInfoStep.errorPackageName,e=jsxRuntimeExports.jsx(Error,{sx:{fontSize:"14px",color:"inherit"}})),p&&(s=SHARED_TEXT.basicInfoStep.packageNameCheck,e=jsxRuntimeExports.jsx(CircularProgress,{size:12})),jsxRuntimeExports.jsxs(Stack,{sx:{color:"inherit",gap:"3px",transform:"translateX(-12px)"},direction:"row",alignItems:"center",children:[e&&jsxRuntimeExports.jsx(Stack,{sx:{width:"15px",height:"15px",alignItems:"center",justifyContent:"center"},children:e}),jsxRuntimeExports.jsx(Typography,{sx:{height:"15px",color:"inherit"},variant:"caption",children:s})]})),required:!0,"data-test":"rc-pm-package-name"})}),jsxRuntimeExports.jsx(FormControl,{className:t.formControlWrapper,error:!0,children:jsxRuntimeExports.jsx(CharacterCountTextField,{handleChange:function(e){i(actions.basicInfo.setPackageDescription(e))},variant:"outlined",value:a,defaultValue:a,label:SHARED_TEXT.basicInfoStep.packageDescription,lines:5,maxChar:300,error:!1,shrinkAlways:!1,testId:"rc-pm-package-description",disabled:!n})})]})})]})}),jsxRuntimeExports.jsxs(Box,{id:"distribution-section",sx:{width:"100%",borderTop:"1px solid #DADFE8",marginTop:"20px",paddingTop:"15px"},children:[jsxRuntimeExports.jsxs(Stack,{direction:"row",alignItems:"center",children:[jsxRuntimeExports.jsx(Typography,{variant:"h3",sx:{fontSize:"16px",fontWeight:700,margin:0,color:function(e){return e.palette.text.primary}},children:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabel}),jsxRuntimeExports.jsx(Tooltip,{title:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabel,"data-testid":"rc-pm-distribution-info-tooltip",children:jsxRuntimeExports.jsx(IconButton,{size:"small",onClick:function(){window.open("https://docs.veritone.com/#/aiware-OS/resource-center/manage-packages?id=distribution-types-for-packages","noopener","noreferrer")},children:jsxRuntimeExports.jsx(Information,{sx:{fontSize:"18px",color:"#424242"}})})})]}),jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{fontSize:"14px",fontWeight:400,color:function(e){return e.palette.text.secondary},marginBottom:0,marginTop:"5px",width:"100%"},children:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabelDesc}),jsxRuntimeExports.jsx(FormControl,{children:jsxRuntimeExports.jsxs(Select,{disabled:!n,"data-test":"rc-pm-package-distribution-select",variant:"outlined",sx:{width:"320px",marginTop:"15px"},displayEmpty:!0,required:!0,labelId:"dropdown-label",id:"dropdown-select",inputProps:{"aria-label":"Without label"},value:o,onChange:function(e){e=e.target.value;i(actions.basicInfo.setDistributionType(e))},renderValue:function(e){return jsxRuntimeExports.jsx("span",{children:e})},children:[jsxRuntimeExports.jsx(MenuItem,{"data-test":"rc-pm-package-distribution-select-public",value:PDistributionType.Public,children:jsxRuntimeExports.jsxs(Box,{sx:menuItemValueContainerSx,children:[jsxRuntimeExports.jsx(Typography,{variant:"h3",sx:menuItemValueSx,children:SHARED_TEXT.basicInfoStep.labelDistributionPublic}),jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:menuItemValueDescSx,children:SHARED_TEXT.basicInfoStep.labelDistributionPublicDesc})]})}),jsxRuntimeExports.jsx(MenuItem,{"data-test":"rc-pm-package-distribution-select-private",value:PDistributionType.Private,children:jsxRuntimeExports.jsxs(Box,{sx:menuItemValueContainerSx,children:[jsxRuntimeExports.jsx(Typography,{variant:"h3",sx:menuItemValueSx,children:SHARED_TEXT.basicInfoStep.labelDistributionPrivate}),jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:menuItemValueDescSx,children:SHARED_TEXT.basicInfoStep.labelDistributionPrivateDesc})]})}),jsxRuntimeExports.jsx(MenuItem,{"data-test":"rc-pm-package-distribution-select-shareable",value:PDistributionType.Sharable,children:jsxRuntimeExports.jsxs(Box,{sx:menuItemValueContainerSx,children:[jsxRuntimeExports.jsx(Typography,{variant:"h3",sx:menuItemValueSx,children:SHARED_TEXT.basicInfoStep.labelDistributionShareable}),jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:menuItemValueDescSx,children:SHARED_TEXT.basicInfoStep.labelDistributionShareableDesc})]})}),jsxRuntimeExports.jsx(MenuItem,{"data-test":"rc-pm-package-distribution-select-orglocked",value:PDistributionType.OrgLocked,children:jsxRuntimeExports.jsxs(Box,{sx:menuItemValueContainerSx,children:[jsxRuntimeExports.jsx(Typography,{variant:"h3",sx:menuItemValueSx,children:SHARED_TEXT.basicInfoStep.labelDistributionOrgLocked}),jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:menuItemValueDescSx,children:SHARED_TEXT.basicInfoStep.labelDistributionOrgLockedDesc})]})}),jsxRuntimeExports.jsx(MenuItem,{"data-test":"rc-pm-package-distribution-select-instancelocked",value:PDistributionType.InstanceLocked,children:jsxRuntimeExports.jsxs(Box,{sx:menuItemValueContainerSx,children:[jsxRuntimeExports.jsx(Typography,{variant:"h3",sx:menuItemValueSx,children:SHARED_TEXT.basicInfoStep.labelDistributionInstanceLocked}),jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:menuItemValueDescSx,children:SHARED_TEXT.basicInfoStep.labelDistributionInstanceLockedDesc}),jsxRuntimeExports.jsx("br",{})]})})]})})]})]}),jsxRuntimeExports.jsx(PanelControls,{invalidFields:!1,disableNext:!u||!c||!o||!n||p,disableBack:!1,nextButtonType:ENextButtonType.NEXT})]})};export{BasicInfoStep as default};
|
package/js-core.esm104.js.gz
CHANGED
|
Binary file
|
package/js-core.esm107.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aN as injectIntl,r as reactExports,u as useSelector,j as jsxRuntimeExports,C as CircularProgress,au as betaFeaturesSelector,B as Box,ap as selectIsFullscreenEnabled,o as unmountPanel,v as mountPanel}from"./js-core.esm4.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm105.js";import{i as selectResourceStepSearchText,g as actions,S as SHARED_TEXT,j as selectActiveIndex,k as selectActiveResource,l as selectIsFiltersOpen,m as selectIsSelectedViewActive,E as EResourceDropdownID,e as selectIsEditMode,n as selectExistingPackageId,r as resourceTypes,o as getResourceTypeByDropdownIndex,q as namespace,t as selectSelectedResources,u as ESelectedResourceType,v as dataCenterFilePickerPanelID,w as getResourceNamespace,x as selectApplicationFilters,y as selectSchemaFilters,z as getTdoPickerPanelConfigs,A as EApplicationFilterType,B as EApplicationStatus,C as ESchemaFilterType,D as ESchemaStatus}from"./js-core.esm106.js";import{B as tableInfiniteScroll,G as debounce,T as Tooltip,c as TextField,p as InputAdornment,J as Search,I as IconButton,aq as Clear,S as Stack,ad as ExpandLess,ae as ExpandMore}from"./js-core.esm9.js";import{S as SimpleFilter}from"./js-core.esm12.js";import{m as makeStyles,T as Typography,S as Select,e as MenuItem,B as Button,G as Grid,M as MemoizedFormattedMessage}from"./js-core.esm7.js";import"./js-core.esm11.js";import"./js-core.esm13.js";import"./js-core.esm35.js";import"./js-core.esm63.js";import{A as Add}from"./js-core.esm37.js";import{u as useDispatch}from"./js-core.esm14.js";import"./js-core.esm45.js";import"./js-core.esm25.js";import"./js-core.esm30.js";import"./js-core.esm40.js";import"./js-core.esm61.js";import"./js-core.esm27.js";import"./js-core.esm28.js";import"./js-core.esm48.js";import"./js-core.esm49.js";import"./js-core.esm8.js";import"./js-core.esm26.js";import"./js-core.esm50.js";import"./js-core.esm24.js";import"./js-core.esm16.js";import"./js-core.esm65.js";import"./js-core.esm29.js";import"./js-core.esm66.js";import"./js-core.esm57.js";var selectActiveTDOs=function(e){return e[namespace].tdos.activeTDOs};function _define_property$1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},s=Object.keys(r);(s="function"==typeof Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):s).forEach(function(e){_define_property$1(t,e,r[e])})}return t}function ownKeys(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}var TableInfiniteScroll=tableInfiniteScroll.jsx.TableInfiniteScroll,Container=function(e){var t=e.children;return jsxRuntimeExports.jsxs(Box,{display:"flex",flexDirection:"column",flexGrow:"1",children:[jsxRuntimeExports.jsx(TableHeader,{resourceType:e.resourceType}),jsxRuntimeExports.jsx("div",{style:{flexGrow:1},children:t})]})},ResourcesTable=reactExports.forwardRef(function(e,t){function r(){return n(s.fetchMore())}var s=e.resourceType,e=e.showSelectedResources,n=useDispatch(),o=s.card,i=useSelector(s.hasMoreSelector),a=useSelector(s.offsetSelector),c=useSelector(s.itemSelector).map(function(e){return _object_spread_props(_object_spread$1({},e),{resourceType:s.resourceType})}),l=useSelector(s.loadingStatusSelector),p=useSelector(selectSelectedResources).map(function(e){return _object_spread_props(_object_spread$1({},e),{resourceType:s.resourceType})}).filter(function(e){return e.type===s.resourceType});return e?jsxRuntimeExports.jsx(Container,{resourceType:s,children:jsxRuntimeExports.jsx(TableInfiniteScroll,{offset:0,hasMore:!1,fetchMore:r,fetchOnMount:!1,items:p.map(function(e){return _object_spread_props(_object_spread$1({},e.item),{resourceType:e.resourceType})}),itemHeight:60,isLoading:!1,error:"failure"===l,TableRowComponent:o,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)}):jsxRuntimeExports.jsx(Container,{resourceType:s,children:jsxRuntimeExports.jsx(TableInfiniteScroll,{offset:a,hasMore:i,fetchMore:r,fetchOnMount:0===c.length,items:c,itemHeight:60,isLoading:"pending"===l,error:"failure"===l,TableRowComponent:o,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)})}),TableHeader=function(e){var t=e.resourceType;return jsxRuntimeExports.jsx(Grid,{container:!0,children:(()=>{switch(t.resourceType){case ESelectedResourceType.TDO:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:5,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourceTypes.tdo.fileType()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourceTypes.tdo.actions()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourceTypes.tdo.manage()})})]});case ESelectedResourceType.Engine:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:7,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.status()})})]});case ESelectedResourceType.FlowTemplate:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:7,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.author()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.date()})})]});case ESelectedResourceType.Node:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:7,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.author()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.version()})})]});case ESelectedResourceType.Application:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:7,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:4,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.status()})})]});case ESelectedResourceType.Package:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:5,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.primary()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.status()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.version()})})]});default:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:7,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.status()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.version()})})]})}})()})},ApplicationStatusFilter=function(){var t=useDispatch(),e=(null==(e=useSelector(selectApplicationFilters).find(function(e){return e.type===EApplicationFilterType.Status}))?void 0:e.values)||[],r=Object.values(EApplicationStatus).map(function(e){return{value:e,label:e}});return jsxRuntimeExports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.application-package-status-filter",filterLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-resource-center-package-manager.application-package.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),clearButtonLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-resource-center-package-manager.application-package-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"}),items:r,selectedValues:e,onChange:function(e){t(actions.applications.setFilter({type:EApplicationFilterType.Status,values:e}))},isMultiselect:!1})},FilterButtons=function(e){e=e.onClearAll;return jsxRuntimeExports.jsx(Box,{sx:{pt:"14px",display:"flex"},children:jsxRuntimeExports.jsx(Button,{"data-testid":"os-resource-center-package-manager-clear-filters-btn",color:"primary",variant:"outlined",onClick:e,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-resource-center-package-manager.engine-package.clear-all.label",defaultMessage:"Clear All",description:"Clear All label"})})})},ApplicationFilters=function(){var e=useDispatch(),t=useSelector(selectApplicationFilters);reactExports.useEffect(function(){e(actions.applications.resetList(null)),e(actions.applications.readStart(null))},[t]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ApplicationStatusFilter,{}),jsxRuntimeExports.jsx(FilterButtons,{onClearAll:function(){e(actions.applications.clearFilters(null))}})]})},SchemaPackageStatusFilter=function(){var t=useDispatch(),e=(null==(e=useSelector(selectSchemaFilters).find(function(e){return e.type===ESchemaFilterType.Status}))?void 0:e.values)||[],r=Object.values(ESchemaStatus).map(function(e){return{value:e,label:e}});return jsxRuntimeExports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.schema-status-filter",filterLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-resource-center-package-manager.schema.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),clearButtonLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-resource-center-package-manager.schema-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"}),items:r,selectedValues:e,onChange:function(e){t(actions.schemas.setFilter({type:ESchemaFilterType.Status,values:e}))},isMultiselect:!1})},SchemaFilters=function(){var e=useDispatch(),t=useSelector(selectSchemaFilters);reactExports.useEffect(function(){e(actions.schemas.resetList(null)),e(actions.schemas.readStart(null))},[t]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SchemaPackageStatusFilter,{}),jsxRuntimeExports.jsx(FilterButtons,{onClearAll:function(){e(actions.schemas.clearFilters(null))}})]})},ResourceStepFilters=function(e){var t=e.isVisible,e=e.resourceTypeSelected,e=void 0===e?ESelectedResourceType.EnginePackage:e;return void 0!==t&&t?jsxRuntimeExports.jsxs(Box,{sx:{marginLeft:"-30px",width:"calc(100% + 60px)",p:"10px 30px 10px",background:"#FAFAFA",marginBottom:"20px"},children:[e===ESelectedResourceType.Application&&jsxRuntimeExports.jsx(ApplicationFilters,{}),e===ESelectedResourceType.Schema&&jsxRuntimeExports.jsx(SchemaFilters,{})]}):null},FiltersButton=function(e){var t=e.isAvailable,r=useDispatch(),s=useSelector(selectIsFiltersOpen);return reactExports.useEffect(function(){t||r(actions.resourcesStep.setIsFiltersOpen(!1))},[t]),jsxRuntimeExports.jsx(Tooltip,{title:t?"":SHARED_TEXT.resourcesStep.search.filtersNotAvailable(),children:jsxRuntimeExports.jsx("span",{style:{display:"flex"},children:jsxRuntimeExports.jsxs(Button,{"data-testid":"rc-pm-resources-step-toggle-filters-btn",disabled:!t,variant:"text",color:"primary",onClick:function(){r(actions.resourcesStep.setIsFiltersOpen(!s))},children:[SHARED_TEXT.resourcesStep.search.showFilters(),s?jsxRuntimeExports.jsx(ExpandLess,{sx:{marginLeft:"10px"}}):jsxRuntimeExports.jsx(ExpandMore,{sx:{marginLeft:"10px"}})]})})})},SelectViewButton=function(e){var t=e.showSelected,e=e.onClick,r=useSelector(selectActiveResource),s=resourceTypes.find(function(e){return e.id===r})||resourceTypes[0];return r===EResourceDropdownID.tdos?null:jsxRuntimeExports.jsx(Button,{"data-testid":"rc-pm-resources-step-show-selected-btn",variant:"text",color:"primary",onClick:e,children:t?SHARED_TEXT.resourcesStep.showAllToggle(s.dropdownLabel):SHARED_TEXT.resourcesStep.showSelectedToggle(s.dropdownLabel)})};function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r<t;r++)s[r]=e[r];return s}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var s,n,o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(o.push(s.value),!t||o.length!==t);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}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 r;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}var useStyles=makeStyles()(function(e){return{searchInput:{width:"400px",borderRadius:"100px","&.is-visible":{width:"400px",opacity:1},"&:focus":{outline:"none",boxShadow:"0 -1px 1px rgba(255, 255, 255, 0.25), 0 1px 5px rgba(0, 0, 0, 0.15)"}},searchContainer:{display:"flex"}}}),SearchInput=injectIntl(function(e){var t=e.intl,r=e.onChange,s=e.testId,e=e.isAvailable,n=useDispatch(),o=useStyles().classes,i=_sliced_to_array(reactExports.useState(!1),2),a=i[0],c=i[1],i=useSelector(selectResourceStepSearchText),l=reactExports.useCallback(debounce(function(e){r&&(r(e),c(!1))},1e3),[r]),p=reactExports.useCallback(function(e){e=e.target.value;n(actions.resourcesStep.setSearchValue(e)),l(e),c(!0)},[l]);return jsxRuntimeExports.jsx(Tooltip,{title:e?"":"Search is not available yet for this Resource.",children:jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(TextField,{disabled:!e,"data-testid":"rc-pm-resources-step-search-input",sx:{"& fieldset":{borderRadius:"100px"},background:e?"":"#f7f7f7"},"data-test":s,onClick:function(e){return e.stopPropagation()},className:"".concat(o.searchInput),onChange:p,value:i,placeholder:t.formatMessage({id:"rc.package-manager.resources.search-placeholder",defaultMessage:"Search by name or ID",description:"Search placeholder"}),InputProps:{startAdornment:jsxRuntimeExports.jsx(InputAdornment,{position:"start",children:jsxRuntimeExports.jsx(Search,{})}),endAdornment:jsxRuntimeExports.jsxs(InputAdornment,{position:"end",children:[a&&jsxRuntimeExports.jsx(CircularProgress,{size:20,thickness:5}),!a&&i&&jsxRuntimeExports.jsx(Tooltip,{title:SHARED_TEXT.resourcesStep.search.clearSearch(),children:jsxRuntimeExports.jsx(IconButton,{onClick:function(){r(""),n(actions.resourcesStep.setSearchValue("")),c(!1)},children:jsxRuntimeExports.jsx(Clear,{})})})]})}})})})});function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},s=Object.keys(r);(s="function"==typeof Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):s).forEach(function(e){_define_property(t,e,r[e])})}return t}var ADD_FILES_BTN_ID="rc-package-manager-wizard-tdo-add-files-btn",AddFilesBtn=function(){var t=useDispatch(),r=useSelector(selectIsFullscreenEnabled),s=reactExports.useCallback(function(e){t(unmountPanel(dataCenterFilePickerPanelID)),t(actions.tdos.addTDOs(e)),e.forEach(function(e){t(actions.resourcesStep.selectResource({type:ESelectedResourceType.TDO,id:null==e?void 0:e.id,name:(null==e?void 0:e.name)||"--",version:(null==e?void 0:e.fileType)||"--",item:e}))})},[t]);return jsxRuntimeExports.jsx(Button,{id:ADD_FILES_BTN_ID,startIcon:jsxRuntimeExports.jsx(Add,{}),variant:"contained",onClick:function(){var e=getTdoPickerPanelConfigs(s,r);t(mountPanel(_object_spread({},e)))},"data-testid":ADD_FILES_BTN_ID,children:SHARED_TEXT.resourceTypes.tdo.addFilesButton()})},ResourcesStep=function(){function t(e,t){var r=!0,s=!1,n=void 0;try{for(var o,i=resourceTypes[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var a,c=o.value;e===c.id&&e!==EResourceDropdownID.tdos&&(l(null==(a=actions[getResourceNamespace(c.id)])?void 0:a.setSearchValue(t)),l(actions[getResourceNamespace(c.id)].resetList(null)),l(actions[getResourceNamespace(c.id)].readStart(null)))}}catch(e){s=!0,n=e}finally{try{r||null==i.return||i.return()}finally{if(s)throw n}}}var c=reactExports.useRef(null),l=useDispatch(),e=useSelector(selectActiveIndex),r=useSelector(selectActiveResource),s=useSelector(selectIsFiltersOpen),n=useSelector(selectIsSelectedViewActive),o=r===EResourceDropdownID.tdos,p=0!==useSelector(selectActiveTDOs).length,i=useSelector(betaFeaturesSelector),a=useSelector(selectIsEditMode),u=useSelector(selectExistingPackageId);return reactExports.useEffect(function(){t(r,"")},[r]),reactExports.useEffect(function(){u&&a&&l(actions.resourcesStep.setIsSelectedViewActive(!1))},[u,a]),jsxRuntimeExports.jsxs(Box,{display:"flex",flexDirection:"column",flexGrow:"1",children:[jsxRuntimeExports.jsx(Typography,{"data-testid":"rc-pm-resources-step-description",variant:"subtitle1",padding:function(e){return e.spacing(3,0,3,0)},children:SHARED_TEXT.resourcesStep.description}),jsxRuntimeExports.jsxs(Stack,{direction:"row",spacing:5,sx:{margin:function(e){return e.spacing(3,0,3,0)}},children:[jsxRuntimeExports.jsx(Select,{id:"resource-cetner-package-manager-resource-type","data-testid":"rc-pm-resources-step-resource-type",value:e,onChange:function(t){var e=Number(t.target.value),r=(l(actions.resourcesStep.setActiveIndex(e)),!0),t=!1,s=void 0;try{for(var n,o=resourceTypes[Symbol.iterator]();!(r=(n=o.next()).done);r=!0){var i,a=n.value;e===a.dropdownIndex&&(l(actions.resourcesStep.setActiveResource(a.id)),null!=(i=c.current)&&i.scrollTo(0),a.id===EResourceDropdownID.tdos)&&(p||setTimeout(function(){try{var e;null!=(e=document.querySelector("#".concat(ADD_FILES_BTN_ID)))&&e.click()}catch(e){}},300))}}catch(e){t=!0,s=e}finally{try{r||null==o.return||o.return()}finally{if(t)throw s}}},sx:{width:"300px"},children:resourceTypes.sort(function(e,t){return e.dropdownIndex-t.dropdownIndex}).filter(function(e){return!e.isBehindBetaFlag||i}).map(function(e,t){return jsxRuntimeExports.jsx(MenuItem,{value:t,"data-testid":"rc-pm-resource-type-option-".concat(t),children:e.dropdownLabel},"resource-center-package-manager-resource-type-".concat(t))})}),jsxRuntimeExports.jsx(SearchInput,{isAvailable:getResourceTypeByDropdownIndex(e).isSearchAvailable,onChange:function(e){t(r,e),null!=(e=c.current)&&e.scrollTo(0)},testId:"package-manager-search-resources-input"}),jsxRuntimeExports.jsx(FiltersButton,{isAvailable:getResourceTypeByDropdownIndex(e).isFilterAvailable,"data-testid":"rc-pm-resources-step-toggle-filters-btn"})]}),jsxRuntimeExports.jsx(ResourceStepFilters,{resourceTypeSelected:getResourceTypeByDropdownIndex(e).resourceType,isVisible:s}),jsxRuntimeExports.jsxs(Stack,{direction:"row",spacing:5,sx:{margin:function(e){return e.spacing(3,0,3,0)}},children:[jsxRuntimeExports.jsx(SelectViewButton,{showSelected:n,onClick:function(){var e;l(actions.resourcesStep.setIsSelectedViewActive(!n)),n||t(r,""),null!=(e=c.current)&&e.scrollTo(0)}}),o&&jsxRuntimeExports.jsx(AddFilesBtn,{})]}),jsxRuntimeExports.jsx(ResourcesTable,{resourceType:getResourceTypeByDropdownIndex(e),ref:c,showSelectedResources:n}),jsxRuntimeExports.jsx(Box,{height:"70px",children:jsxRuntimeExports.jsx(PanelControls,{invalidFields:!1,disableNext:!1,disableBack:!1,nextButtonType:ENextButtonType.NEXT})})]})};export{ResourcesStep as default};
|
|
1
|
+
import{aN as injectIntl,r as reactExports,u as useSelector,j as jsxRuntimeExports,C as CircularProgress,au as betaFeaturesSelector,B as Box,ap as selectIsFullscreenEnabled,o as unmountPanel,v as mountPanel}from"./js-core.esm4.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm105.js";import{i as selectResourceStepSearchText,g as actions,S as SHARED_TEXT,j as selectActiveIndex,k as selectActiveResource,l as selectIsFiltersOpen,m as selectIsSelectedViewActive,E as EResourceDropdownID,e as selectIsEditMode,n as selectExistingPackageId,r as resourceTypes,o as getResourceTypeByDropdownIndex,q as namespace,t as selectSelectedResources,u as ESelectedResourceType,v as dataCenterFilePickerPanelID,w as getResourceNamespace,x as selectApplicationFilters,y as selectSchemaFilters,z as getTdoPickerPanelConfigs,A as EApplicationFilterType,B as EApplicationStatus,C as ESchemaFilterType,D as ESchemaStatus}from"./js-core.esm106.js";import{B as tableInfiniteScroll,G as debounce,T as Tooltip,c as TextField,p as InputAdornment,J as Search,I as IconButton,aq as Clear,S as Stack,ad as ExpandLess,ae as ExpandMore}from"./js-core.esm9.js";import{S as SimpleFilter}from"./js-core.esm12.js";import{m as makeStyles,T as Typography,S as Select,e as MenuItem,B as Button,G as Grid,M as MemoizedFormattedMessage}from"./js-core.esm7.js";import"./js-core.esm11.js";import"./js-core.esm13.js";import"./js-core.esm35.js";import"./js-core.esm63.js";import{A as Add}from"./js-core.esm37.js";import{u as useDispatch}from"./js-core.esm14.js";import"./js-core.esm45.js";import"./js-core.esm25.js";import"./js-core.esm30.js";import"./js-core.esm40.js";import"./js-core.esm61.js";import"./js-core.esm27.js";import"./js-core.esm28.js";import"./js-core.esm48.js";import"./js-core.esm49.js";import"./js-core.esm8.js";import"./js-core.esm26.js";import"./js-core.esm50.js";import"./js-core.esm24.js";import"./js-core.esm16.js";import"./js-core.esm65.js";import"./js-core.esm29.js";import"./js-core.esm66.js";import"./js-core.esm57.js";var selectActiveTDOs=function(e){return e[namespace].tdos.activeTDOs};function _define_property$1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},s=Object.keys(r);(s="function"==typeof Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):s).forEach(function(e){_define_property$1(t,e,r[e])})}return t}function ownKeys(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}var TableInfiniteScroll=tableInfiniteScroll.jsx.TableInfiniteScroll,Container=function(e){var t=e.children;return jsxRuntimeExports.jsxs(Box,{display:"flex",flexDirection:"column",flexGrow:"1",children:[jsxRuntimeExports.jsx(TableHeader,{resourceType:e.resourceType}),jsxRuntimeExports.jsx("div",{style:{flexGrow:1},children:t})]})},ResourcesTable=reactExports.forwardRef(function(e,t){function r(){return n(s.fetchMore())}var s=e.resourceType,e=e.showSelectedResources,n=useDispatch(),o=s.card,i=useSelector(s.hasMoreSelector),a=useSelector(s.offsetSelector),c=useSelector(s.itemSelector).map(function(e){return _object_spread_props(_object_spread$1({},e),{resourceType:s.resourceType})}),l=useSelector(s.loadingStatusSelector),p=useSelector(selectSelectedResources).map(function(e){return _object_spread_props(_object_spread$1({},e),{resourceType:s.resourceType})}).filter(function(e){return e.type===s.resourceType});return e?jsxRuntimeExports.jsx(Container,{resourceType:s,children:jsxRuntimeExports.jsx(TableInfiniteScroll,{offset:0,hasMore:!1,fetchMore:r,fetchOnMount:!1,items:p.map(function(e){return _object_spread_props(_object_spread$1({},e.item),{resourceType:e.resourceType})}),itemHeight:60,isLoading:!1,error:"failure"===l,TableRowComponent:o,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)}):jsxRuntimeExports.jsx(Container,{resourceType:s,children:jsxRuntimeExports.jsx(TableInfiniteScroll,{offset:a,hasMore:i,fetchMore:r,fetchOnMount:0===c.length,items:c,itemHeight:60,isLoading:"pending"===l,error:"failure"===l,TableRowComponent:o,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)})}),TableHeader=function(e){var t=e.resourceType;return jsxRuntimeExports.jsx(Grid,{container:!0,children:(()=>{switch(t.resourceType){case ESelectedResourceType.TDO:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:5,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourceTypes.tdo.fileType()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourceTypes.tdo.actions()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourceTypes.tdo.manage()})})]});case ESelectedResourceType.Engine:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:7,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.status()})})]});case ESelectedResourceType.FlowTemplate:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:7,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.author()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.date()})})]});case ESelectedResourceType.Node:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:7,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.author()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.version()})})]});case ESelectedResourceType.Application:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:7,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:4,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.status()})})]});case ESelectedResourceType.Package:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:5,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.primary()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.status()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.version()})})]});default:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Grid,{xs:1,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption"})}),jsxRuntimeExports.jsx(Grid,{xs:7,item:!0,alignItems:"center",children:jsxRuntimeExports.jsxs(Typography,{variant:"caption",children:[t.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.status()})}),jsxRuntimeExports.jsx(Grid,{xs:2,item:!0,alignItems:"center",children:jsxRuntimeExports.jsx(Typography,{variant:"caption",children:SHARED_TEXT.resourcesStep.table.version()})})]})}})()})},ApplicationStatusFilter=function(){var t=useDispatch(),e=(null==(e=useSelector(selectApplicationFilters).find(function(e){return e.type===EApplicationFilterType.Status}))?void 0:e.values)||[],r=Object.values(EApplicationStatus).map(function(e){return{value:e,label:e}});return jsxRuntimeExports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.application-package-status-filter",filterLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-resource-center-package-manager.application-package.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),clearButtonLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-resource-center-package-manager.application-package-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"}),items:r,selectedValues:e,onChange:function(e){t(actions.applications.setFilter({type:EApplicationFilterType.Status,values:e}))},isMultiselect:!1})},FilterButtons=function(e){e=e.onClearAll;return jsxRuntimeExports.jsx(Box,{sx:{pt:"14px",display:"flex"},children:jsxRuntimeExports.jsx(Button,{"data-testid":"os-resource-center-package-manager-clear-filters-btn",color:"primary",variant:"outlined",onClick:e,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-resource-center-package-manager.engine-package.clear-all.label",defaultMessage:"Clear All",description:"Clear All label"})})})},ApplicationFilters=function(){var e=useDispatch(),t=useSelector(selectApplicationFilters);reactExports.useEffect(function(){e(actions.applications.resetList()),e(actions.applications.readStart(null))},[t]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ApplicationStatusFilter,{}),jsxRuntimeExports.jsx(FilterButtons,{onClearAll:function(){e(actions.applications.clearFilters())}})]})},SchemaPackageStatusFilter=function(){var t=useDispatch(),e=(null==(e=useSelector(selectSchemaFilters).find(function(e){return e.type===ESchemaFilterType.Status}))?void 0:e.values)||[],r=Object.values(ESchemaStatus).map(function(e){return{value:e,label:e}});return jsxRuntimeExports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.schema-status-filter",filterLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-resource-center-package-manager.schema.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),clearButtonLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-resource-center-package-manager.schema-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"}),items:r,selectedValues:e,onChange:function(e){t(actions.schemas.setFilter({type:ESchemaFilterType.Status,values:e}))},isMultiselect:!1})},SchemaFilters=function(){var e=useDispatch(),t=useSelector(selectSchemaFilters);reactExports.useEffect(function(){e(actions.schemas.resetList()),e(actions.schemas.readStart(null))},[t]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SchemaPackageStatusFilter,{}),jsxRuntimeExports.jsx(FilterButtons,{onClearAll:function(){e(actions.schemas.clearFilters())}})]})},ResourceStepFilters=function(e){var t=e.isVisible,e=e.resourceTypeSelected,e=void 0===e?ESelectedResourceType.EnginePackage:e;return void 0!==t&&t?jsxRuntimeExports.jsxs(Box,{sx:{marginLeft:"-30px",width:"calc(100% + 60px)",p:"10px 30px 10px",background:"#FAFAFA",marginBottom:"20px"},children:[e===ESelectedResourceType.Application&&jsxRuntimeExports.jsx(ApplicationFilters,{}),e===ESelectedResourceType.Schema&&jsxRuntimeExports.jsx(SchemaFilters,{})]}):null},FiltersButton=function(e){var t=e.isAvailable,r=useDispatch(),s=useSelector(selectIsFiltersOpen);return reactExports.useEffect(function(){t||r(actions.resourcesStep.setIsFiltersOpen(!1))},[t]),jsxRuntimeExports.jsx(Tooltip,{title:t?"":SHARED_TEXT.resourcesStep.search.filtersNotAvailable(),children:jsxRuntimeExports.jsx("span",{style:{display:"flex"},children:jsxRuntimeExports.jsxs(Button,{"data-testid":"rc-pm-resources-step-toggle-filters-btn",disabled:!t,variant:"text",color:"primary",onClick:function(){r(actions.resourcesStep.setIsFiltersOpen(!s))},children:[SHARED_TEXT.resourcesStep.search.showFilters(),s?jsxRuntimeExports.jsx(ExpandLess,{sx:{marginLeft:"10px"}}):jsxRuntimeExports.jsx(ExpandMore,{sx:{marginLeft:"10px"}})]})})})},SelectViewButton=function(e){var t=e.showSelected,e=e.onClick,r=useSelector(selectActiveResource),s=resourceTypes.find(function(e){return e.id===r})||resourceTypes[0];return r===EResourceDropdownID.tdos?null:jsxRuntimeExports.jsx(Button,{"data-testid":"rc-pm-resources-step-show-selected-btn",variant:"text",color:"primary",onClick:e,children:t?SHARED_TEXT.resourcesStep.showAllToggle(s.dropdownLabel):SHARED_TEXT.resourcesStep.showSelectedToggle(s.dropdownLabel)})};function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r<t;r++)s[r]=e[r];return s}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var s,n,o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(o.push(s.value),!t||o.length!==t);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}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 r;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}var useStyles=makeStyles()(function(e){return{searchInput:{width:"400px",borderRadius:"100px","&.is-visible":{width:"400px",opacity:1},"&:focus":{outline:"none",boxShadow:"0 -1px 1px rgba(255, 255, 255, 0.25), 0 1px 5px rgba(0, 0, 0, 0.15)"}},searchContainer:{display:"flex"}}}),SearchInput=injectIntl(function(e){var t=e.intl,r=e.onChange,s=e.testId,e=e.isAvailable,n=useDispatch(),o=useStyles().classes,i=_sliced_to_array(reactExports.useState(!1),2),a=i[0],c=i[1],i=useSelector(selectResourceStepSearchText),l=reactExports.useCallback(debounce(function(e){r&&(r(e),c(!1))},1e3),[r]),p=reactExports.useCallback(function(e){e=e.target.value;n(actions.resourcesStep.setSearchValue(e)),l(e),c(!0)},[l]);return jsxRuntimeExports.jsx(Tooltip,{title:e?"":"Search is not available yet for this Resource.",children:jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(TextField,{disabled:!e,"data-testid":"rc-pm-resources-step-search-input",sx:{"& fieldset":{borderRadius:"100px"},background:e?"":"#f7f7f7"},"data-test":s,onClick:function(e){return e.stopPropagation()},className:"".concat(o.searchInput),onChange:p,value:i,placeholder:t.formatMessage({id:"rc.package-manager.resources.search-placeholder",defaultMessage:"Search by name or ID",description:"Search placeholder"}),InputProps:{startAdornment:jsxRuntimeExports.jsx(InputAdornment,{position:"start",children:jsxRuntimeExports.jsx(Search,{})}),endAdornment:jsxRuntimeExports.jsxs(InputAdornment,{position:"end",children:[a&&jsxRuntimeExports.jsx(CircularProgress,{size:20,thickness:5}),!a&&i&&jsxRuntimeExports.jsx(Tooltip,{title:SHARED_TEXT.resourcesStep.search.clearSearch(),children:jsxRuntimeExports.jsx(IconButton,{onClick:function(){r(""),n(actions.resourcesStep.setSearchValue("")),c(!1)},children:jsxRuntimeExports.jsx(Clear,{})})})]})}})})})});function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},s=Object.keys(r);(s="function"==typeof Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):s).forEach(function(e){_define_property(t,e,r[e])})}return t}var ADD_FILES_BTN_ID="rc-package-manager-wizard-tdo-add-files-btn",AddFilesBtn=function(){var t=useDispatch(),r=useSelector(selectIsFullscreenEnabled),s=reactExports.useCallback(function(e){t(unmountPanel(dataCenterFilePickerPanelID)),t(actions.tdos.addTDOs(e)),e.forEach(function(e){t(actions.resourcesStep.selectResource({type:ESelectedResourceType.TDO,id:null==e?void 0:e.id,name:(null==e?void 0:e.name)||"--",version:(null==e?void 0:e.fileType)||"--",item:e}))})},[t]);return jsxRuntimeExports.jsx(Button,{id:ADD_FILES_BTN_ID,startIcon:jsxRuntimeExports.jsx(Add,{}),variant:"contained",onClick:function(){var e=getTdoPickerPanelConfigs(s,r);t(mountPanel(_object_spread({},e)))},"data-testid":ADD_FILES_BTN_ID,children:SHARED_TEXT.resourceTypes.tdo.addFilesButton()})},ResourcesStep=function(){function t(e,t){var r=!0,s=!1,n=void 0;try{for(var o,i=resourceTypes[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var a,c=o.value;e===c.id&&e!==EResourceDropdownID.tdos&&(l(null==(a=actions[getResourceNamespace(c.id)])?void 0:a.setSearchValue(t)),l(actions[getResourceNamespace(c.id)].resetList()),l(actions[getResourceNamespace(c.id)].readStart(null)))}}catch(e){s=!0,n=e}finally{try{r||null==i.return||i.return()}finally{if(s)throw n}}}var c=reactExports.useRef(null),l=useDispatch(),e=useSelector(selectActiveIndex),r=useSelector(selectActiveResource),s=useSelector(selectIsFiltersOpen),n=useSelector(selectIsSelectedViewActive),o=r===EResourceDropdownID.tdos,p=0!==useSelector(selectActiveTDOs).length,i=useSelector(betaFeaturesSelector),a=useSelector(selectIsEditMode),u=useSelector(selectExistingPackageId);return reactExports.useEffect(function(){t(r,"")},[r]),reactExports.useEffect(function(){u&&a&&l(actions.resourcesStep.setIsSelectedViewActive(!1))},[u,a]),jsxRuntimeExports.jsxs(Box,{display:"flex",flexDirection:"column",flexGrow:"1",children:[jsxRuntimeExports.jsx(Typography,{"data-testid":"rc-pm-resources-step-description",variant:"subtitle1",padding:function(e){return e.spacing(3,0,3,0)},children:SHARED_TEXT.resourcesStep.description}),jsxRuntimeExports.jsxs(Stack,{direction:"row",spacing:5,sx:{margin:function(e){return e.spacing(3,0,3,0)}},children:[jsxRuntimeExports.jsx(Select,{id:"resource-cetner-package-manager-resource-type","data-testid":"rc-pm-resources-step-resource-type",value:e,onChange:function(t){var e=Number(t.target.value),r=(l(actions.resourcesStep.setActiveIndex(e)),!0),t=!1,s=void 0;try{for(var n,o=resourceTypes[Symbol.iterator]();!(r=(n=o.next()).done);r=!0){var i,a=n.value;e===a.dropdownIndex&&(l(actions.resourcesStep.setActiveResource(a.id)),null!=(i=c.current)&&i.scrollTo(0),a.id===EResourceDropdownID.tdos)&&(p||setTimeout(function(){try{var e;null!=(e=document.querySelector("#".concat(ADD_FILES_BTN_ID)))&&e.click()}catch(e){}},300))}}catch(e){t=!0,s=e}finally{try{r||null==o.return||o.return()}finally{if(t)throw s}}},sx:{width:"300px"},children:resourceTypes.sort(function(e,t){return e.dropdownIndex-t.dropdownIndex}).filter(function(e){return!e.isBehindBetaFlag||i}).map(function(e,t){return jsxRuntimeExports.jsx(MenuItem,{value:t,"data-testid":"rc-pm-resource-type-option-".concat(t),children:e.dropdownLabel},"resource-center-package-manager-resource-type-".concat(t))})}),jsxRuntimeExports.jsx(SearchInput,{isAvailable:getResourceTypeByDropdownIndex(e).isSearchAvailable,onChange:function(e){t(r,e),null!=(e=c.current)&&e.scrollTo(0)},testId:"package-manager-search-resources-input"}),jsxRuntimeExports.jsx(FiltersButton,{isAvailable:getResourceTypeByDropdownIndex(e).isFilterAvailable,"data-testid":"rc-pm-resources-step-toggle-filters-btn"})]}),jsxRuntimeExports.jsx(ResourceStepFilters,{resourceTypeSelected:getResourceTypeByDropdownIndex(e).resourceType,isVisible:s}),jsxRuntimeExports.jsxs(Stack,{direction:"row",spacing:5,sx:{margin:function(e){return e.spacing(3,0,3,0)}},children:[jsxRuntimeExports.jsx(SelectViewButton,{showSelected:n,onClick:function(){var e;l(actions.resourcesStep.setIsSelectedViewActive(!n)),n||t(r,""),null!=(e=c.current)&&e.scrollTo(0)}}),o&&jsxRuntimeExports.jsx(AddFilesBtn,{})]}),jsxRuntimeExports.jsx(ResourcesTable,{resourceType:getResourceTypeByDropdownIndex(e),ref:c,showSelectedResources:n}),jsxRuntimeExports.jsx(Box,{height:"70px",children:jsxRuntimeExports.jsx(PanelControls,{invalidFields:!1,disableNext:!1,disableBack:!1,nextButtonType:ENextButtonType.NEXT})})]})};export{ResourcesStep as default};
|
package/js-core.esm107.js.gz
CHANGED
|
Binary file
|
package/js-core.esm109.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as jsxRuntimeExports,aN as injectIntl,ad as combineReducers,b as AIWareThemeProvider,u as useSelector,ap as selectIsFullscreenEnabled,au as betaFeaturesSelector,e as userSelector,f as switchApiSelector,r as reactExports,a6 as selectApiConfigs,aR as setIsFullscreenEnabled,aP as panelsSelector,_ as all}from"./js-core.esm4.js";import{f as createSvgIcon,m as makeStyles,D as DynamicModuleLoader,A as AIWareIntlProvider,M as MemoizedFormattedMessage,ax as Hamburger,T as Typography,ay as FullscreenExit,az as Fullscreen,H as Hide,a_ as Article,a$ as Task,b0 as OpenWindow,am as Tabs,c as classNames,an as Tab}from"./js-core.esm7.js";import{getProcessingCenterJobsModule,JobsPanel}from"./js-core.esm110.js";import{getProcessingCenterTasksModule,TasksPanel}from"./js-core.esm69.js";import{i as index}from"./js-core.esm12.js";import{T as Tooltip,I as IconButton,aa as FullscreenPortal}from"./js-core.esm9.js";import{u as useDispatch}from"./js-core.esm14.js";import"./js-core.esm13.js";import"./js-core.esm63.js";import"./js-core.esm61.js";import"./js-core.esm27.js";import"./js-core.esm28.js";import"./js-core.esm48.js";import"./js-core.esm49.js";import"./js-core.esm8.js";import"./js-core.esm26.js";import"./js-core.esm50.js";import"./js-core.esm24.js";import"./js-core.esm16.js";import"./js-core.esm65.js";import"./js-core.esm29.js";import"./js-core.esm30.js";import"./js-core.esm66.js";import"./js-core.esm57.js";import"./js-core.esm42.js";import"./js-core.esm46.js";var ProcessingCenterView,AssessmentOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}),"AssessmentOutlined"),useStyles$2=makeStyles()(function(e,t){t=t.height;return{header:{alignItems:"center",borderBottom:"0.5px solid ".concat(e.palette.divider),display:"flex",height:t,padding:e.spacing(2),position:"relative"},title:{minWidth:"126px"},marginRight:{marginRight:e.spacing(2)},navigationToggle:{marginRight:e.spacing(1)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid ".concat(e.palette.divider),height:"70%",margin:"0 ".concat(e.spacing(1))},searchContainer:{alignItems:"center",border:"1px solid transparent",borderRadius:4,display:"flex",flexGrow:1,height:44,marginLeft:"48px"}}}),Header=function(e){var t=e.intl,r=e.hidePanel,n=e.isNavExpanded,s=e.onLeftNavigationToggle,e=useStyles$2({height:e.height}).classes,a=useDispatch(),o=useSelector(selectIsFullscreenEnabled);return t.formatMessage({id:"processing-center-browse.search-input-placeholder",defaultMessage:"Search by Job ID, Task ID, TDO ID, Application or User",description:"Search bar placeholder text"}),jsxRuntimeExports.jsxs("header",{className:e.header,"data-testid":"pc-header",children:[jsxRuntimeExports.jsx(Tooltip,{title:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-processing-center-browse.navigation.menu",defaultMessage:"Toggle Navigation Menu",description:"Toggle Navigation Menu"}),children:jsxRuntimeExports.jsx(IconButton,{sx:{mr:1},onClick:s,"aria-expanded":n,"aria-labelledby":"ac-header-toggle-nav","data-test":"ac-header-toggle-nav",size:"large",children:jsxRuntimeExports.jsx(Hamburger,{})})}),jsxRuntimeExports.jsx(Typography,{variant:"h1",className:e.title,"data-test":"ac-title",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-processing-center-browse.header.title",defaultMessage:"Processing Center",description:"Panel header of the processing center"})}),jsxRuntimeExports.jsx("div",{className:e.searchContainer}),jsxRuntimeExports.jsxs("div",{className:e.headerActionContainer,children:[jsxRuntimeExports.jsx("div",{className:e.verticalDivider}),jsxRuntimeExports.jsx(Tooltip,{title:o?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-processing-center-browse.close.full.screen",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-processing-center-browse.open.full.screen",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"}),children:jsxRuntimeExports.jsx(IconButton,{onClick:function(){return a(setIsFullscreenEnabled(!o))},"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large",children:o?jsxRuntimeExports.jsx(FullscreenExit,{}):jsxRuntimeExports.jsx(Fullscreen,{})})}),jsxRuntimeExports.jsx(Tooltip,{title:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-processing-center-browse.close.panel",defaultMessage:"Close Panel",description:"Close Panel"}),children:jsxRuntimeExports.jsx(IconButton,{onClick:r,"aria-labelledby":"ac-close-panel","data-test-id":"ac-close-panel",size:"large",children:jsxRuntimeExports.jsx(Hide,{})})})]})]})},Header$1=injectIntl(Header),SLICE_NAME="processingCenterBrowse",namespace$1=((e=>{e[e.jobs=0]="jobs",e[e.tasks=1]="tasks",e[e.monitoring=2]="monitoring",e[e.analytics=3]="analytics"})(ProcessingCenterView=ProcessingCenterView||{}),"application"),_redux_applications_generateApplicationsRedux=index.applications.generateApplicationsRedux({sliceName:SLICE_NAME,namespace:namespace$1,additionalSelectors:{primaryResourceType:function(){return"applications"},applicationFilters:function(){return[]},searchValue:function(){return"analytics center"}}}),slice=_redux_applications_generateApplicationsRedux.slice,selectors=_redux_applications_generateApplicationsRedux.selectors,sagas=_redux_applications_generateApplicationsRedux.sagas,initialState$1=_redux_applications_generateApplicationsRedux.initialState;function _define_property$3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var namespace=SLICE_NAME,initialState=_define_property$3({},namespace$1,initialState$1),actions=_define_property$3({},namespace$1,slice.actions),rootReducer=combineReducers(_define_property$3({},namespace$1,slice.reducer));function _ts_generator(n,s){var a,o,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[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(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,o&&(i=2&t[0]?o.return:t[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,t[1])).done)return i;switch(o=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,o=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=s.call(n,l)}catch(e){t=[6,e],o=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function rootSaga(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,all([sagas.watchRead()])];case 1:return e.sent(),[2]}})}function _define_property$2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function getBrowsePanelModule(){return{id:SLICE_NAME,reducerMap:_define_property$2({},SLICE_NAME,rootReducer),sagas:[rootSaga],initialActions:[]}}function _define_property$1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$1(t,e,r[e])})}return t}function ownKeys(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _object_without_properties(e,t){if(null==e)return{};var r,n=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols)for(var s=Object.getOwnPropertySymbols(e),a=0;a<s.length;a++)r=s[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function _object_without_properties_loose(e,t){if(null==e)return{};for(var r,n={},s=Object.keys(e),a=0;a<s.length;a++)r=s[a],0<=t.indexOf(r)||(n[r]=e[r]);return n}var TAB_WIDTH=197,useStyles$1=makeStyles()(function(e,t,r){return{root:{display:"flex",flexGrow:1,height:t.height,position:"relative"},tabs:{borderRight:".5px solid ".concat(e.palette.divider),transition:".2s ease",width:e.spacing(14),minWidth:e.spacing(14),padding:"".concat(e.spacing(1.6)," ").concat(e.spacing(2.5)),boxSizing:"border-box"},tabsContainer:{alignItems:"center"},tabIndicator:{background:"transparent"},tabRoot:{opacity:1,borderRadius:4,fontSize:"14px",marginBottom:e.spacing(1),minHeight:e.spacing(9),minWidth:e.spacing(9),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),width:"100%","&:hover":{background:"#F2F5F9"},"&.Sdk-Mui-disabled":{cursor:"not-allowed",pointerEvents:"auto"},"&:disabled":{cursor:"not-allowed",pointerEvents:"auto"}},tabsExpanded:_define_property$1({width:TAB_WIDTH,minWidth:TAB_WIDTH,paddingRight:e.spacing(2),paddingLeft:e.spacing(2)},"& ".concat(r.tabRoot),{width:"calc(".concat(TAB_WIDTH,"px - ").concat(e.spacing(3),")"),flexDirection:"row",textTransform:"capitalize","& svg:first-of-type":{marginRight:e.spacing(2),marginBottom:"0"}}),tabExpandedWrapper:{flexDirection:"row",display:"flex",justifyContent:"flex-start","& svg:first-of-type":{marginBottom:"0 !important",marginRight:e.spacing(2)},"& svg:last-child":{marginBottom:"0 !important",marginLeft:"auto"}},tabSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg:first-of-type":{marginBottom:"0 !important",marginRight:"0",color:e.palette.primary.main}},contentPanel:{flexGrow:1},tabExpandedSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg:first-of-type":{marginBottom:"0 !important",marginRight:e.spacing(2),color:e.palette.primary.main}},tabWrapper:{flexDirection:"row",display:"flex",justifyContent:"center","& svg":{marginBottom:"0 !important",marginRight:"0"}},condensedNavIcon:{display:"flex",marginBottom:"0px !important"}}}),MainTabPanel=function(e){var t=e.currentView,r=e.setCurrentView,o=e.intl,i=e.isNavExpanded,e=e.height,n=useDispatch(),l=useStyles$1({height:e}).classes,s=useSelector(betaFeaturesSelector),e=useSelector(userSelector),a=useSelector(selectors.selectItems),c=useSelector(switchApiSelector),p=null!=(a=null==a||null==(a=a[0])?void 0:a.id)?a:void 0,e=null!=(a=null==e?void 0:e.roles)?a:[],d=[{id:ProcessingCenterView.jobs,label:o.formatMessage({id:"os-processing-center-browse.jobs.view",defaultMessage:"Jobs",description:"The label for jobs view"}),testLabel:"jobs-view",icon:jsxRuntimeExports.jsx(Article,{}),content:function(){return jsxRuntimeExports.jsx(JobsPanel,{})},disabled:!1},{id:ProcessingCenterView.tasks,label:o.formatMessage({id:"os-processing-center-browse.tasks.view",defaultMessage:"Tasks",description:"The label for tasks view"}),testLabel:"tasks-view",icon:jsxRuntimeExports.jsx(Task,{style:{transform:"translateX(4px)"}}),content:function(){return jsxRuntimeExports.jsx(TasksPanel,{})},disabled:!1},{id:ProcessingCenterView.analytics,label:o.formatMessage({id:"os-processing-center-browse.analytics.label",defaultMessage:"Analytics",description:"The label for analytics tab."}),labelTooltip:o.formatMessage({id:"os-processing-center-browse.analytics.link.tooltip",defaultMessage:"Open Analytics Center App",description:"The tooltip for analytics center external link."}),testLabel:"analytics-link",icon:jsxRuntimeExports.jsx(AssessmentOutlined,{}),iconEnd:jsxRuntimeExports.jsx(OpenWindow,{}),beta:!1,show:e.includes("ce_analytics_app")&&void 0!==p,props:{onClick:function(){return window.open("".concat(c,"/").concat(p,"?page=processingsummary"),"_blank")}},disabled:!1}].filter(function(e){return(null==e||!e.beta||s)&&(void 0===(null==e?void 0:e.show)||e.show)});return reactExports.useEffect(function(){n(actions.application.readStart(null))},[]),jsxRuntimeExports.jsx(AIWareThemeProvider,{children:jsxRuntimeExports.jsxs("div",{className:l.root,children:[jsxRuntimeExports.jsx(Tabs,{id:"processingCenterViewTabs",orientation:"vertical",value:t,onChange:function(e,t){void 0!==d[t].content&&r(t)},className:classNames(l.tabs,_define_property$1({},l.tabsExpanded,i)),classes:{flexContainer:l.tabsContainer,indicator:l.tabIndicator},"aria-label":"processing center tabs","data-test":"pc-nav-tabs-container",children:d.map(function(e){var t,r,n,s=e.props||{},a=e.disabled||!1;return reactExports.createElement(Tab,_object_spread_props(_object_spread$1(_object_spread_props(_object_spread$1({},s),{key:e.id}),a11yProps(e.id)),{wrapped:!0,label:(t=(s=e).disabled||!1,r=s.label,n=null!=(n=null==s?void 0:s.labelTooltip)?n:r,jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip,{title:t?o.formatMessage({id:"processing-center.nav-list.coming-soon-label",defaultMessage:"{label} coming soon",description:"coming soon label"},{label:r}):n,children:jsxRuntimeExports.jsx("span",{children:i?s.label:""})}),null!=s&&s.iconEnd&&i?s.iconEnd:null]})),icon:(r=(t=e).icon,n=null!=(n=null==t?void 0:t.labelTooltip)?n:t.label,i?r:jsxRuntimeExports.jsx(Tooltip,{title:t.disabled||!1?o.formatMessage({id:"processing-center.nav-list.coming-soon-label",defaultMessage:"{label} coming soon",description:"coming soon label"},{label:t.label}):n,children:jsxRuntimeExports.jsx("span",{className:l.condensedNavIcon,children:r})})),classes:{root:l.tabRoot,wrapped:i?l.tabExpandedWrapper:l.tabWrapper,selected:i?l.tabExpandedSelected:l.tabSelected},disabled:a,"data-test":"pc-nav-tab-".concat(e.testLabel)}))})}),d.map(function(e){return void 0===(null==e?void 0:e.content)?null:jsxRuntimeExports.jsx(TabPanel,{value:t,index:e.id,className:l.contentPanel,"data-test":"pc-tab-".concat(e.testLabel),children:e.content()},e.id)})]})})};function TabPanel(e){var t=e.children,r=e.value,n=e.index,e=_object_without_properties(e,["children","value","index"]);return jsxRuntimeExports.jsx("div",_object_spread_props(_object_spread$1({role:"tabpanel",hidden:r!==n,id:"processing-center-tabpanel-".concat(n),"aria-labelledby":"processing-center-tab-".concat(n)},e),{children:r===n&&t}))}function a11yProps(e){return{id:"admin-center-tab-".concat(e),"aria-controls":"admin-center-tabpanel-".concat(e)}}var MainTabPanel$1=injectIntl(MainTabPanel),Container=function(e){var t=e.classes,r=e.dimmed,e=e.children;return useSelector(selectIsFullscreenEnabled)?jsxRuntimeExports.jsx(FullscreenPortal,{dataTest:"ac-widget",dimmed:!!r,panelId:"PROCESSING_CENTER",children:e}):jsxRuntimeExports.jsx("div",{role:"presentation","data-test":"ac-widget",className:classNames(t.root,t.panel),children:e})};function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,a=[],o=!0,i=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){i=!0,s=e}finally{try{o||null==r.return||r.return()}finally{if(i)throw s}}return a}}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 r;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}var appBarHeight=55,headerHeight=64,borderBottom=5,useStyles=makeStyles()(function(e){return{root:{width:"100%",position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%"}}}),MainLayout=function(e){var e=e.hidePanel,t=_sliced_to_array(reactExports.useState(!0),2),r=t[0],n=t[1],t=useSelector(selectIsFullscreenEnabled),s=useStyles().classes,a=useSelector(panelsSelector)||[],o=_sliced_to_array(reactExports.useState(ProcessingCenterView.jobs),2),i=o[0],o=o[1],a=a.find(function(e){return"PROCESSING_CENTER"===e.panelId})||{panelConfig:{dimmed:0}},a=0<(null===a||null==(a=a.panelConfig)?void 0:a.dimmed),t="calc(100vh - ".concat(t?25:appBarHeight+borderBottom,"px - ").concat(headerHeight,"px)");return jsxRuntimeExports.jsxs(Container,{dimmed:a,classes:s,children:[jsxRuntimeExports.jsx(Header$1,{height:headerHeight,hidePanel:e,isNavExpanded:r,onLeftNavigationToggle:function(){n(!r)}}),jsxRuntimeExports.jsx(MainTabPanel$1,{currentView:i,setCurrentView:o,height:t,isNavExpanded:r})]})};function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property(t,e,r[e])})}return t}var Content=function(e){var t=useSelector(selectApiConfigs);return t.apiRoot&&t.graphQLEndpoint&&t.token?jsxRuntimeExports.jsx(MainLayout,_object_spread({},e)):null},ProcessingCenterBrowse=function(e){return jsxRuntimeExports.jsx(AIWareThemeProvider,{children:jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getBrowsePanelModule(),getProcessingCenterJobsModule(),getProcessingCenterTasksModule()],children:jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsx(Content,_object_spread({},e))})})})};export{ProcessingCenterBrowse,actions,selectors as applicationSelectors,getBrowsePanelModule,initialState,namespace,rootReducer};
|
|
1
|
+
import{j as jsxRuntimeExports,aN as injectIntl,ad as combineReducers,b as AIWareThemeProvider,u as useSelector,ap as selectIsFullscreenEnabled,au as betaFeaturesSelector,e as userSelector,f as switchApiSelector,r as reactExports,a6 as selectApiConfigs,aR as setIsFullscreenEnabled,aP as panelsSelector,_ as all}from"./js-core.esm4.js";import{f as createSvgIcon,m as makeStyles,D as DynamicModuleLoader,A as AIWareIntlProvider,M as MemoizedFormattedMessage,ax as Hamburger,T as Typography,ay as FullscreenExit,az as Fullscreen,H as Hide,a_ as Article,a$ as Task,b0 as OpenWindow,am as Tabs,c as classNames,an as Tab}from"./js-core.esm7.js";import{getProcessingCenterJobsModule,JobsPanel}from"./js-core.esm110.js";import{getProcessingCenterTasksModule,TasksPanel}from"./js-core.esm69.js";import{i as index}from"./js-core.esm12.js";import{T as Tooltip,I as IconButton,aa as FullscreenPortal}from"./js-core.esm9.js";import{u as useDispatch}from"./js-core.esm14.js";import"./js-core.esm13.js";import"./js-core.esm63.js";import"./js-core.esm61.js";import"./js-core.esm27.js";import"./js-core.esm28.js";import"./js-core.esm48.js";import"./js-core.esm49.js";import"./js-core.esm8.js";import"./js-core.esm26.js";import"./js-core.esm50.js";import"./js-core.esm24.js";import"./js-core.esm16.js";import"./js-core.esm65.js";import"./js-core.esm29.js";import"./js-core.esm30.js";import"./js-core.esm66.js";import"./js-core.esm57.js";import"./js-core.esm42.js";import"./js-core.esm46.js";var ProcessingCenterView,AssessmentOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}),"AssessmentOutlined"),useStyles$2=makeStyles()(function(e,t){t=t.height;return{header:{alignItems:"center",borderBottom:"0.5px solid ".concat(e.palette.divider),display:"flex",height:t,padding:e.spacing(2),position:"relative"},title:{minWidth:"126px"},marginRight:{marginRight:e.spacing(2)},navigationToggle:{marginRight:e.spacing(1)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid ".concat(e.palette.divider),height:"70%",margin:"0 ".concat(e.spacing(1))},searchContainer:{alignItems:"center",border:"1px solid transparent",borderRadius:4,display:"flex",flexGrow:1,height:44,marginLeft:"48px"}}}),Header=function(e){var t=e.intl,r=e.hidePanel,n=e.isNavExpanded,s=e.onLeftNavigationToggle,e=useStyles$2({height:e.height}).classes,a=useDispatch(),o=useSelector(selectIsFullscreenEnabled);return t.formatMessage({id:"processing-center-browse.search-input-placeholder",defaultMessage:"Search by Job ID, Task ID, TDO ID, Application or User",description:"Search bar placeholder text"}),jsxRuntimeExports.jsxs("header",{className:e.header,"data-testid":"pc-header",children:[jsxRuntimeExports.jsx(Tooltip,{title:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-processing-center-browse.navigation.menu",defaultMessage:"Toggle Navigation Menu",description:"Toggle Navigation Menu"}),children:jsxRuntimeExports.jsx(IconButton,{sx:{mr:1},onClick:s,"aria-expanded":n,"aria-labelledby":"ac-header-toggle-nav","data-test":"ac-header-toggle-nav",size:"large",children:jsxRuntimeExports.jsx(Hamburger,{})})}),jsxRuntimeExports.jsx(Typography,{variant:"h1",className:e.title,"data-test":"ac-title",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-processing-center-browse.header.title",defaultMessage:"Processing Center",description:"Panel header of the processing center"})}),jsxRuntimeExports.jsx("div",{className:e.searchContainer}),jsxRuntimeExports.jsxs("div",{className:e.headerActionContainer,children:[jsxRuntimeExports.jsx("div",{className:e.verticalDivider}),jsxRuntimeExports.jsx(Tooltip,{title:o?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-processing-center-browse.close.full.screen",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-processing-center-browse.open.full.screen",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"}),children:jsxRuntimeExports.jsx(IconButton,{onClick:function(){return a(setIsFullscreenEnabled(!o))},"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large",children:o?jsxRuntimeExports.jsx(FullscreenExit,{}):jsxRuntimeExports.jsx(Fullscreen,{})})}),jsxRuntimeExports.jsx(Tooltip,{title:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-processing-center-browse.close.panel",defaultMessage:"Close Panel",description:"Close Panel"}),children:jsxRuntimeExports.jsx(IconButton,{onClick:r,"aria-labelledby":"ac-close-panel","data-test-id":"ac-close-panel",size:"large",children:jsxRuntimeExports.jsx(Hide,{})})})]})]})},Header$1=injectIntl(Header),SLICE_NAME="processingCenterBrowse",namespace$1=((e=>{e[e.jobs=0]="jobs",e[e.tasks=1]="tasks",e[e.monitoring=2]="monitoring",e[e.analytics=3]="analytics"})(ProcessingCenterView=ProcessingCenterView||{}),"application"),_redux_applications_generateApplicationsRedux=index.applications.generateApplicationsRedux({sliceName:SLICE_NAME,namespace:namespace$1,additionalSelectors:{primaryResourceType:function(){return"applications"},applicationFilters:function(){return[]},searchValue:function(){return"analytics center"}}}),slice=_redux_applications_generateApplicationsRedux.slice,selectors=_redux_applications_generateApplicationsRedux.selectors,sagas=_redux_applications_generateApplicationsRedux.sagas,initialState$1=_redux_applications_generateApplicationsRedux.initialState;function _define_property$3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var namespace=SLICE_NAME,initialState=_define_property$3({},namespace$1,initialState$1),actions=_define_property$3({},namespace$1,slice.actions),rootReducer=combineReducers(_define_property$3({},namespace$1,slice.reducer));function _ts_generator(n,s){var a,o,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[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(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,o&&(i=2&t[0]?o.return:t[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,t[1])).done)return i;switch(o=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,o=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=s.call(n,l)}catch(e){t=[6,e],o=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function rootSaga(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,all([sagas.watchRead()])];case 1:return e.sent(),[2]}})}function _define_property$2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function getBrowsePanelModule(){return{id:SLICE_NAME,reducerMap:_define_property$2({},SLICE_NAME,rootReducer),sagas:[rootSaga],initialActions:[]}}function _define_property$1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$1(t,e,r[e])})}return t}function ownKeys(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _object_without_properties(e,t){if(null==e)return{};var r,n=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols)for(var s=Object.getOwnPropertySymbols(e),a=0;a<s.length;a++)r=s[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function _object_without_properties_loose(e,t){if(null==e)return{};for(var r,n={},s=Object.keys(e),a=0;a<s.length;a++)r=s[a],0<=t.indexOf(r)||(n[r]=e[r]);return n}var TAB_WIDTH=197,useStyles$1=makeStyles()(function(e,t,r){return{root:{display:"flex",flexGrow:1,height:t.height,position:"relative"},tabs:{borderRight:".5px solid ".concat(e.palette.divider),transition:".2s ease",width:e.spacing(14),minWidth:e.spacing(14),padding:"".concat(e.spacing(1.6)," ").concat(e.spacing(2.5)),boxSizing:"border-box"},tabsContainer:{alignItems:"center"},tabIndicator:{background:"transparent"},tabRoot:{opacity:1,borderRadius:4,fontSize:"14px",marginBottom:e.spacing(1),minHeight:e.spacing(9),minWidth:e.spacing(9),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),width:"100%","&:hover":{background:"#F2F5F9"},"&.Sdk-Mui-disabled":{cursor:"not-allowed",pointerEvents:"auto"},"&:disabled":{cursor:"not-allowed",pointerEvents:"auto"}},tabsExpanded:_define_property$1({width:TAB_WIDTH,minWidth:TAB_WIDTH,paddingRight:e.spacing(2),paddingLeft:e.spacing(2)},"& ".concat(r.tabRoot),{width:"calc(".concat(TAB_WIDTH,"px - ").concat(e.spacing(3),")"),flexDirection:"row",textTransform:"capitalize","& svg:first-of-type":{marginRight:e.spacing(2),marginBottom:"0"}}),tabExpandedWrapper:{flexDirection:"row",display:"flex",justifyContent:"flex-start","& svg:first-of-type":{marginBottom:"0 !important",marginRight:e.spacing(2)},"& svg:last-child":{marginBottom:"0 !important",marginLeft:"auto"}},tabSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg:first-of-type":{marginBottom:"0 !important",marginRight:"0",color:e.palette.primary.main}},contentPanel:{flexGrow:1},tabExpandedSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg:first-of-type":{marginBottom:"0 !important",marginRight:e.spacing(2),color:e.palette.primary.main}},tabWrapper:{flexDirection:"row",display:"flex",justifyContent:"center","& svg":{marginBottom:"0 !important",marginRight:"0"}},condensedNavIcon:{display:"flex",marginBottom:"0px !important"}}}),MainTabPanel=function(e){var t=e.currentView,n=e.setCurrentView,o=e.intl,i=e.isNavExpanded,e=e.height,r=useDispatch(),l=useStyles$1({height:e}).classes,s=useSelector(betaFeaturesSelector),e=useSelector(userSelector),a=useSelector(selectors.selectItems),c=useSelector(switchApiSelector),p=null!=(a=null==a||null==(a=a[0])?void 0:a.id)?a:void 0,e=null!=(a=null==e?void 0:e.roles)?a:[],d=[{id:ProcessingCenterView.jobs,label:o.formatMessage({id:"os-processing-center-browse.jobs.view",defaultMessage:"Jobs",description:"The label for jobs view"}),testLabel:"jobs-view",icon:jsxRuntimeExports.jsx(Article,{}),content:function(){return jsxRuntimeExports.jsx(JobsPanel,{})},disabled:!1},{id:ProcessingCenterView.tasks,label:o.formatMessage({id:"os-processing-center-browse.tasks.view",defaultMessage:"Tasks",description:"The label for tasks view"}),testLabel:"tasks-view",icon:jsxRuntimeExports.jsx(Task,{style:{transform:"translateX(4px)"}}),content:function(){return jsxRuntimeExports.jsx(TasksPanel,{})},disabled:!1},{id:ProcessingCenterView.analytics,label:o.formatMessage({id:"os-processing-center-browse.analytics.label",defaultMessage:"Analytics",description:"The label for analytics tab."}),labelTooltip:o.formatMessage({id:"os-processing-center-browse.analytics.link.tooltip",defaultMessage:"Open Analytics Center App",description:"The tooltip for analytics center external link."}),testLabel:"analytics-link",icon:jsxRuntimeExports.jsx(AssessmentOutlined,{}),iconEnd:jsxRuntimeExports.jsx(OpenWindow,{}),beta:!1,show:e.includes("ce_analytics_app")&&void 0!==p,props:{onClick:function(){return window.open("".concat(c,"/").concat(p,"?page=processingsummary"),"_blank")}},disabled:!1}].filter(function(e){return(null==e||!e.beta||s)&&(void 0===(null==e?void 0:e.show)||e.show)});return reactExports.useEffect(function(){var e;null!=(e=actions.application)&&e.readStart&&r(actions.application.readStart(null))},[r]),jsxRuntimeExports.jsx(AIWareThemeProvider,{children:jsxRuntimeExports.jsxs("div",{className:l.root,children:[jsxRuntimeExports.jsx(Tabs,{id:"processingCenterViewTabs",orientation:"vertical",value:t,onChange:function(e,t){var r=d[t];r&&void 0===r.content||n(t)},className:classNames(l.tabs,_define_property$1({},l.tabsExpanded,i)),classes:{flexContainer:l.tabsContainer,indicator:l.tabIndicator},"aria-label":"processing center tabs","data-test":"pc-nav-tabs-container",children:d.map(function(e){var t,r,n,s=e.props||{},a=e.disabled||!1;return reactExports.createElement(Tab,_object_spread_props(_object_spread$1(_object_spread_props(_object_spread$1({},s),{key:e.id}),a11yProps(e.id)),{wrapped:!0,label:(t=(s=e).disabled||!1,r=s.label,n=null!=(n=null==s?void 0:s.labelTooltip)?n:r,jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip,{title:t?o.formatMessage({id:"processing-center.nav-list.coming-soon-label",defaultMessage:"{label} coming soon",description:"coming soon label"},{label:r}):n,children:jsxRuntimeExports.jsx("span",{children:i?s.label:""})}),null!=s&&s.iconEnd&&i?s.iconEnd:null]})),icon:(r=(t=e).icon,n=null!=(n=null==t?void 0:t.labelTooltip)?n:t.label,i?r:jsxRuntimeExports.jsx(Tooltip,{title:t.disabled||!1?o.formatMessage({id:"processing-center.nav-list.coming-soon-label",defaultMessage:"{label} coming soon",description:"coming soon label"},{label:t.label}):n,children:jsxRuntimeExports.jsx("span",{className:l.condensedNavIcon,children:r})})),classes:{root:l.tabRoot,wrapped:i?l.tabExpandedWrapper:l.tabWrapper,selected:i?l.tabExpandedSelected:l.tabSelected},disabled:a,"data-test":"pc-nav-tab-".concat(e.testLabel)}))})}),d.map(function(e){return void 0===(null==e?void 0:e.content)?null:jsxRuntimeExports.jsx(TabPanel,{value:t,index:e.id,className:l.contentPanel,"data-test":"pc-tab-".concat(e.testLabel),children:e.content()},e.id)})]})})};function TabPanel(e){var t=e.children,r=e.value,n=e.index,e=_object_without_properties(e,["children","value","index"]);return jsxRuntimeExports.jsx("div",_object_spread_props(_object_spread$1({role:"tabpanel",hidden:r!==n,id:"processing-center-tabpanel-".concat(n),"aria-labelledby":"processing-center-tab-".concat(n)},e),{children:r===n&&t}))}function a11yProps(e){return{id:"admin-center-tab-".concat(e),"aria-controls":"admin-center-tabpanel-".concat(e)}}var MainTabPanel$1=injectIntl(MainTabPanel),Container=function(e){var t=e.classes,r=e.dimmed,e=e.children;return useSelector(selectIsFullscreenEnabled)?jsxRuntimeExports.jsx(FullscreenPortal,{dataTest:"ac-widget",dimmed:!!r,panelId:"PROCESSING_CENTER",children:e}):jsxRuntimeExports.jsx("div",{role:"presentation","data-test":"ac-widget",className:classNames(t.root,t.panel),children:e})};function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,a=[],o=!0,i=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){i=!0,s=e}finally{try{o||null==r.return||r.return()}finally{if(i)throw s}}return a}}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 r;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}var appBarHeight=55,headerHeight=64,borderBottom=5,useStyles=makeStyles()(function(e){return{root:{width:"100%",position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%"}}}),MainLayout=function(e){var e=e.hidePanel,t=_sliced_to_array(reactExports.useState(!0),2),r=t[0],n=t[1],t=useSelector(selectIsFullscreenEnabled),s=useStyles().classes,a=useSelector(panelsSelector)||[],o=_sliced_to_array(reactExports.useState(ProcessingCenterView.jobs),2),i=o[0],o=o[1],a=a.find(function(e){return"PROCESSING_CENTER"===e.panelId})||{panelConfig:{dimmed:0}},a=0<(null===a||null==(a=a.panelConfig)?void 0:a.dimmed),t="calc(100vh - ".concat(t?25:appBarHeight+borderBottom,"px - ").concat(headerHeight,"px)");return jsxRuntimeExports.jsxs(Container,{dimmed:a,classes:s,children:[jsxRuntimeExports.jsx(Header$1,{height:headerHeight,hidePanel:e,isNavExpanded:r,onLeftNavigationToggle:function(){n(!r)}}),jsxRuntimeExports.jsx(MainTabPanel$1,{currentView:i,setCurrentView:o,height:t,isNavExpanded:r})]})};function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property(t,e,r[e])})}return t}var Content=function(e){var t=useSelector(selectApiConfigs);return t.apiRoot&&t.graphQLEndpoint&&t.token?jsxRuntimeExports.jsx(MainLayout,_object_spread({},e)):null},ProcessingCenterBrowse=function(e){return jsxRuntimeExports.jsx(AIWareThemeProvider,{children:jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getBrowsePanelModule(),getProcessingCenterJobsModule(),getProcessingCenterTasksModule()],children:jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsx(Content,_object_spread({},e))})})})};export{ProcessingCenterBrowse,actions,selectors as applicationSelectors,getBrowsePanelModule,initialState,namespace,rootReducer};
|
package/js-core.esm109.js.gz
CHANGED
|
Binary file
|