aiware-js 1.0.0-master.1122 → 1.0.0-master.1124
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.esm102.js +1 -1
- package/js-core.esm102.js.gz +0 -0
- package/js-core.esm116.js +1 -1
- package/js-core.esm116.js.gz +0 -0
- package/js-core.esm118.js +1 -1
- package/js-core.esm118.js.gz +0 -0
- package/js-core.esm121.js +1 -1
- package/js-core.esm121.js.gz +0 -0
- package/js-core.esm124.js +1 -1
- package/js-core.esm124.js.gz +0 -0
- package/js-core.esm125.js +1 -1
- package/js-core.esm125.js.gz +0 -0
- package/js-core.esm19.js +1 -1
- package/js-core.esm19.js.gz +0 -0
- package/js-core.esm50.js +1 -1
- package/js-core.esm50.js.gz +0 -0
- package/js-core.esm6.js +2 -2
- package/js-core.esm6.js.gz +0 -0
- package/js-core.esm89.js +1 -1
- package/js-core.esm89.js.gz +0 -0
- package/js-core.umd.css +92 -92
- package/js-core.umd.css.gz +0 -0
- package/js-core.umd.js +208 -208
- package/js-core.umd.js.gz +0 -0
- package/js-core.umd.min.css +92 -92
- package/js-core.umd.min.css.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/js-core.esm102.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as selectButtonColor,e as selectButtonTextColor,S as SHARED_TEXT,p as actions,r as actions$2,q as CUSTOM_LOGIN_PANEL_ID}from"./js-core.esm70.js";import{Z as useSelector,j as jsxRuntime,ao as Box,a1 as hidePanel}from"./js-core.esm.js";import{l as Stack,
|
|
1
|
+
import{d as selectButtonColor,e as selectButtonTextColor,S as SHARED_TEXT,p as actions,r as actions$2,q as CUSTOM_LOGIN_PANEL_ID}from"./js-core.esm70.js";import{Z as useSelector,j as jsxRuntime,ao as Box,a1 as hidePanel}from"./js-core.esm.js";import{l as Stack,aD as CustomColorInput,aE as ButtonPreview}from"./js-core.esm6.js";import{T as Typography,h as Button}from"./js-core.esm5.js";import{u as useDispatch}from"./js-core.esm7.js";const CustomLoginConfigurationStep=()=>{const o=useDispatch();var t=useSelector(selectButtonColor),e=useSelector(selectButtonTextColor);return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",gap:"20px",sx:{height:"90%",position:"relative",overflow:"auto"}},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginTop:"25px",marginBottom:"30px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{fontWeight:600,fontSize:"16px",marginBottom:"5px"}},{children:SHARED_TEXT.configurationStep.title()})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:400,fontSize:"14px"}},{children:SHARED_TEXT.configurationStep.description()})),jsxRuntime.exports.jsx(CustomColorInput,{isButtonColorRequired:!1,onReset:()=>o(actions.resetButton()),buttonColor:t,buttonTextColor:e,onChangeButtonColor:t=>o(actions.setButtonColor(t)),onChangeTextColor:t=>o(actions.setButtonTextColor(t))})]})),jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(ButtonPreview,{buttonColor:t,buttonTextColor:e})})]})),jsxRuntime.exports.jsx(Footer,{onBack:()=>{o(actions$2.setActiveStep(1))},onSave:()=>{o(actions$2.updateLoginConfigStart()),o(hidePanel(CUSTOM_LOGIN_PANEL_ID))}})]}))},Footer=({onBack:t,onSave:o})=>jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",sx:{padding:"60px 0 30px 30px",display:"flex",justifyContent:"flex-end",height:"10%",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(Button,Object.assign({onClick:t,disabled:!1,variant:"text","data-testid":"admin-center-custom-login--back-btn",sx:{marginRight:"15px"}},{children:SHARED_TEXT.configurationStep.backBtn()})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:o,disabled:!1,variant:"contained","data-testid":"admin-center-custom-login--create-btn"},{children:SHARED_TEXT.configurationStep.createBtn()}))]}));export{CustomLoginConfigurationStep as default};
|
package/js-core.esm102.js.gz
CHANGED
|
Binary file
|
package/js-core.esm116.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as selectPreviewImage,a as selectPackageName,b as selectPackageDescription,c as selectDistributionType,d as selectors$7,e as selectIsEditMode,f as selectOriginalPackageName,g as actions,S as SHARED_TEXT,P as PDistributionType}from"./js-core.esm87.js";import{Z as useSelector,fJ as selectUserCanCreatePackage,r as react,j as jsxRuntime,ao as Box,an as CircularProgress}from"./js-core.esm.js";import{m as makeStyles,F as FormControl,T as Typography,cd as Information,S as Select,U as MenuItem}from"./js-core.esm5.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm117.js";import{p as debounce_1,l as Stack,T as TextField,d as Tooltip,I as IconButton,n as imageUpload,aA as characterCountTextField,c as CheckCircle,aE as Error}from"./js-core.esm6.js";import"./js-core.esm14.js";import"./js-core.esm13.js";import"./js-core.esm9.js";import"./js-core.esm85.js";import"./js-core.esm59.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm83.js";import"./js-core.esm36.js";import"./js-core.esm3.js";import"./js-core.esm4.js";import"./js-core.esm28.js";import"./js-core.esm55.js";import"./js-core.esm45.js";import"./js-core.esm49.js";import"./js-core.esm50.js";import"./js-core.esm56.js";import"./js-core.esm2.js";import"./js-core.esm33.js";import"./js-core.esm29.js";import"./js-core.esm17.js";import"./js-core.esm51.js";import"./js-core.esm54.js";import"./js-core.esm26.js";import"./js-core.esm25.js";import"./js-core.esm53.js";import"./js-core.esm52.js";const{ImageUpload}=imageUpload["jsx"],{CharacterCountTextField}=characterCountTextField["jsx"],useStyles=makeStyles()(e=>({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=()=>{var e=useStyles()["classes"],s=useSelector(selectPreviewImage);const t=useDispatch(),i=useSelector(selectPackageName)||"";var a=useSelector(selectPackageDescription)||"",r=useSelector(selectDistributionType),n=useSelector(selectUserCanCreatePackage),o=useSelector(selectors$7.selectItems)||[],c=useSelector(selectors$7.selectReadStatus);const p=useSelector(selectIsEditMode),x=useSelector(selectOriginalPackageName);const l=react.exports.useCallback(debounce_1(e=>{t(actions.allOrgOwnedPackages.setSearchValue(e)),t(actions.allOrgOwnedPackages.resetList(null)),t(actions.allOrgOwnedPackages.readStart(null))},400),[]),m=void 0===o.find(e=>e.name===i),j=0<i.length,u="pending"===c;return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",alignItems:"flex-start",sx:{marginTop:"10px"}},{children:[jsxRuntime.exports.jsx(Box,Object.assign({id:"meta-info-section",sx:{width:"100%"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row"},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({id:"package-image-section",sx:{width:"180px"}},{children:[jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(ImageUpload,{image:s,getUrl:!0,handleChange:e=>{var s;e.unsignedUrl?(s=e.unsignedUrl,e=e.getUrl,t(actions.basicInfo.setIcon(s)),t(actions.basicInfo.setPreviewImage(e))):(t(actions.basicInfo.setIcon("")),t(actions.basicInfo.setPreviewImage("")))},testId:"rc-pm-image"})})),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{paddingRight:"20px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5",sx:{fontSize:"14px",fontWeight:600,marginBottom:"5px",marginTop:"15px"}},{children:SHARED_TEXT.basicInfoStep.packageImageLabel})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{marginTop:0,fontSize:"12px",lineHeight:"16px"}},{children:SHARED_TEXT.basicInfoStep.packageImageLabelDesc}))]}))]})),jsxRuntime.exports.jsx(Box,Object.assign({id:"basic-info-section",sx:{width:"100%",paddingLeft:"15px"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",justifyContent:"flex-start"},{children:[jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(TextField,{sx:{width:"100%"},error:!m,id:"package-manager-name",label:SHARED_TEXT.basicInfoStep.packageName,onChange:e=>{e=e.target.value;t(actions.basicInfo.setPackageName(e)),p&&e===x||l(e)},variant:"outlined",disabled:!n,InputLabelProps:0<i.length?{shrink:!0}:{},inputProps:{maxLength:100},value:i,helperText:(()=>{let e=SHARED_TEXT.basicInfoStep.packageNameIsAvailable,s=jsxRuntime.exports.jsx(CheckCircle,{sx:{fontSize:"14px",color:"#40c057"}});return j||(e=SHARED_TEXT.basicInfoStep.packageNameRequired,s=void 0),m||(e=SHARED_TEXT.basicInfoStep.errorPackageName,s=jsxRuntime.exports.jsx(Error,{sx:{fontSize:"14px",color:"inherit"}})),u&&(e=SHARED_TEXT.basicInfoStep.packageNameCheck,s=jsxRuntime.exports.jsx(CircularProgress,{size:12})),jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{color:"inherit",gap:"3px",transform:"translateX(-12px)"},direction:"row",alignItems:"center"},{children:[s&&jsxRuntime.exports.jsx(Stack,Object.assign({sx:{width:"15px",height:"15px",alignItems:"center",justifyContent:"center"}},{children:s})),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{height:"15px",color:"inherit"},variant:"caption"},{children:e}))]}))})(),required:!0,"data-test":"rc-pm-package-name"})})),jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(CharacterCountTextField,{handleChange:e=>{t(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})}))]}))}))]}))})),jsxRuntime.exports.jsxs(Box,Object.assign({id:"distribution-section",sx:{width:"100%",borderTop:"1px solid #DADFE8",marginTop:"20px",paddingTop:"15px"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{fontSize:"16px",fontWeight:700,margin:0,color:e=>e.palette.text.primary}},{children:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabel})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabel,"data-testid":"rc-pm-distribution-info-tooltip"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({size:"small",onClick:()=>{window.open("https://docs.veritone.com/#/aiware-OS/resource-center/manage-packages?id=distribution-types-for-packages","noopener","noreferrer")}},{children:jsxRuntime.exports.jsx(Information,{sx:{fontSize:"18px",color:"#424242"}})}))}))]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontSize:"14px",fontWeight:400,color:e=>e.palette.text.secondary,marginBottom:0,marginTop:"5px",width:"100%"}},{children:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabelDesc})),jsxRuntime.exports.jsx(FormControl,{children:jsxRuntime.exports.jsxs(Select,Object.assign({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:r,onChange:e=>{e=e.target.value;t(actions.basicInfo.setDistributionType(e))},renderValue:e=>jsxRuntime.exports.jsx("span",{children:e})},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-public",value:PDistributionType.Public},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPublic})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPublicDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-private",value:PDistributionType.Private},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPrivate})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPrivateDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-shareable",value:PDistributionType.Sharable},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionShareable})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionShareableDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-orglocked",value:PDistributionType.OrgLocked},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionOrgLocked})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionOrgLockedDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-instancelocked",value:PDistributionType.InstanceLocked},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionInstanceLocked})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionInstanceLockedDesc})),jsxRuntime.exports.jsx("br",{})]}))}))]}))})]}))]})),jsxRuntime.exports.jsx(PanelControls,{invalidFields:!1,disableNext:!j||!m||!r||!n||u,disableBack:!1,nextButtonType:ENextButtonType.NEXT})]})};export{BasicInfoStep as default};
|
|
1
|
+
import{s as selectPreviewImage,a as selectPackageName,b as selectPackageDescription,c as selectDistributionType,d as selectors$7,e as selectIsEditMode,f as selectOriginalPackageName,g as actions,S as SHARED_TEXT,P as PDistributionType}from"./js-core.esm87.js";import{Z as useSelector,fJ as selectUserCanCreatePackage,r as react,j as jsxRuntime,ao as Box,an as CircularProgress}from"./js-core.esm.js";import{m as makeStyles,F as FormControl,T as Typography,cd as Information,S as Select,U as MenuItem}from"./js-core.esm5.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm117.js";import{p as debounce_1,l as Stack,T as TextField,d as Tooltip,I as IconButton,n as imageUpload,aA as characterCountTextField,c as CheckCircle,aF as Error}from"./js-core.esm6.js";import"./js-core.esm14.js";import"./js-core.esm13.js";import"./js-core.esm9.js";import"./js-core.esm85.js";import"./js-core.esm59.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm83.js";import"./js-core.esm36.js";import"./js-core.esm3.js";import"./js-core.esm4.js";import"./js-core.esm28.js";import"./js-core.esm55.js";import"./js-core.esm45.js";import"./js-core.esm49.js";import"./js-core.esm50.js";import"./js-core.esm56.js";import"./js-core.esm2.js";import"./js-core.esm33.js";import"./js-core.esm29.js";import"./js-core.esm17.js";import"./js-core.esm51.js";import"./js-core.esm54.js";import"./js-core.esm26.js";import"./js-core.esm25.js";import"./js-core.esm53.js";import"./js-core.esm52.js";const{ImageUpload}=imageUpload["jsx"],{CharacterCountTextField}=characterCountTextField["jsx"],useStyles=makeStyles()(e=>({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=()=>{var e=useStyles()["classes"],s=useSelector(selectPreviewImage);const t=useDispatch(),i=useSelector(selectPackageName)||"";var a=useSelector(selectPackageDescription)||"",r=useSelector(selectDistributionType),n=useSelector(selectUserCanCreatePackage),o=useSelector(selectors$7.selectItems)||[],c=useSelector(selectors$7.selectReadStatus);const p=useSelector(selectIsEditMode),x=useSelector(selectOriginalPackageName);const l=react.exports.useCallback(debounce_1(e=>{t(actions.allOrgOwnedPackages.setSearchValue(e)),t(actions.allOrgOwnedPackages.resetList(null)),t(actions.allOrgOwnedPackages.readStart(null))},400),[]),m=void 0===o.find(e=>e.name===i),j=0<i.length,u="pending"===c;return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",alignItems:"flex-start",sx:{marginTop:"10px"}},{children:[jsxRuntime.exports.jsx(Box,Object.assign({id:"meta-info-section",sx:{width:"100%"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row"},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({id:"package-image-section",sx:{width:"180px"}},{children:[jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(ImageUpload,{image:s,getUrl:!0,handleChange:e=>{var s;e.unsignedUrl?(s=e.unsignedUrl,e=e.getUrl,t(actions.basicInfo.setIcon(s)),t(actions.basicInfo.setPreviewImage(e))):(t(actions.basicInfo.setIcon("")),t(actions.basicInfo.setPreviewImage("")))},testId:"rc-pm-image"})})),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{paddingRight:"20px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5",sx:{fontSize:"14px",fontWeight:600,marginBottom:"5px",marginTop:"15px"}},{children:SHARED_TEXT.basicInfoStep.packageImageLabel})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{marginTop:0,fontSize:"12px",lineHeight:"16px"}},{children:SHARED_TEXT.basicInfoStep.packageImageLabelDesc}))]}))]})),jsxRuntime.exports.jsx(Box,Object.assign({id:"basic-info-section",sx:{width:"100%",paddingLeft:"15px"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",justifyContent:"flex-start"},{children:[jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(TextField,{sx:{width:"100%"},error:!m,id:"package-manager-name",label:SHARED_TEXT.basicInfoStep.packageName,onChange:e=>{e=e.target.value;t(actions.basicInfo.setPackageName(e)),p&&e===x||l(e)},variant:"outlined",disabled:!n,InputLabelProps:0<i.length?{shrink:!0}:{},inputProps:{maxLength:100},value:i,helperText:(()=>{let e=SHARED_TEXT.basicInfoStep.packageNameIsAvailable,s=jsxRuntime.exports.jsx(CheckCircle,{sx:{fontSize:"14px",color:"#40c057"}});return j||(e=SHARED_TEXT.basicInfoStep.packageNameRequired,s=void 0),m||(e=SHARED_TEXT.basicInfoStep.errorPackageName,s=jsxRuntime.exports.jsx(Error,{sx:{fontSize:"14px",color:"inherit"}})),u&&(e=SHARED_TEXT.basicInfoStep.packageNameCheck,s=jsxRuntime.exports.jsx(CircularProgress,{size:12})),jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{color:"inherit",gap:"3px",transform:"translateX(-12px)"},direction:"row",alignItems:"center"},{children:[s&&jsxRuntime.exports.jsx(Stack,Object.assign({sx:{width:"15px",height:"15px",alignItems:"center",justifyContent:"center"}},{children:s})),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{height:"15px",color:"inherit"},variant:"caption"},{children:e}))]}))})(),required:!0,"data-test":"rc-pm-package-name"})})),jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(CharacterCountTextField,{handleChange:e=>{t(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})}))]}))}))]}))})),jsxRuntime.exports.jsxs(Box,Object.assign({id:"distribution-section",sx:{width:"100%",borderTop:"1px solid #DADFE8",marginTop:"20px",paddingTop:"15px"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{fontSize:"16px",fontWeight:700,margin:0,color:e=>e.palette.text.primary}},{children:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabel})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabel,"data-testid":"rc-pm-distribution-info-tooltip"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({size:"small",onClick:()=>{window.open("https://docs.veritone.com/#/aiware-OS/resource-center/manage-packages?id=distribution-types-for-packages","noopener","noreferrer")}},{children:jsxRuntime.exports.jsx(Information,{sx:{fontSize:"18px",color:"#424242"}})}))}))]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontSize:"14px",fontWeight:400,color:e=>e.palette.text.secondary,marginBottom:0,marginTop:"5px",width:"100%"}},{children:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabelDesc})),jsxRuntime.exports.jsx(FormControl,{children:jsxRuntime.exports.jsxs(Select,Object.assign({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:r,onChange:e=>{e=e.target.value;t(actions.basicInfo.setDistributionType(e))},renderValue:e=>jsxRuntime.exports.jsx("span",{children:e})},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-public",value:PDistributionType.Public},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPublic})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPublicDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-private",value:PDistributionType.Private},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPrivate})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPrivateDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-shareable",value:PDistributionType.Sharable},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionShareable})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionShareableDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-orglocked",value:PDistributionType.OrgLocked},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionOrgLocked})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionOrgLockedDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-instancelocked",value:PDistributionType.InstanceLocked},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionInstanceLocked})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionInstanceLockedDesc})),jsxRuntime.exports.jsx("br",{})]}))}))]}))})]}))]})),jsxRuntime.exports.jsx(PanelControls,{invalidFields:!1,disableNext:!j||!m||!r||!n||u,disableBack:!1,nextButtonType:ENextButtonType.NEXT})]})};export{BasicInfoStep as default};
|
package/js-core.esm116.js.gz
CHANGED
|
Binary file
|
package/js-core.esm118.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
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 getResourceNamespace,t as namespace,u as selectSelectedResources,v as ESelectedResourceType,w as fails$g,x as global$h,y as functionCall,z as functionUncurryThis,A as shared$3,_ as _export,B as wellKnownSymbol$g,C as dataCenterFilePickerPanelID,D as selectApplicationFilters,F as selectSchemaFilters,G as getTdoPickerPanelConfigs,H as EApplicationFilterType,I as EApplicationStatus,J as ESchemaFilterType,K as ESchemaStatus,L as functionUncurryThisClause,M as defineBuiltIn$6,N as createNonEnumerableProperty$4,O as anObject$c,Q as isNullOrUndefined$4,R as requireObjectCoercible$3,T as toString$2,U as getMethod$3,V as regexpFlags$1,W as objectCreate,X as internalState,Y as isCallable$l,Z as classofRaw$2}from"./js-core.esm87.js";import"./js-core.esm119.js";import{bd as injectIntl,r as react,Z as useSelector,j as jsxRuntime,an as CircularProgress,aH as betaFeaturesSelector,ao as Box,dJ as selectIsFullscreenEnabled,aq as unmountPanel,ar as mountPanel}from"./js-core.esm.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm117.js";import{p as debounce_1,d as Tooltip,T as TextField,j as InputAdornment,K as Search,I as IconButton,aF as Clear,l as Stack,ai as ExpandLess,aj as ExpandMore,t as tableInfiniteScroll}from"./js-core.esm6.js";import{S as SimpleFilter}from"./js-core.esm14.js";import{m as makeStyles,T as Typography,S as Select,U as MenuItem,h as Button,ae as Grid,k as FormattedMessage}from"./js-core.esm5.js";import"./js-core.esm13.js";import"./js-core.esm9.js";import"./js-core.esm85.js";import"./js-core.esm59.js";import{A as Add}from"./js-core.esm72.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm83.js";import"./js-core.esm36.js";import"./js-core.esm3.js";import"./js-core.esm4.js";import"./js-core.esm28.js";import"./js-core.esm55.js";import"./js-core.esm45.js";import"./js-core.esm49.js";import"./js-core.esm50.js";import"./js-core.esm56.js";import"./js-core.esm2.js";import"./js-core.esm33.js";import"./js-core.esm29.js";import"./js-core.esm17.js";import"./js-core.esm51.js";import"./js-core.esm54.js";import"./js-core.esm26.js";import"./js-core.esm25.js";import"./js-core.esm53.js";import"./js-core.esm52.js";const selectActiveTDOs=e=>e[namespace].tdos.activeTDOs,{TableInfiniteScroll}=tableInfiniteScroll["jsx"],Container=({children:e,resourceType:s})=>jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"column",flexGrow:"1"},{children:[jsxRuntime.exports.jsx(TableHeader,{resourceType:s}),jsxRuntime.exports.jsx("div",Object.assign({style:{flexGrow:1}},{children:e}))]})),ResourcesTable=react.exports.forwardRef(({resourceType:s,showSelectedResources:e},t)=>{const r=useDispatch();var a=s.card,n=useSelector(s.hasMoreSelector),i=useSelector(s.offsetSelector),c=useSelector(s.itemSelector).map(e=>Object.assign(Object.assign({},e),{resourceType:s.resourceType})),o=useSelector(s.loadingStatusSelector),l=()=>r(s.fetchMore()),p=useSelector(selectSelectedResources).map(e=>Object.assign(Object.assign({},e),{resourceType:s.resourceType})).filter(e=>e.type===s.resourceType);return e?jsxRuntime.exports.jsx(Container,Object.assign({resourceType:s},{children:jsxRuntime.exports.jsx(TableInfiniteScroll,{offset:0,hasMore:!1,fetchMore:l,fetchOnMount:!1,items:p.map(e=>Object.assign(Object.assign({},e.item),{resourceType:e.resourceType})),itemHeight:60,isLoading:!1,error:"failure"===o,TableRowComponent:a,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)})):jsxRuntime.exports.jsx(Container,Object.assign({resourceType:s},{children:jsxRuntime.exports.jsx(TableInfiniteScroll,{offset:i,hasMore:n,fetchMore:l,fetchOnMount:0===c.length,items:c,itemHeight:60,isLoading:"pending"===o,error:"failure"===o,TableRowComponent:a,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)}))}),TableHeader=({resourceType:e})=>{return jsxRuntime.exports.jsx(Grid,Object.assign({container:!0},{children:(()=>{switch(e.resourceType){case ESelectedResourceType.TDO:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:5,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.fileType()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.actions()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.manage()}))}))]});case ESelectedResourceType.Engine:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))}))]});case ESelectedResourceType.FlowTemplate:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.author()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.date()}))}))]});case ESelectedResourceType.Node:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.author()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]});case ESelectedResourceType.Application:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))}))]});case ESelectedResourceType.Package:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:5,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.primary()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]});default:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]})}})()}))},ApplicationStatusFilter=()=>{const s=useDispatch();var e=(null==(e=useSelector(selectApplicationFilters).find(e=>e.type===EApplicationFilterType.Status))?void 0:e.values)||[],t=Object.values(EApplicationStatus).map(e=>({value:e,label:e})),r=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.application-package.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),a=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.application-package-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.application-package-status-filter",filterLabel:r,clearButtonLabel:a,items:t,selectedValues:e,onChange:e=>{s(actions.applications.setFilter({type:EApplicationFilterType.Status,values:e}))},isMultiselect:!1})},FilterButtons=({onClearAll:e})=>{var s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.engine-package.clear-all.label",defaultMessage:"Clear All",description:"Clear All label"});return jsxRuntime.exports.jsx(Box,Object.assign({sx:{pt:"14px",display:"flex"}},{children:jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"os-resource-center-package-manager-clear-filters-btn",color:"primary",variant:"outlined",onClick:e},{children:s}))}))},ApplicationFilters=()=>{const e=useDispatch();var s=useSelector(selectApplicationFilters);react.exports.useEffect(()=>{e(actions.applications.resetList(null)),e(actions.applications.readStart(null))},[s]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(ApplicationStatusFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onClearAll:()=>{e(actions.applications.clearFilters(null))}})]})},SchemaPackageStatusFilter=()=>{const s=useDispatch();var e=(null==(e=useSelector(selectSchemaFilters).find(e=>e.type===ESchemaFilterType.Status))?void 0:e.values)||[],t=Object.values(ESchemaStatus).map(e=>({value:e,label:e})),r=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.schema.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),a=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.schema-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.schema-status-filter",filterLabel:r,clearButtonLabel:a,items:t,selectedValues:e,onChange:e=>{s(actions.schemas.setFilter({type:ESchemaFilterType.Status,values:e}))},isMultiselect:!1})},SchemaFilters=()=>{const e=useDispatch();var s=useSelector(selectSchemaFilters);react.exports.useEffect(()=>{e(actions.schemas.resetList(null)),e(actions.schemas.readStart(null))},[s]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SchemaPackageStatusFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onClearAll:()=>{e(actions.schemas.clearFilters(null))}})]})},ResourceStepFilters=({isVisible:e=!1,resourceTypeSelected:s=ESelectedResourceType.EnginePackage})=>e?jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginLeft:"-30px",width:"calc(100% + 60px)",p:"10px 30px 10px",background:"#FAFAFA",marginBottom:"20px"}},{children:[s===ESelectedResourceType.Application&&jsxRuntime.exports.jsx(ApplicationFilters,{}),s===ESelectedResourceType.Schema&&jsxRuntime.exports.jsx(SchemaFilters,{})]})):null;var fails$3=fails$g,global$2=global$h,$RegExp$2=global$h.RegExp,UNSUPPORTED_Y$1=fails$3(function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),MISSED_STICKY=UNSUPPORTED_Y$1||fails$3(function(){return!$RegExp$2("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y$1||fails$3(function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$1},fails$2=fails$g,global$1=global$h,$RegExp$1=global$h.RegExp,regexpUnsupportedDotAll=fails$2(function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),fails$1=fails$g,global=global$h,$RegExp=global$h.RegExp,regexpUnsupportedNcg=fails$1(function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),call$2=functionCall,uncurryThis$1=functionUncurryThis,toString$1=toString$2,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=shared$3.exports,create=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt=uncurryThis$1("".charAt),indexOf=uncurryThis$1("".indexOf),replace=uncurryThis$1("".replace),stringSlice=uncurryThis$1("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,s=/b*/g;return call$2(nativeExec,e,"a"),call$2(nativeExec,s,"a"),0!==e.lastIndex||0!==s.lastIndex}(),UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG,regexpExec$2=patchedExec=PATCH?function(e){var s,t,r,a,n,i,c=this,o=getInternalState(c),e=toString$1(e),l=o.raw;if(l)return l.lastIndex=c.lastIndex,x=call$2(patchedExec,l,e),c.lastIndex=l.lastIndex,x;var p=o.groups,l=UNSUPPORTED_Y&&c.sticky,x=call$2(regexpFlags,c),o=c.source,u=0,d=e;if(l&&(x=replace(x,"y",""),-1===indexOf(x,"g")&&(x+="g"),d=stringSlice(e,c.lastIndex),0<c.lastIndex&&(!c.multiline||c.multiline&&"\n"!==charAt(e,c.lastIndex-1))&&(o="(?: "+o+")",d=" "+d,u++),s=new RegExp("^(?:"+o+")",x)),NPCG_INCLUDED&&(s=new RegExp("^"+o+"$(?!\\s)",x)),UPDATES_LAST_INDEX_WRONG&&(t=c.lastIndex),r=call$2(nativeExec,l?s:c,d),l?r?(r.input=stringSlice(r.input,u),r[0]=stringSlice(r[0],u),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&r&&(c.lastIndex=c.global?r.index+r[0].length:t),NPCG_INCLUDED&&r&&1<r.length&&call$2(nativeReplace,r[0],s,function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)}),r&&p)for(r.groups=n=create(null),a=0;a<p.length;a++)n[(i=p[a])[0]]=r[i[1]];return r}:patchedExec,$=_export,exec=regexpExec$2,uncurryThis=(_export({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec:exec}),functionUncurryThisClause),defineBuiltIn=defineBuiltIn$6,regexpExec$1=regexpExec$2,fails=fails$g,wellKnownSymbol=wellKnownSymbol$g,createNonEnumerableProperty=createNonEnumerableProperty$4,SPECIES=wellKnownSymbol("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(t,e,s,r){var i,a=wellKnownSymbol(t),c=!fails(function(){var e={};return e[a]=function(){return 7},7!=""[t](e)}),n=c&&!fails(function(){var e=!1,s=/a/;return"split"===t&&((s={constructor:{}}).constructor[SPECIES]=function(){return s},s.flags="",s[a]=/./[a]),s.exec=function(){return e=!0,null},s[a](""),!e});c&&n&&!s||(i=uncurryThis(/./[a]),n=e(a,""[t],function(e,s,t,r,a){var e=uncurryThis(e),n=s.exec;return n===regexpExec$1||n===RegExpPrototype.exec?c&&!a?{done:!0,value:i(s,t,r)}:{done:!0,value:e(t,s,r)}:{done:!1}}),defineBuiltIn(String.prototype,t,n[0]),defineBuiltIn(RegExpPrototype,a,n[1])),r&&createNonEnumerableProperty(RegExpPrototype[a],"sham",!0)},sameValue$1=Object.is||function(e,s){return e===s?0!==e||1/e==1/s:e!=e&&s!=s},call$1=functionCall,anObject$1=anObject$c,isCallable=isCallable$l,classof=classofRaw$2,regexpExec=regexpExec$2,$TypeError=TypeError,regexpExecAbstract=function(e,s){var t=e.exec;if(isCallable(t))return null!==(t=call$1(t,e,s))&&anObject$1(t),t;if("RegExp"===classof(e))return call$1(regexpExec,e,s);throw $TypeError("RegExp#exec called on incompatible receiver")},call=functionCall,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,anObject=anObject$c,isNullOrUndefined=isNullOrUndefined$4,requireObjectCoercible=requireObjectCoercible$3,sameValue=sameValue$1,toString=toString$2,getMethod=getMethod$3,regExpExec=regexpExecAbstract;fixRegexpWellKnownSymbolLogic("search",function(r,a,n){return[function(e){var s=requireObjectCoercible(this),t=isNullOrUndefined(e)?void 0:getMethod(e,r);return t?call(t,e,s):new RegExp(e)[r](toString(s))},function(e){var s=anObject(this),e=toString(e),t=n(a,s,e);return t.done?t.value:(t=s.lastIndex,sameValue(t,0)||(s.lastIndex=0),e=regExpExec(s,e),sameValue(s.lastIndex,t)||(s.lastIndex=t),null===e?-1:e.index)}]});const FiltersButton=({isAvailable:e})=>{const s=useDispatch(),t=useSelector(selectIsFiltersOpen);return react.exports.useEffect(()=>{e||s(actions.resourcesStep.setIsFiltersOpen(!1))},[e]),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e?"":SHARED_TEXT.resourcesStep.search.filtersNotAvailable()},{children:jsxRuntime.exports.jsx("span",Object.assign({style:{display:"flex"}},{children:jsxRuntime.exports.jsxs(Button,Object.assign({"data-testid":"rc-pm-resources-step-toggle-filters-btn",disabled:!e,variant:"text",color:"primary",onClick:()=>{s(actions.resourcesStep.setIsFiltersOpen(!t))}},{children:[SHARED_TEXT.resourcesStep.search.showFilters(),t?jsxRuntime.exports.jsx(ExpandLess,{sx:{marginLeft:"10px"}}):jsxRuntime.exports.jsx(ExpandMore,{sx:{marginLeft:"10px"}})]}))}))}))},SelectViewButton=({showSelected:e,onClick:s})=>{const t=useSelector(selectActiveResource);var r=resourceTypes.find(e=>e.id===t)||resourceTypes[0];return t===EResourceDropdownID.tdos?null:jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"rc-pm-resources-step-show-selected-btn",variant:"text",color:"primary",onClick:s},{children:e?SHARED_TEXT.resourcesStep.showAllToggle(r.dropdownLabel):SHARED_TEXT.resourcesStep.showSelectedToggle(r.dropdownLabel)}))},useStyles=makeStyles()(e=>({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(({intl:e,onChange:s,testId:t,isAvailable:r})=>{const a=useDispatch();var n=useStyles()["classes"];const[i,c]=react.exports.useState(!1);var o=useSelector(selectResourceStepSearchText);const l=react.exports.useCallback(debounce_1(e=>{s&&(s(e),c(!1))},1e3),[s]);var p=react.exports.useCallback(e=>{e=e.target.value;a(actions.resourcesStep.setSearchValue(e)),l(e),c(!0)},[l]);return jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r?"":"Search is not available yet for this Resource."},{children:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(TextField,{disabled:!r,"data-testid":"rc-pm-resources-step-search-input",sx:{"& fieldset":{borderRadius:"100px"},background:r?"":"#f7f7f7"},"data-test":t,onClick:e=>e.stopPropagation(),className:""+n.searchInput,onChange:p,value:o,placeholder:e.formatMessage({id:"rc.package-manager.resources.search-placeholder",defaultMessage:[{type:0,value:"Search by name"}]}),InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(Search,{})})),endAdornment:jsxRuntime.exports.jsxs(InputAdornment,Object.assign({position:"end"},{children:[i&&jsxRuntime.exports.jsx(CircularProgress,{size:20,thickness:5}),!i&&o&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.resourcesStep.search.clearSearch()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{s(""),a(actions.resourcesStep.setSearchValue("")),c(!1)}},{children:jsxRuntime.exports.jsx(Clear,{})}))}))]}))}})})}))}),ADD_FILES_BTN_ID="rc-package-manager-wizard-tdo-add-files-btn",AddFilesBtn=()=>{const s=useDispatch(),t=useSelector(selectIsFullscreenEnabled),r=react.exports.useCallback(e=>{s(unmountPanel(dataCenterFilePickerPanelID)),s(actions.tdos.addTDOs(e)),e.forEach(e=>{s(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}))})},[s,unmountPanel,actions]);return jsxRuntime.exports.jsx(Button,Object.assign({id:ADD_FILES_BTN_ID,startIcon:jsxRuntime.exports.jsx(Add,{}),variant:"contained",onClick:function(){var e=getTdoPickerPanelConfigs(r,t);s(mountPanel(Object.assign({},e)))},"data-testid":ADD_FILES_BTN_ID},{children:SHARED_TEXT.resourceTypes.tdo.addFilesButton()}))},ResourcesStep=()=>{const a=react.exports.useRef(null),n=useDispatch();var e=useSelector(selectActiveIndex);const s=useSelector(selectActiveResource);var t=useSelector(selectIsFiltersOpen);const r=useSelector(selectIsSelectedViewActive);var i=s===EResourceDropdownID.tdos;const c=0!==useSelector(selectActiveTDOs).length,o=useSelector(betaFeaturesSelector),l=useSelector(selectIsEditMode),p=useSelector(selectExistingPackageId);return react.exports.useEffect(()=>{x(s,"")},[s]),react.exports.useEffect(()=>{p&&l&&n(actions.resourcesStep.setIsSelectedViewActive(!1))},[p,l]),jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"column",flexGrow:"1"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-testid":"rc-pm-resources-step-description",variant:"subtitle1",padding:e=>e.spacing(3,0,3,0)},{children:SHARED_TEXT.resourcesStep.description})),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:5,sx:{margin:e=>e.spacing(3,0,3,0)}},{children:[jsxRuntime.exports.jsx(Select,Object.assign({id:"resource-cetner-package-manager-resource-type","data-testid":"rc-pm-resources-step-resource-type",value:e,onChange:e=>{var s,t=Number(e.target.value);n(actions.resourcesStep.setActiveIndex(t));for(const r of resourceTypes)t===r.dropdownIndex&&(n(actions.resourcesStep.setActiveResource(r.id)),null!=(s=a.current)&&s.scrollTo(0),r.id===EResourceDropdownID.tdos)&&(c||setTimeout(()=>{var e;try{null!=(e=document.querySelector("#"+ADD_FILES_BTN_ID))&&e.click()}catch(e){}},300))},sx:{width:"300px"}},{children:resourceTypes.sort((e,s)=>e.dropdownIndex-s.dropdownIndex).filter(e=>!e.isBehindBetaFlag||o).map((e,s)=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:s,"data-testid":"rc-pm-resource-type-option-"+s},{children:e.dropdownLabel}),"resource-center-package-manager-resource-type-"+s))})),jsxRuntime.exports.jsx(SearchInput,{isAvailable:getResourceTypeByDropdownIndex(e).isSearchAvailable,onChange:e=>{x(s,e),null!=(e=a.current)&&e.scrollTo(0)},testId:"package-manager-search-resources-input"}),jsxRuntime.exports.jsx(FiltersButton,{isAvailable:getResourceTypeByDropdownIndex(e).isFilterAvailable,"data-testid":"rc-pm-resources-step-toggle-filters-btn"})]})),jsxRuntime.exports.jsx(ResourceStepFilters,{resourceTypeSelected:getResourceTypeByDropdownIndex(e).resourceType,isVisible:t}),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:5,sx:{margin:e=>e.spacing(3,0,3,0)}},{children:[jsxRuntime.exports.jsx(SelectViewButton,{showSelected:r,onClick:()=>{var e;n(actions.resourcesStep.setIsSelectedViewActive(!r)),r||x(s,""),null!=(e=a.current)&&e.scrollTo(0)}}),i&&jsxRuntime.exports.jsx(AddFilesBtn,{})]})),jsxRuntime.exports.jsx(ResourcesTable,{resourceType:getResourceTypeByDropdownIndex(e),ref:a,showSelectedResources:r}),jsxRuntime.exports.jsx(Box,Object.assign({height:"70px"},{children:jsxRuntime.exports.jsx(PanelControls,{invalidFields:!1,disableNext:!1,disableBack:!1,nextButtonType:ENextButtonType.NEXT})}))]}));function x(e,s){var t;for(const r of resourceTypes){if(e===r.id&&e===EResourceDropdownID.flows)return;e===r.id&&e!==EResourceDropdownID.tdos&&(n(null==(t=actions[getResourceNamespace(r.id)])?void 0:t.setSearchValue(s)),n(actions[getResourceNamespace(r.id)].resetList(null)),n(actions[getResourceNamespace(r.id)].readStart(null)))}}};export{ResourcesStep as default};
|
|
1
|
+
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 getResourceNamespace,t as namespace,u as selectSelectedResources,v as ESelectedResourceType,w as fails$g,x as global$h,y as functionCall,z as functionUncurryThis,A as shared$3,_ as _export,B as wellKnownSymbol$g,C as dataCenterFilePickerPanelID,D as selectApplicationFilters,F as selectSchemaFilters,G as getTdoPickerPanelConfigs,H as EApplicationFilterType,I as EApplicationStatus,J as ESchemaFilterType,K as ESchemaStatus,L as functionUncurryThisClause,M as defineBuiltIn$6,N as createNonEnumerableProperty$4,O as anObject$c,Q as isNullOrUndefined$4,R as requireObjectCoercible$3,T as toString$2,U as getMethod$3,V as regexpFlags$1,W as objectCreate,X as internalState,Y as isCallable$l,Z as classofRaw$2}from"./js-core.esm87.js";import"./js-core.esm119.js";import{bd as injectIntl,r as react,Z as useSelector,j as jsxRuntime,an as CircularProgress,aH as betaFeaturesSelector,ao as Box,dJ as selectIsFullscreenEnabled,aq as unmountPanel,ar as mountPanel}from"./js-core.esm.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm117.js";import{p as debounce_1,d as Tooltip,T as TextField,j as InputAdornment,K as Search,I as IconButton,aG as Clear,l as Stack,ai as ExpandLess,aj as ExpandMore,t as tableInfiniteScroll}from"./js-core.esm6.js";import{S as SimpleFilter}from"./js-core.esm14.js";import{m as makeStyles,T as Typography,S as Select,U as MenuItem,h as Button,ae as Grid,k as FormattedMessage}from"./js-core.esm5.js";import"./js-core.esm13.js";import"./js-core.esm9.js";import"./js-core.esm85.js";import"./js-core.esm59.js";import{A as Add}from"./js-core.esm72.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm83.js";import"./js-core.esm36.js";import"./js-core.esm3.js";import"./js-core.esm4.js";import"./js-core.esm28.js";import"./js-core.esm55.js";import"./js-core.esm45.js";import"./js-core.esm49.js";import"./js-core.esm50.js";import"./js-core.esm56.js";import"./js-core.esm2.js";import"./js-core.esm33.js";import"./js-core.esm29.js";import"./js-core.esm17.js";import"./js-core.esm51.js";import"./js-core.esm54.js";import"./js-core.esm26.js";import"./js-core.esm25.js";import"./js-core.esm53.js";import"./js-core.esm52.js";const selectActiveTDOs=e=>e[namespace].tdos.activeTDOs,{TableInfiniteScroll}=tableInfiniteScroll["jsx"],Container=({children:e,resourceType:s})=>jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"column",flexGrow:"1"},{children:[jsxRuntime.exports.jsx(TableHeader,{resourceType:s}),jsxRuntime.exports.jsx("div",Object.assign({style:{flexGrow:1}},{children:e}))]})),ResourcesTable=react.exports.forwardRef(({resourceType:s,showSelectedResources:e},t)=>{const r=useDispatch();var a=s.card,n=useSelector(s.hasMoreSelector),i=useSelector(s.offsetSelector),c=useSelector(s.itemSelector).map(e=>Object.assign(Object.assign({},e),{resourceType:s.resourceType})),o=useSelector(s.loadingStatusSelector),l=()=>r(s.fetchMore()),p=useSelector(selectSelectedResources).map(e=>Object.assign(Object.assign({},e),{resourceType:s.resourceType})).filter(e=>e.type===s.resourceType);return e?jsxRuntime.exports.jsx(Container,Object.assign({resourceType:s},{children:jsxRuntime.exports.jsx(TableInfiniteScroll,{offset:0,hasMore:!1,fetchMore:l,fetchOnMount:!1,items:p.map(e=>Object.assign(Object.assign({},e.item),{resourceType:e.resourceType})),itemHeight:60,isLoading:!1,error:"failure"===o,TableRowComponent:a,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)})):jsxRuntime.exports.jsx(Container,Object.assign({resourceType:s},{children:jsxRuntime.exports.jsx(TableInfiniteScroll,{offset:i,hasMore:n,fetchMore:l,fetchOnMount:0===c.length,items:c,itemHeight:60,isLoading:"pending"===o,error:"failure"===o,TableRowComponent:a,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)}))}),TableHeader=({resourceType:e})=>{return jsxRuntime.exports.jsx(Grid,Object.assign({container:!0},{children:(()=>{switch(e.resourceType){case ESelectedResourceType.TDO:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:5,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.fileType()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.actions()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.manage()}))}))]});case ESelectedResourceType.Engine:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))}))]});case ESelectedResourceType.FlowTemplate:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.author()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.date()}))}))]});case ESelectedResourceType.Node:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.author()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]});case ESelectedResourceType.Application:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))}))]});case ESelectedResourceType.Package:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:5,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.primary()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]});default:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]})}})()}))},ApplicationStatusFilter=()=>{const s=useDispatch();var e=(null==(e=useSelector(selectApplicationFilters).find(e=>e.type===EApplicationFilterType.Status))?void 0:e.values)||[],t=Object.values(EApplicationStatus).map(e=>({value:e,label:e})),r=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.application-package.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),a=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.application-package-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.application-package-status-filter",filterLabel:r,clearButtonLabel:a,items:t,selectedValues:e,onChange:e=>{s(actions.applications.setFilter({type:EApplicationFilterType.Status,values:e}))},isMultiselect:!1})},FilterButtons=({onClearAll:e})=>{var s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.engine-package.clear-all.label",defaultMessage:"Clear All",description:"Clear All label"});return jsxRuntime.exports.jsx(Box,Object.assign({sx:{pt:"14px",display:"flex"}},{children:jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"os-resource-center-package-manager-clear-filters-btn",color:"primary",variant:"outlined",onClick:e},{children:s}))}))},ApplicationFilters=()=>{const e=useDispatch();var s=useSelector(selectApplicationFilters);react.exports.useEffect(()=>{e(actions.applications.resetList(null)),e(actions.applications.readStart(null))},[s]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(ApplicationStatusFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onClearAll:()=>{e(actions.applications.clearFilters(null))}})]})},SchemaPackageStatusFilter=()=>{const s=useDispatch();var e=(null==(e=useSelector(selectSchemaFilters).find(e=>e.type===ESchemaFilterType.Status))?void 0:e.values)||[],t=Object.values(ESchemaStatus).map(e=>({value:e,label:e})),r=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.schema.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),a=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.schema-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.schema-status-filter",filterLabel:r,clearButtonLabel:a,items:t,selectedValues:e,onChange:e=>{s(actions.schemas.setFilter({type:ESchemaFilterType.Status,values:e}))},isMultiselect:!1})},SchemaFilters=()=>{const e=useDispatch();var s=useSelector(selectSchemaFilters);react.exports.useEffect(()=>{e(actions.schemas.resetList(null)),e(actions.schemas.readStart(null))},[s]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SchemaPackageStatusFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onClearAll:()=>{e(actions.schemas.clearFilters(null))}})]})},ResourceStepFilters=({isVisible:e=!1,resourceTypeSelected:s=ESelectedResourceType.EnginePackage})=>e?jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginLeft:"-30px",width:"calc(100% + 60px)",p:"10px 30px 10px",background:"#FAFAFA",marginBottom:"20px"}},{children:[s===ESelectedResourceType.Application&&jsxRuntime.exports.jsx(ApplicationFilters,{}),s===ESelectedResourceType.Schema&&jsxRuntime.exports.jsx(SchemaFilters,{})]})):null;var fails$3=fails$g,global$2=global$h,$RegExp$2=global$h.RegExp,UNSUPPORTED_Y$1=fails$3(function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),MISSED_STICKY=UNSUPPORTED_Y$1||fails$3(function(){return!$RegExp$2("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y$1||fails$3(function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$1},fails$2=fails$g,global$1=global$h,$RegExp$1=global$h.RegExp,regexpUnsupportedDotAll=fails$2(function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),fails$1=fails$g,global=global$h,$RegExp=global$h.RegExp,regexpUnsupportedNcg=fails$1(function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),call$2=functionCall,uncurryThis$1=functionUncurryThis,toString$1=toString$2,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=shared$3.exports,create=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt=uncurryThis$1("".charAt),indexOf=uncurryThis$1("".indexOf),replace=uncurryThis$1("".replace),stringSlice=uncurryThis$1("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,s=/b*/g;return call$2(nativeExec,e,"a"),call$2(nativeExec,s,"a"),0!==e.lastIndex||0!==s.lastIndex}(),UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG,regexpExec$2=patchedExec=PATCH?function(e){var s,t,r,a,n,i,c=this,o=getInternalState(c),e=toString$1(e),l=o.raw;if(l)return l.lastIndex=c.lastIndex,x=call$2(patchedExec,l,e),c.lastIndex=l.lastIndex,x;var p=o.groups,l=UNSUPPORTED_Y&&c.sticky,x=call$2(regexpFlags,c),o=c.source,u=0,d=e;if(l&&(x=replace(x,"y",""),-1===indexOf(x,"g")&&(x+="g"),d=stringSlice(e,c.lastIndex),0<c.lastIndex&&(!c.multiline||c.multiline&&"\n"!==charAt(e,c.lastIndex-1))&&(o="(?: "+o+")",d=" "+d,u++),s=new RegExp("^(?:"+o+")",x)),NPCG_INCLUDED&&(s=new RegExp("^"+o+"$(?!\\s)",x)),UPDATES_LAST_INDEX_WRONG&&(t=c.lastIndex),r=call$2(nativeExec,l?s:c,d),l?r?(r.input=stringSlice(r.input,u),r[0]=stringSlice(r[0],u),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&r&&(c.lastIndex=c.global?r.index+r[0].length:t),NPCG_INCLUDED&&r&&1<r.length&&call$2(nativeReplace,r[0],s,function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)}),r&&p)for(r.groups=n=create(null),a=0;a<p.length;a++)n[(i=p[a])[0]]=r[i[1]];return r}:patchedExec,$=_export,exec=regexpExec$2,uncurryThis=(_export({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec:exec}),functionUncurryThisClause),defineBuiltIn=defineBuiltIn$6,regexpExec$1=regexpExec$2,fails=fails$g,wellKnownSymbol=wellKnownSymbol$g,createNonEnumerableProperty=createNonEnumerableProperty$4,SPECIES=wellKnownSymbol("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(t,e,s,r){var i,a=wellKnownSymbol(t),c=!fails(function(){var e={};return e[a]=function(){return 7},7!=""[t](e)}),n=c&&!fails(function(){var e=!1,s=/a/;return"split"===t&&((s={constructor:{}}).constructor[SPECIES]=function(){return s},s.flags="",s[a]=/./[a]),s.exec=function(){return e=!0,null},s[a](""),!e});c&&n&&!s||(i=uncurryThis(/./[a]),n=e(a,""[t],function(e,s,t,r,a){var e=uncurryThis(e),n=s.exec;return n===regexpExec$1||n===RegExpPrototype.exec?c&&!a?{done:!0,value:i(s,t,r)}:{done:!0,value:e(t,s,r)}:{done:!1}}),defineBuiltIn(String.prototype,t,n[0]),defineBuiltIn(RegExpPrototype,a,n[1])),r&&createNonEnumerableProperty(RegExpPrototype[a],"sham",!0)},sameValue$1=Object.is||function(e,s){return e===s?0!==e||1/e==1/s:e!=e&&s!=s},call$1=functionCall,anObject$1=anObject$c,isCallable=isCallable$l,classof=classofRaw$2,regexpExec=regexpExec$2,$TypeError=TypeError,regexpExecAbstract=function(e,s){var t=e.exec;if(isCallable(t))return null!==(t=call$1(t,e,s))&&anObject$1(t),t;if("RegExp"===classof(e))return call$1(regexpExec,e,s);throw $TypeError("RegExp#exec called on incompatible receiver")},call=functionCall,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,anObject=anObject$c,isNullOrUndefined=isNullOrUndefined$4,requireObjectCoercible=requireObjectCoercible$3,sameValue=sameValue$1,toString=toString$2,getMethod=getMethod$3,regExpExec=regexpExecAbstract;fixRegexpWellKnownSymbolLogic("search",function(r,a,n){return[function(e){var s=requireObjectCoercible(this),t=isNullOrUndefined(e)?void 0:getMethod(e,r);return t?call(t,e,s):new RegExp(e)[r](toString(s))},function(e){var s=anObject(this),e=toString(e),t=n(a,s,e);return t.done?t.value:(t=s.lastIndex,sameValue(t,0)||(s.lastIndex=0),e=regExpExec(s,e),sameValue(s.lastIndex,t)||(s.lastIndex=t),null===e?-1:e.index)}]});const FiltersButton=({isAvailable:e})=>{const s=useDispatch(),t=useSelector(selectIsFiltersOpen);return react.exports.useEffect(()=>{e||s(actions.resourcesStep.setIsFiltersOpen(!1))},[e]),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e?"":SHARED_TEXT.resourcesStep.search.filtersNotAvailable()},{children:jsxRuntime.exports.jsx("span",Object.assign({style:{display:"flex"}},{children:jsxRuntime.exports.jsxs(Button,Object.assign({"data-testid":"rc-pm-resources-step-toggle-filters-btn",disabled:!e,variant:"text",color:"primary",onClick:()=>{s(actions.resourcesStep.setIsFiltersOpen(!t))}},{children:[SHARED_TEXT.resourcesStep.search.showFilters(),t?jsxRuntime.exports.jsx(ExpandLess,{sx:{marginLeft:"10px"}}):jsxRuntime.exports.jsx(ExpandMore,{sx:{marginLeft:"10px"}})]}))}))}))},SelectViewButton=({showSelected:e,onClick:s})=>{const t=useSelector(selectActiveResource);var r=resourceTypes.find(e=>e.id===t)||resourceTypes[0];return t===EResourceDropdownID.tdos?null:jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"rc-pm-resources-step-show-selected-btn",variant:"text",color:"primary",onClick:s},{children:e?SHARED_TEXT.resourcesStep.showAllToggle(r.dropdownLabel):SHARED_TEXT.resourcesStep.showSelectedToggle(r.dropdownLabel)}))},useStyles=makeStyles()(e=>({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(({intl:e,onChange:s,testId:t,isAvailable:r})=>{const a=useDispatch();var n=useStyles()["classes"];const[i,c]=react.exports.useState(!1);var o=useSelector(selectResourceStepSearchText);const l=react.exports.useCallback(debounce_1(e=>{s&&(s(e),c(!1))},1e3),[s]);var p=react.exports.useCallback(e=>{e=e.target.value;a(actions.resourcesStep.setSearchValue(e)),l(e),c(!0)},[l]);return jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r?"":"Search is not available yet for this Resource."},{children:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(TextField,{disabled:!r,"data-testid":"rc-pm-resources-step-search-input",sx:{"& fieldset":{borderRadius:"100px"},background:r?"":"#f7f7f7"},"data-test":t,onClick:e=>e.stopPropagation(),className:""+n.searchInput,onChange:p,value:o,placeholder:e.formatMessage({id:"rc.package-manager.resources.search-placeholder",defaultMessage:[{type:0,value:"Search by name"}]}),InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(Search,{})})),endAdornment:jsxRuntime.exports.jsxs(InputAdornment,Object.assign({position:"end"},{children:[i&&jsxRuntime.exports.jsx(CircularProgress,{size:20,thickness:5}),!i&&o&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.resourcesStep.search.clearSearch()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{s(""),a(actions.resourcesStep.setSearchValue("")),c(!1)}},{children:jsxRuntime.exports.jsx(Clear,{})}))}))]}))}})})}))}),ADD_FILES_BTN_ID="rc-package-manager-wizard-tdo-add-files-btn",AddFilesBtn=()=>{const s=useDispatch(),t=useSelector(selectIsFullscreenEnabled),r=react.exports.useCallback(e=>{s(unmountPanel(dataCenterFilePickerPanelID)),s(actions.tdos.addTDOs(e)),e.forEach(e=>{s(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}))})},[s,unmountPanel,actions]);return jsxRuntime.exports.jsx(Button,Object.assign({id:ADD_FILES_BTN_ID,startIcon:jsxRuntime.exports.jsx(Add,{}),variant:"contained",onClick:function(){var e=getTdoPickerPanelConfigs(r,t);s(mountPanel(Object.assign({},e)))},"data-testid":ADD_FILES_BTN_ID},{children:SHARED_TEXT.resourceTypes.tdo.addFilesButton()}))},ResourcesStep=()=>{const a=react.exports.useRef(null),n=useDispatch();var e=useSelector(selectActiveIndex);const s=useSelector(selectActiveResource);var t=useSelector(selectIsFiltersOpen);const r=useSelector(selectIsSelectedViewActive);var i=s===EResourceDropdownID.tdos;const c=0!==useSelector(selectActiveTDOs).length,o=useSelector(betaFeaturesSelector),l=useSelector(selectIsEditMode),p=useSelector(selectExistingPackageId);return react.exports.useEffect(()=>{x(s,"")},[s]),react.exports.useEffect(()=>{p&&l&&n(actions.resourcesStep.setIsSelectedViewActive(!1))},[p,l]),jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"column",flexGrow:"1"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-testid":"rc-pm-resources-step-description",variant:"subtitle1",padding:e=>e.spacing(3,0,3,0)},{children:SHARED_TEXT.resourcesStep.description})),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:5,sx:{margin:e=>e.spacing(3,0,3,0)}},{children:[jsxRuntime.exports.jsx(Select,Object.assign({id:"resource-cetner-package-manager-resource-type","data-testid":"rc-pm-resources-step-resource-type",value:e,onChange:e=>{var s,t=Number(e.target.value);n(actions.resourcesStep.setActiveIndex(t));for(const r of resourceTypes)t===r.dropdownIndex&&(n(actions.resourcesStep.setActiveResource(r.id)),null!=(s=a.current)&&s.scrollTo(0),r.id===EResourceDropdownID.tdos)&&(c||setTimeout(()=>{var e;try{null!=(e=document.querySelector("#"+ADD_FILES_BTN_ID))&&e.click()}catch(e){}},300))},sx:{width:"300px"}},{children:resourceTypes.sort((e,s)=>e.dropdownIndex-s.dropdownIndex).filter(e=>!e.isBehindBetaFlag||o).map((e,s)=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:s,"data-testid":"rc-pm-resource-type-option-"+s},{children:e.dropdownLabel}),"resource-center-package-manager-resource-type-"+s))})),jsxRuntime.exports.jsx(SearchInput,{isAvailable:getResourceTypeByDropdownIndex(e).isSearchAvailable,onChange:e=>{x(s,e),null!=(e=a.current)&&e.scrollTo(0)},testId:"package-manager-search-resources-input"}),jsxRuntime.exports.jsx(FiltersButton,{isAvailable:getResourceTypeByDropdownIndex(e).isFilterAvailable,"data-testid":"rc-pm-resources-step-toggle-filters-btn"})]})),jsxRuntime.exports.jsx(ResourceStepFilters,{resourceTypeSelected:getResourceTypeByDropdownIndex(e).resourceType,isVisible:t}),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:5,sx:{margin:e=>e.spacing(3,0,3,0)}},{children:[jsxRuntime.exports.jsx(SelectViewButton,{showSelected:r,onClick:()=>{var e;n(actions.resourcesStep.setIsSelectedViewActive(!r)),r||x(s,""),null!=(e=a.current)&&e.scrollTo(0)}}),i&&jsxRuntime.exports.jsx(AddFilesBtn,{})]})),jsxRuntime.exports.jsx(ResourcesTable,{resourceType:getResourceTypeByDropdownIndex(e),ref:a,showSelectedResources:r}),jsxRuntime.exports.jsx(Box,Object.assign({height:"70px"},{children:jsxRuntime.exports.jsx(PanelControls,{invalidFields:!1,disableNext:!1,disableBack:!1,nextButtonType:ENextButtonType.NEXT})}))]}));function x(e,s){var t;for(const r of resourceTypes){if(e===r.id&&e===EResourceDropdownID.flows)return;e===r.id&&e!==EResourceDropdownID.tdos&&(n(null==(t=actions[getResourceNamespace(r.id)])?void 0:t.setSearchValue(s)),n(actions[getResourceNamespace(r.id)].resetList(null)),n(actions[getResourceNamespace(r.id)].readStart(null)))}}};export{ResourcesStep as default};
|
package/js-core.esm118.js.gz
CHANGED
|
Binary file
|
package/js-core.esm121.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as selectOrgName,b as selectBusinessUnit,c as selectLogoPreviewImage,d as actions$3,e as actions,f as actions$2,p as panelId}from"./js-core.esm89.js";import"./js-core.esm122.js";import{y as useIntl,Z as useSelector,j as jsxRuntime,a1 as hidePanel}from"./js-core.esm.js";import{u as useBasicInfoStyles}from"./js-core.esm123.js";import{T as TextField,e as InputLabel,n as imageUpload}from"./js-core.esm6.js";import{T as Typography,k as FormattedMessage,F as FormControl,S as Select,U as MenuItem,h as Button}from"./js-core.esm5.js";import{B as Box}from"./js-core.esm27.js";import{A as Add}from"./js-core.esm72.js";import{u as useDispatch}from"./js-core.esm7.js";const businessUnitOptionsGetter=e=>[{id:"business-unit.media",value:"Media",label:e.formatMessage({id:"business-unit.media",defaultMessage:[{type:0,value:"Media"}]})},{id:"business-unit.politics",value:"Politics",label:e.formatMessage({id:"business-unit.politics",defaultMessage:[{type:0,value:"Politics"}]})},{id:"business-unit.legal",value:"Legal",label:e.formatMessage({id:"business-unit.legal",defaultMessage:[{type:0,value:"Legal"}]})},{id:"business-unit.ps",value:"PS",label:"PS"},{id:"business-unit.fed",value:"FED",label:"FED"},{id:"business-unit.edge",value:"EDGE",label:"EDGE"},{id:"business-unit.pmi",value:"PMI",label:"PMI"},{id:"business-unit.dsrd",value:"DSRD",label:"DSRD"},{id:"business-unit.v1",value:"V1",label:"V1"},{id:"business-unit.developer",value:"Developer",label:e.formatMessage({id:"business-unit.developer",defaultMessage:[{type:0,value:"Developer"}]})},{id:"business-unit.machinebox",value:"MachineBox",label:"MachineBox"},{id:"business-unit.varp",value:"VARP",label:"VARP"},{id:"business-unit.contentlicensing",value:"ContentLicensing",label:"ContentLicensing"},{id:"business-unit.hr",value:"HR",label:"HR"},{id:"business-unit.tablerock",value:"TableRock",label:"TableRock"},{id:"business-unit.redact-self-service",value:"Redact Self Service",label:"Redact"+e.formatMessage({id:"business-unit.self-service",defaultMessage:[{type:0,value:"Self Service"}]})}],{ImageUpload}=imageUpload["jsx"],BasicInfo=()=>{var e=useIntl();const s=useDispatch();var a=businessUnitOptionsGetter(e),t=useSelector(selectOrgName),i=useSelector(selectBusinessUnit),n=useSelector(selectLogoPreviewImage),o=useBasicInfoStyles()["classes"],l=t&&i;return jsxRuntime.exports.jsxs(Box,Object.assign({"data-testid":"instance-admin-center.create-org.basic-info-tab",className:o.container},{children:[jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",className:o.title},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.basic-info-title",defaultMessage:"Basic Information",description:"Basic Information title"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:o.description},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.basic-info-description",defaultMessage:"Begin by adding the basic information for this Organization.",description:"Basic Information description"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",className:o.logoTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.logo-title",defaultMessage:"Organization Logo",description:"Organization Logo title"})})),jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.recommended-label",defaultMessage:"Recommended",description:"Recommended label"}),": 250x250, JPEG or PNG"]})),jsxRuntime.exports.jsx(Box,Object.assign({className:o.logoContainer},{children:jsxRuntime.exports.jsx(ImageUpload,{getUrl:!0,image:n,handleChange:e=>{e.unsignedUrl?(s(actions$3.setOrgLogo(e.unsignedUrl)),s(actions$3.setLogoPreviewImage(e.getUrl))):(s(actions$3.setOrgLogo("")),s(actions$3.setLogoPreviewImage("")))},testId:"instance-admin-center.create-org.logo",fileTypes:"image/png, image/jpeg",uploadCustomIcon:jsxRuntime.exports.jsx(Add,{}),maxFileSize:15})})),jsxRuntime.exports.jsx(TextField,{className:o.input,label:t&&e.formatMessage({id:"basic-info.business-unit",defaultMessage:[{type:0,value:"Organization Name"}]}),placeholder:e.formatMessage({id:"basic-info.business-unit",defaultMessage:[{type:0,value:"Organization Name"}]}),value:t||"",onChange:e=>{e=e.target.value;s(actions$3.setOrgName(e))}}),jsxRuntime.exports.jsxs(FormControl,Object.assign({className:o.input},{children:[jsxRuntime.exports.jsx(InputLabel,Object.assign({className:o.placeholder},{children:e.formatMessage({id:"basic-info.business-unit",defaultMessage:[{type:0,value:"Business Unit"}]})})),jsxRuntime.exports.jsx(Select,Object.assign({value:i||"",onChange:e=>{e=e.target.value;s(actions$3.setBusinessUnit(e))}},{children:a.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.label}),e.id))}))]}))]}),jsxRuntime.exports.jsxs(Box,Object.assign({"data-testid":"instance-admin-center.create-org.basic-info.action-buttons",className:o.actionButtonsContainer},{children:[jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",className:o.cancelButton,onClick:()=>{s(hidePanel(panelId))}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.basic-info.cancel-btn",defaultMessage:"Cancel",description:"Cancel button label"})})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",disabled:!l,onClick:()=>{s(actions.setStepCompleted(1)),s(actions.setActiveStep(2)),s(actions$2.fetchDefaultPackagesStart())}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.basic-info.next-btn",defaultMessage:"Next",description:"Next button label"})}))]}))]}))};export{BasicInfo as default};
|
|
1
|
+
import{s as selectOrgName,b as selectBusinessUnit,c as selectLogoPreviewImage,d as actions$3,e as actions,f as actions$2,p as panelId}from"./js-core.esm89.js";import"./js-core.esm122.js";import{y as useIntl,Z as useSelector,j as jsxRuntime,a1 as hidePanel}from"./js-core.esm.js";import{u as useBasicInfoStyles}from"./js-core.esm123.js";import{T as TextField,e as InputLabel,n as imageUpload}from"./js-core.esm6.js";import{T as Typography,k as FormattedMessage,F as FormControl,S as Select,U as MenuItem,h as Button}from"./js-core.esm5.js";import{B as Box}from"./js-core.esm27.js";import{A as Add}from"./js-core.esm72.js";import{u as useDispatch}from"./js-core.esm7.js";const businessUnitOptionsGetter=e=>[{id:"business-unit.media",value:"Media",label:e.formatMessage({id:"business-unit.media",defaultMessage:[{type:0,value:"Media"}]})},{id:"business-unit.politics",value:"Politics",label:e.formatMessage({id:"business-unit.politics",defaultMessage:[{type:0,value:"Politics"}]})},{id:"business-unit.legal",value:"Legal",label:e.formatMessage({id:"business-unit.legal",defaultMessage:[{type:0,value:"Legal"}]})},{id:"business-unit.ps",value:"PS",label:"PS"},{id:"business-unit.fed",value:"FED",label:"FED"},{id:"business-unit.edge",value:"EDGE",label:"EDGE"},{id:"business-unit.pmi",value:"PMI",label:"PMI"},{id:"business-unit.dsrd",value:"DSRD",label:"DSRD"},{id:"business-unit.v1",value:"V1",label:"V1"},{id:"business-unit.developer",value:"Developer",label:e.formatMessage({id:"business-unit.developer",defaultMessage:[{type:0,value:"Developer"}]})},{id:"business-unit.machinebox",value:"MachineBox",label:"MachineBox"},{id:"business-unit.varp",value:"VARP",label:"VARP"},{id:"business-unit.contentlicensing",value:"ContentLicensing",label:"ContentLicensing"},{id:"business-unit.hr",value:"HR",label:"HR"},{id:"business-unit.tablerock",value:"TableRock",label:"TableRock"},{id:"business-unit.redact-self-service",value:"Redact Self Service",label:"Redact"+e.formatMessage({id:"business-unit.self-service",defaultMessage:[{type:0,value:"Self Service"}]})}],{ImageUpload}=imageUpload["jsx"],BasicInfo=()=>{var e=useIntl();const s=useDispatch();var a=businessUnitOptionsGetter(e),t=useSelector(selectOrgName),i=useSelector(selectBusinessUnit),n=useSelector(selectLogoPreviewImage),o=useBasicInfoStyles()["classes"],l=t&&i;return jsxRuntime.exports.jsxs(Box,Object.assign({"data-testid":"instance-admin-center.create-org.basic-info-tab",className:o.container},{children:[jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",className:o.title},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.basic-info-title",defaultMessage:"Basic Information",description:"Basic Information title"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:o.description},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.basic-info-description",defaultMessage:"Begin by adding the basic information for this Organization.",description:"Basic Information description"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",className:o.logoTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.logo-title",defaultMessage:"Organization Logo",description:"Organization Logo title"})})),jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.recommended-label",defaultMessage:"Recommended",description:"Recommended label"}),": 250x250, JPEG or PNG"]})),jsxRuntime.exports.jsx(Box,Object.assign({className:o.logoContainer},{children:jsxRuntime.exports.jsx(ImageUpload,{getUrl:!0,image:n,handleChange:e=>{e.unsignedUrl?(s(actions$3.setOrgLogo(e.unsignedUrl)),s(actions$3.setLogoPreviewImage(e.getUrl))):(s(actions$3.setOrgLogo("")),s(actions$3.setLogoPreviewImage("")))},testId:"instance-admin-center.create-org.logo",fileTypes:"image/png, image/jpeg",uploadCustomIcon:jsxRuntime.exports.jsx(Add,{}),maxFileSize:15})})),jsxRuntime.exports.jsx(TextField,{className:o.input,label:t&&e.formatMessage({id:"basic-info.business-unit",defaultMessage:[{type:0,value:"Organization Name"}]}),placeholder:e.formatMessage({id:"basic-info.business-unit",defaultMessage:[{type:0,value:"Organization Name"}]}),value:t||"",onChange:e=>{e=e.target.value;s(actions$3.setOrgName(e))},"data-testid":"instance-admin-center.create-org.basic-info.name"}),jsxRuntime.exports.jsxs(FormControl,Object.assign({className:o.input},{children:[jsxRuntime.exports.jsx(InputLabel,Object.assign({className:o.placeholder},{children:e.formatMessage({id:"basic-info.business-unit",defaultMessage:[{type:0,value:"Business Unit"}]})})),jsxRuntime.exports.jsx(Select,Object.assign({value:i||"",onChange:e=>{e=e.target.value;s(actions$3.setBusinessUnit(e))},"data-testid":"instance-admin-center.create-org.basic-info.business-unit"},{children:a.map((e,s)=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:null==e?void 0:e.value,"data-testid":"select-option-"+(s+1)},{children:null==e?void 0:e.label}),e.id))}))]}))]}),jsxRuntime.exports.jsxs(Box,Object.assign({"data-testid":"instance-admin-center.create-org.basic-info.action-buttons",className:o.actionButtonsContainer},{children:[jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",className:o.cancelButton,onClick:()=>{s(hidePanel(panelId))},"data-testid":"cancel"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.basic-info.cancel-btn",defaultMessage:"Cancel",description:"Cancel button label"})})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",disabled:!l,onClick:()=>{s(actions.setStepCompleted(1)),s(actions.setActiveStep(2)),s(actions$2.fetchDefaultPackagesStart())},"data-testid":"next"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.basic-info.next-btn",defaultMessage:"Next",description:"Next button label"})}))]}))]}))};export{BasicInfo as default};
|
package/js-core.esm121.js.gz
CHANGED
|
Binary file
|
package/js-core.esm124.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as selectResourcePagination,w as selectPackagesStatus,x as selectPackages,y as selectSelectedPackages,f as actions$2,z as selectActiveStep,e as actions}from"./js-core.esm89.js";import{j as jsxRuntime,Z as useSelector,r as react,y as useIntl,dJ as selectIsFullscreenEnabled,ar as mountPanel,a1 as hidePanel}from"./js-core.esm.js";import{p as debounce_1,ax as Stack,T as TextField,j as InputAdornment,K as Search,A as Avatar,
|
|
1
|
+
import{v as selectResourcePagination,w as selectPackagesStatus,x as selectPackages,y as selectSelectedPackages,f as actions$2,z as selectActiveStep,e as actions}from"./js-core.esm89.js";import{j as jsxRuntime,Z as useSelector,r as react,y as useIntl,dJ as selectIsFullscreenEnabled,ar as mountPanel,a1 as hidePanel}from"./js-core.esm.js";import{p as debounce_1,ax as Stack,T as TextField,j as InputAdornment,K as Search,A as Avatar,aH as truncatedString,d as Tooltip,c as CheckCircle,t as tableInfiniteScroll}from"./js-core.esm6.js";import{a as usePackageStyles,b as usePackageButtonsStyles,c as usePackageRowStyles}from"./js-core.esm123.js";import{c as createSvgIcon,k as FormattedMessage,T as Typography,S as Select,U as MenuItem,h as Button,ae as Grid,dl as Applications,dm as Engines2,D as Divider}from"./js-core.esm5.js";import{B as Box}from"./js-core.esm27.js";import{A as AddCircleOutline}from"./js-core.esm83.js";import{u as useDispatch}from"./js-core.esm7.js";var InfoOutlined=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");const ResourceControls=({showSelectedResources:s,setShowSelectedResources:t,setPackageNameFilter:a})=>{var e=[{value:"application",label:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.application",defaultMessage:"Application Package",description:"Resource type label"})},{value:"engine",label:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.engine",defaultMessage:"Engine Package",description:"Resource type label"})}];const r=useDispatch();var i=useIntl(),o=useSelector(selectResourcePagination)["resourceTypeToFetch"],n=useSelector(selectSelectedPackages);const c=usePackageStyles()["classes"];var n=s?jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org.show-all",defaultMessage:"Show All",description:"Show All description"}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org.show-selected",defaultMessage:"Show Selected",description:"Show Selected description"})," ","(",n.length,")"]}),l=debounce_1(e=>{a(e.target.value)},300);return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{paddingTop:"30px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",className:c.stepTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org-panel.packages.step-title",defaultMessage:"Provision Packages",description:"Packages step title"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org-panel.packages.step-description",defaultMessage:"Select which packages will be available to this Organization and its users. Packages contain aiWARE resources such as applications, engines, workflows and many more.",description:"Packages step description"})})),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:5,className:c.controlsContainer},{children:[jsxRuntime.exports.jsx(Select,Object.assign({id:"create-org-panel.packages.select-resource-type","data-testid":"create-org-panel.packages.select-resource-type",className:c.selectResourceType,value:o,onChange:e=>{r(actions$2.setResourceTypeToFetch(e.target.value)),s&&t(!1)}},{children:e.map(({value:e,label:s})=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e,"data-testid":"create-org-resource-type."+e},{children:jsxRuntime.exports.jsx(Typography,Object.assign({className:c.dropdownLabel},{children:s}))}),"create-org-resource-type."+e))})),jsxRuntime.exports.jsx(TextField,{onChange:l,className:c.resourceFilter,placeholder:i.formatMessage({id:"create-org-resource-type.search-placeholder",defaultMessage:[{type:0,value:"Search by name"}]}),InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(Search,{})}))}})]})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",onClick:()=>t(e=>!e),className:c.showRecords},{children:n}))]}))},ResourceRow=({item:s})=>{var e=usePackageRowStyles()["classes"],t=useSelector(selectSelectedPackages),a=useSelector(selectResourcePagination)["resourceTypeToFetch"],t=t.find(e=>e.id===s.id);const r=useSelector(selectIsFullscreenEnabled),i=useDispatch();var o=e=>{e.stopPropagation(),e.preventDefault(),i(actions$2.togglePackageSelection(s))};return jsxRuntime.exports.jsxs(Box,Object.assign({className:e.gridContainer},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,className:e.gridContainer},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:1},{children:jsxRuntime.exports.jsx(Box,Object.assign({className:e.packageLogoContainer},{children:s.icon?jsxRuntime.exports.jsx(Avatar,{src:s.icon,sx:{border:"2px solid #FFFFFF",height:"100%",width:"100%",color:"white"}}):jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:"application"===a?jsxRuntime.exports.jsx(Applications,{}):jsxRuntime.exports.jsx(Engines2,{})})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:8,className:e.packageName},{children:truncatedString(s.name,40)})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:1,className:e.version},{children:s.version})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:1},{children:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.package-info",defaultMessage:"Package Info",description:"Package Info icon"})},{children:jsxRuntime.exports.jsx(InfoOutlined,{className:e.addIcon,onClick:()=>{i(mountPanel({panelId:"PACKAGE_DETAILS_PANEL_"+s.id,microFrontend:{name:"PACKAGE_DETAILS_PANEL",config:{panelConfig:{data:{packageId:s.id,tabsToShow:{info:{defaultPackageData:["name","status","owner","installDate","distributionDate","lastUpdated","distributionType","primaryResourceType","version"]},resources:["schema","engine","package"]}},labels:{},actions:{handleClose:()=>i(hidePanel("PACKAGE_DETAILS_PANEL_"+s.id))},settings:{unstyledHeader:!0}}}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:r?0:55,marginStart:r?0:80,size:"large",parentPanelId:"RESOURCE_CENTER",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0}}))}})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:1},{children:t?jsxRuntime.exports.jsx(CheckCircle,{className:e.addedIcon,onClick:o}):jsxRuntime.exports.jsx(AddCircleOutline,{className:e.addIcon,onClick:o})}))]})),jsxRuntime.exports.jsx(Divider,{className:e.tableDivider})]}))},ActionButtons=({onNextClick:e})=>{var s=usePackageButtonsStyles()["classes"];const t=useDispatch(),a=useSelector(selectActiveStep);return jsxRuntime.exports.jsxs(Box,Object.assign({className:s.actionButtonContainer},{children:[jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",onClick:()=>t(actions.setActiveStep(a-1)),"data-testid":"action-button.back"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.packages.back-btn",defaultMessage:"Back",description:"Back label"})})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",onClick:()=>{e&&e(),t(actions.setActiveStep(a+1))},"data-testid":"action-button.next"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"instance-admin-center.create-org.packages.next-btn",defaultMessage:"Next",description:"Next label"})}))]}))},{TableInfiniteScroll}=tableInfiniteScroll["jsx"],Packages=()=>{const e=useDispatch(),{resourceTypeToFetch:s,hasMore:t,offset:a}=useSelector(selectResourcePagination),r=react.exports.useRef(null),i=useSelector(selectPackagesStatus),o=useSelector(selectPackages),n=useSelector(selectSelectedPackages),[c,l]=react.exports.useState(""),[d,x]=react.exports.useState(!1),p=usePackageStyles()["classes"],u=(react.exports.useEffect(()=>{e(actions$2.fetchPackagesStart({filter:c,reset:!0}))},[c]),()=>e(actions$2.fetchPackagesStart({filter:c,reset:!1}))),g=jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org.packages.empty-state",defaultMessage:"No packages are selected",description:"Empty state label"}),m=jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org.packages.error-state",defaultMessage:"Error loading packages. Please try again later",description:"Error state label"});return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{height:"100%"}},{children:[jsxRuntime.exports.jsx(ResourceControls,{showSelectedResources:d,setShowSelectedResources:x,packageNameFilter:c,setPackageNameFilter:l}),d?jsxRuntime.exports.jsx(Box,Object.assign({className:p.container},{children:jsxRuntime.exports.jsx(TableInfiniteScroll,{offset:0,hasMore:!1,fetchMore:u,fetchOnMount:!1,items:n,itemHeight:60,isLoading:!1,error:"failure"===i,TableRowComponent:ResourceRow,MessageEmptyState:g,MessageErrorState:m,listRef:r},s)})):jsxRuntime.exports.jsx(Box,Object.assign({className:p.container},{children:jsxRuntime.exports.jsx(TableInfiniteScroll,{offset:a,hasMore:t,fetchMore:u,fetchOnMount:0===o.length,items:o,itemHeight:60,isLoading:"loading"===i,error:"failure"===i,TableRowComponent:ResourceRow,MessageEmptyState:g,MessageErrorState:m,listRef:r},s)})),jsxRuntime.exports.jsx(ActionButtons,{})]}))};export{Packages as default};
|
package/js-core.esm124.js.gz
CHANGED
|
Binary file
|
package/js-core.esm125.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as selectDefaultApplication,D as selectOlpEnabled,E as selectAutoApproveEnginesEnabled,F as selectDataRetentionPolicyEnabled,G as selectDataRetentionPolicyDays,H as selectApplications,I as actions$1,e as actions}from"./js-core.esm89.js";import"./js-core.esm122.js";import{Z as useSelector,r as react,j as jsxRuntime,ao as Box}from"./js-core.esm.js";import{T as Typography,S as Select,U as MenuItem,bc as Edit,h as Button,k as FormattedMessage,ar as OrgFilled}from"./js-core.esm5.js";import{l as Stack,I as IconButton,aa as FixedSizeList,ak as Check,A as Avatar,y as panelComponents}from"./js-core.esm6.js";import{S as Switch,p as ListItemButton,a as ListItemIcon}from"./js-core.esm2.js";import{L as ListItem,b as ListItemText}from"./js-core.esm3.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm4.js";const SHARED_TEXT={orgSettingsStep:{title:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.title",defaultMessage:"Organization Settings",description:"Create Org Org Settings Step Title"}),description:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.description",defaultMessage:"Manage settings for all users of this Organization.",description:"Create Org Org Settings Step Description"}),backBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.back-btn",defaultMessage:"Back",description:"Create Org Org Settings Step Back Button"}),saveBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.save-btn",defaultMessage:"Create Organization",description:"Create Org Org Settings Step Save Button"}),olpTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.olp-title",defaultMessage:"Object Level Permissions",description:"Org Settings Step OLP Title"}),olpDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.olp-description",defaultMessage:"Enabling this feature will include OLP features in Admin Center, enable default permission sets and groups, and apply them to all current Folders and Objects in the account.",description:"Org Settings Step OLP Description"}),firstLoadApplicationSettingTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.first-load-application-setting-title",defaultMessage:"First Load Application",description:"First Load Application Setting Title"}),dataRetentionPolicySettingTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.data-retention-policy-setting-title",defaultMessage:"Data Retention Policy",description:"Data Retention Policy Setting Title"}),dataRetentionPolicySettingDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.data-retention-policy-setting-description",defaultMessage:"Manage the default time that data is retained for this Organization.",description:"Data Retention Policy Setting Description"}),dataRetentionPolicySetting30Days:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.data-retention-policy-setting-30-days",defaultMessage:"30 days",description:"Data Retention Policy Setting 30 Days"}),dataRetentionPolicySetting90Days:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.data-retention-policy-setting-90-days",defaultMessage:"90 days",description:"Data Retention Policy Setting 90 Days"}),dataRetentionPolicySetting15Months:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.data-retention-policy-setting-15-months",defaultMessage:"15 months",description:"Data Retention Policy Setting 15 Months"}),autoApproveEnginesSettingTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.auto-approve-engines-setting-title",defaultMessage:"Auto Approve Engines",description:"Auto Approve Engines Setting Title"}),autoApproveEnginesSettingDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.auto-approve-engines-setting-description",defaultMessage:"Any Engine built in aiWARE Developer will not require approval from an Organization Administrator and will be automatically changed to an approved status.",description:"Auto Approve Engines Setting Description"})},orgSettingsStepModal:{firstLoadApplicationModalDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.first-load-application-modal-description",defaultMessage:"Select the first application that will be loaded when a user logs into aiWARE.",description:"First Load Application Modal Description"}),doneBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.done-btn",defaultMessage:"Done",description:"Create Org Org Settings Step Done Button"})}},PanelModal=panelComponents["modal"],FirstLoadApplicationModal=({id:e,isOpen:t,applications:i,onSelectedApplication:n,handleClose:s,defaultLoadApplication:o})=>{const[a,r]=react.exports.useState(null==(o=null==o?void 0:o.primaryResource)?void 0:o.resourceId);return jsxRuntime.exports.jsx(PanelModal,{"data-test":"first-application-modal-"+e,sx:{maxHeight:"95vh"},ContainerProps:{sx:{width:"100%",padding:"15px 30px",boxSizing:"border-box",overflow:"hidden"}},isOpen:t,onClose:s,title:"First Load Application",content:jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",alignItems:"center",sx:{height:"90%",position:"relative",overflow:"auto"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:400,fontSize:"14px",marginBottom:"30px"}},{children:SHARED_TEXT.orgSettingsStepModal.firstLoadApplicationModalDescription()})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{width:"100%",height:250,maxWidth:550,bgcolor:"background.paper"}},{children:jsxRuntime.exports.jsx(FixedSizeList,Object.assign({height:250,width:"100%",itemSize:60,itemCount:i.length,overscanCount:5},{children:({index:t,style:e})=>{var s=(null==(s=null==(s=i[t])?void 0:s.primaryResource)?void 0:s.resourceId)===a;return jsxRuntime.exports.jsx(ListItem,Object.assign({style:e,component:"div",disablePadding:!0,secondaryAction:s&&jsxRuntime.exports.jsx(IconButton,Object.assign({sx:{marginRight:"10px"}},{children:jsxRuntime.exports.jsx(Check,{sx:{color:"rgba(56, 142, 60, 1)"}})}))},{children:jsxRuntime.exports.jsx(Stack,Object.assign({direction:"row",justifyContent:"space-between",sx:{width:"100%"}},{children:jsxRuntime.exports.jsxs(ListItemButton,Object.assign({selected:s,onClick:()=>{var e;r(null==(e=null==(e=i[t])?void 0:e.primaryResource)?void 0:e.resourceId),n(i[t])}},{children:[jsxRuntime.exports.jsx(ListItemIcon,Object.assign({sx:{marginRight:"20px"}},{children:jsxRuntime.exports.jsx(Avatar,{children:jsxRuntime.exports.jsx(OrgFilled,{})})})),jsxRuntime.exports.jsx(ListItemText,{primary:null==(e=i[t])?void 0:e.name})]}))}))}),t)}}))}))]})),jsxRuntime.exports.jsx(Footer$1,{onSave:s,isSaveDisabled:!1})]}))})},Footer$1=({onSave:e,isSaveDisabled:t})=>jsxRuntime.exports.jsx(Stack,Object.assign({direction:"row",sx:{padding:"0 0 10px 30px",display:"flex",justifyContent:"flex-end",height:"10%",alignItems:"center"}},{children:jsxRuntime.exports.jsx(Button,Object.assign({onClick:e,disabled:t,variant:"contained","data-testid":"admin-center-custom-login--save-btn"},{children:SHARED_TEXT.orgSettingsStepModal.doneBtn()}))})),RowSetting=({isFirstItem:e=!1,title:t,description:s,textDirection:i="column",bottomBorder:n=!0,renderLeftComponent:o,renderRightComponent:a})=>jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",sx:{borderBottom:n?"0.5px solid #dadfe8":"0",paddingBottom:"25px",paddingTop:e?"0":"25px",width:"100%"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:i,sx:{width:"506px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5",sx:{fontWeight:600,fontSize:"14px",marginBottom:"5px"}},{children:t})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:400,fontSize:"12px",lineHeight:"16px"}},{children:s})),o&&o()]})),a&&a()]})),OrganizationSettingsStep=()=>{const t=useDispatch(),s=useSelector(selectDefaultApplication),[e,i]=react.exports.useState(s),[n,o]=react.exports.useState(!1),a=useSelector(selectOlpEnabled),r=useSelector(selectAutoApproveEnginesEnabled),p=useSelector(selectDataRetentionPolicyEnabled),c=useSelector(selectDataRetentionPolicyDays);var d=useSelector(selectApplications);react.exports.useEffect(()=>{t(actions$1.fetchApplicationsInit())},[]),react.exports.useEffect(()=>{var e;s&&t(actions$1.setFirstLoadApplicationId(null==(e=null===s||void 0===s?void 0:s.primaryResource)?void 0:e.resourceId))},[]);const g=react.exports.useCallback(e=>{i(e),t(actions$1.setFirstLoadApplicationId(null==(e=null==e?void 0:e.primaryResource)?void 0:e.resourceId))},[]);return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between",paddingTop:"30px",paddingBottom:"30px"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",gap:"20px",sx:{height:"90%",position:"relative",overflow:"auto"}},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginBottom:"10px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{fontWeight:600,fontSize:"16px",marginBottom:"5px",marginTop:"0"}},{children:SHARED_TEXT.orgSettingsStep.title()})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:400,fontSize:"14px"}},{children:SHARED_TEXT.orgSettingsStep.description()}))]})),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{paddingLeft:"10px"}},{children:[jsxRuntime.exports.jsx(RowSetting,{isFirstItem:!0,title:SHARED_TEXT.orgSettingsStep.olpTitle(),description:SHARED_TEXT.orgSettingsStep.olpDescription(),renderRightComponent:()=>jsxRuntime.exports.jsx(Switch,{checked:a,onChange:()=>{t(actions$1.setOlpEnabled(!a))}})}),jsxRuntime.exports.jsx(RowSetting,{title:SHARED_TEXT.orgSettingsStep.autoApproveEnginesSettingTitle(),description:SHARED_TEXT.orgSettingsStep.autoApproveEnginesSettingDescription(),renderRightComponent:()=>jsxRuntime.exports.jsx(Switch,{checked:r,onChange:()=>{t(actions$1.setAutoApproveEnginesEnabled(!r))}})}),jsxRuntime.exports.jsx(RowSetting,{title:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySettingTitle(),description:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySettingDescription(),renderLeftComponent:()=>jsxRuntime.exports.jsxs(Select,Object.assign({disabled:!p,value:c,onChange:e=>{e=Number(e.target.value);t(actions$1.setDataRetentionPolicyDays(e))},size:"small",sx:{width:"230px",marginTop:"20px"}},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"30"},{children:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting30Days()})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"90"},{children:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting90Days()})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"457"},{children:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting15Months()}))]})),renderRightComponent:()=>jsxRuntime.exports.jsx(Switch,{checked:p,onChange:()=>{t(actions$1.setDataRetentionPolicyEnabled(!p))}})}),jsxRuntime.exports.jsx(RowSetting,{textDirection:"row",renderLeftComponent:()=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({sx:{fontWeight:400,fontSize:"14px"}},{children:SHARED_TEXT.orgSettingsStep.firstLoadApplicationSettingTitle()})),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{fontWeight:600,fontSize:"14px",marginLeft:"20px"}},{children:(null===e||void 0===e?void 0:e.name)||"--"}))]}),renderRightComponent:()=>jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>o(!n)},{children:jsxRuntime.exports.jsx(Edit,{})}))})]})),jsxRuntime.exports.jsx(FirstLoadApplicationModal,{id:"test",applications:d,isOpen:n,onSelectedApplication:e=>{g(e)},handleClose:()=>o(!1),defaultLoadApplication:s})]})),jsxRuntime.exports.jsx(Footer,{onBack:()=>t(actions.setActiveStep(2)),onSave:()=>{t(actions.saveCreateOrgInit())},isSaveDisabled:!1})]}))},Footer=({onBack:e,onSave:t,isSaveDisabled:s})=>jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",sx:{padding:"60px 0 0 30px",display:"flex",justifyContent:"flex-end",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(Button,Object.assign({onClick:e,disabled:!1,variant:"text","data-testid":"admin-center-custom-login--back-btn",sx:{marginRight:"15px"}},{children:SHARED_TEXT.orgSettingsStep.backBtn()})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:t,disabled:s,variant:"contained","data-testid":"admin-center-custom-login--save-btn"},{children:SHARED_TEXT.orgSettingsStep.saveBtn()}))]}));export{OrganizationSettingsStep as default};
|
|
1
|
+
import{B as selectDefaultApplication,D as selectOlpEnabled,E as selectAutoApproveEnginesEnabled,F as selectDataRetentionPolicyEnabled,G as selectDataRetentionPolicyDays,H as selectApplications,I as actions$1,e as actions}from"./js-core.esm89.js";import"./js-core.esm122.js";import{Z as useSelector,r as react,j as jsxRuntime,ao as Box}from"./js-core.esm.js";import{T as Typography,S as Select,U as MenuItem,bc as Edit,h as Button,k as FormattedMessage,ar as OrgFilled}from"./js-core.esm5.js";import{l as Stack,I as IconButton,aa as FixedSizeList,ak as Check,A as Avatar,y as panelComponents}from"./js-core.esm6.js";import{S as Switch,p as ListItemButton,a as ListItemIcon}from"./js-core.esm2.js";import{L as ListItem,b as ListItemText}from"./js-core.esm3.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm4.js";const SHARED_TEXT={orgSettingsStep:{title:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.title",defaultMessage:"Organization Settings",description:"Create Org Org Settings Step Title"}),description:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.description",defaultMessage:"Manage settings for all users of this Organization.",description:"Create Org Org Settings Step Description"}),backBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.back-btn",defaultMessage:"Back",description:"Create Org Org Settings Step Back Button"}),saveBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.save-btn",defaultMessage:"Create Organization",description:"Create Org Org Settings Step Save Button"}),olpTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.olp-title",defaultMessage:"Object Level Permissions",description:"Org Settings Step OLP Title"}),olpDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.olp-description",defaultMessage:"Enabling this feature will include OLP features in Admin Center, enable default permission sets and groups, and apply them to all current Folders and Objects in the account.",description:"Org Settings Step OLP Description"}),firstLoadApplicationSettingTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.first-load-application-setting-title",defaultMessage:"First Load Application",description:"First Load Application Setting Title"}),dataRetentionPolicySettingTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.data-retention-policy-setting-title",defaultMessage:"Data Retention Policy",description:"Data Retention Policy Setting Title"}),dataRetentionPolicySettingDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.data-retention-policy-setting-description",defaultMessage:"Manage the default time that data is retained for this Organization.",description:"Data Retention Policy Setting Description"}),dataRetentionPolicySetting30Days:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.data-retention-policy-setting-30-days",defaultMessage:"30 days",description:"Data Retention Policy Setting 30 Days"}),dataRetentionPolicySetting90Days:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.data-retention-policy-setting-90-days",defaultMessage:"90 days",description:"Data Retention Policy Setting 90 Days"}),dataRetentionPolicySetting15Months:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.data-retention-policy-setting-15-months",defaultMessage:"15 months",description:"Data Retention Policy Setting 15 Months"}),autoApproveEnginesSettingTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.auto-approve-engines-setting-title",defaultMessage:"Auto Approve Engines",description:"Auto Approve Engines Setting Title"}),autoApproveEnginesSettingDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.auto-approve-engines-setting-description",defaultMessage:"Any Engine built in aiWARE Developer will not require approval from an Organization Administrator and will be automatically changed to an approved status.",description:"Auto Approve Engines Setting Description"})},orgSettingsStepModal:{firstLoadApplicationModalDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.first-load-application-modal-description",defaultMessage:"Select the first application that will be loaded when a user logs into aiWARE.",description:"First Load Application Modal Description"}),doneBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-orgs.create-org.org-settings-step.done-btn",defaultMessage:"Done",description:"Create Org Org Settings Step Done Button"})}},PanelModal=panelComponents["modal"],FirstLoadApplicationModal=({id:t,isOpen:e,applications:i,onSelectedApplication:n,handleClose:s,defaultLoadApplication:o})=>{const[a,r]=react.exports.useState(null==(o=null==o?void 0:o.primaryResource)?void 0:o.resourceId);return jsxRuntime.exports.jsx(PanelModal,{"data-test":"first-application-modal-"+t,sx:{maxHeight:"95vh"},ContainerProps:{sx:{width:"100%",padding:"15px 30px",boxSizing:"border-box",overflow:"hidden"}},isOpen:e,onClose:s,title:"First Load Application",content:jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",alignItems:"center",sx:{height:"90%",position:"relative",overflow:"auto"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:400,fontSize:"14px",marginBottom:"30px"}},{children:SHARED_TEXT.orgSettingsStepModal.firstLoadApplicationModalDescription()})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{width:"100%",height:250,maxWidth:550,bgcolor:"background.paper"}},{children:jsxRuntime.exports.jsx(FixedSizeList,Object.assign({height:250,width:"100%",itemSize:60,itemCount:i.length,overscanCount:5},{children:({index:e,style:t})=>{var s=(null==(s=null==(s=i[e])?void 0:s.primaryResource)?void 0:s.resourceId)===a;return jsxRuntime.exports.jsx(ListItem,Object.assign({style:t,component:"div",disablePadding:!0,secondaryAction:s&&jsxRuntime.exports.jsx(IconButton,Object.assign({sx:{marginRight:"10px"}},{children:jsxRuntime.exports.jsx(Check,{sx:{color:"rgba(56, 142, 60, 1)"}})}))},{children:jsxRuntime.exports.jsx(Stack,Object.assign({direction:"row",justifyContent:"space-between",sx:{width:"100%"}},{children:jsxRuntime.exports.jsxs(ListItemButton,Object.assign({selected:s,onClick:()=>{var t;r(null==(t=null==(t=i[e])?void 0:t.primaryResource)?void 0:t.resourceId),n(i[e])}},{children:[jsxRuntime.exports.jsx(ListItemIcon,Object.assign({sx:{marginRight:"20px"}},{children:jsxRuntime.exports.jsx(Avatar,{children:jsxRuntime.exports.jsx(OrgFilled,{})})})),jsxRuntime.exports.jsx(ListItemText,{primary:null==(t=i[e])?void 0:t.name})]}))}))}),e)}}))}))]})),jsxRuntime.exports.jsx(Footer$1,{onSave:s,isSaveDisabled:!1})]}))})},Footer$1=({onSave:t,isSaveDisabled:e})=>jsxRuntime.exports.jsx(Stack,Object.assign({direction:"row",sx:{padding:"0 0 10px 30px",display:"flex",justifyContent:"flex-end",height:"10%",alignItems:"center"}},{children:jsxRuntime.exports.jsx(Button,Object.assign({onClick:t,disabled:e,variant:"contained","data-testid":"admin-center-custom-login--save-btn"},{children:SHARED_TEXT.orgSettingsStepModal.doneBtn()}))})),RowSetting=({isFirstItem:t=!1,title:e,description:s,textDirection:i="column",bottomBorder:n=!0,renderLeftComponent:o,renderRightComponent:a})=>jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",sx:{borderBottom:n?"0.5px solid #dadfe8":"0",paddingBottom:"25px",paddingTop:t?"0":"25px",width:"100%"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:i,sx:{width:"506px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5",sx:{fontWeight:600,fontSize:"14px",marginBottom:"5px"}},{children:e})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:400,fontSize:"12px",lineHeight:"16px"}},{children:s})),o&&o()]})),a&&a()]})),OrganizationSettingsStep=()=>{const e=useDispatch(),s=useSelector(selectDefaultApplication),[t,i]=react.exports.useState(s),[n,o]=react.exports.useState(!1),a=useSelector(selectOlpEnabled),r=useSelector(selectAutoApproveEnginesEnabled),p=useSelector(selectDataRetentionPolicyEnabled),c=useSelector(selectDataRetentionPolicyDays);var d=useSelector(selectApplications);react.exports.useEffect(()=>{e(actions$1.fetchApplicationsInit())},[]),react.exports.useEffect(()=>{var t;s&&e(actions$1.setFirstLoadApplicationId(null==(t=null===s||void 0===s?void 0:s.primaryResource)?void 0:t.resourceId))},[]);const g=react.exports.useCallback(t=>{i(t),e(actions$1.setFirstLoadApplicationId(null==(t=null==t?void 0:t.primaryResource)?void 0:t.resourceId))},[]);return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between",paddingTop:"30px",paddingBottom:"30px"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",gap:"20px",sx:{height:"90%",position:"relative",overflow:"auto"}},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginBottom:"10px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{fontWeight:600,fontSize:"16px",marginBottom:"5px",marginTop:"0"}},{children:SHARED_TEXT.orgSettingsStep.title()})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:400,fontSize:"14px"}},{children:SHARED_TEXT.orgSettingsStep.description()}))]})),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{paddingLeft:"10px"}},{children:[jsxRuntime.exports.jsx(RowSetting,{isFirstItem:!0,title:SHARED_TEXT.orgSettingsStep.olpTitle(),description:SHARED_TEXT.orgSettingsStep.olpDescription(),renderRightComponent:()=>jsxRuntime.exports.jsx(Switch,{"data-testid":"settings-is-olp-enabled",checked:a,onChange:()=>{e(actions$1.setOlpEnabled(!a))}})}),jsxRuntime.exports.jsx(RowSetting,{title:SHARED_TEXT.orgSettingsStep.autoApproveEnginesSettingTitle(),description:SHARED_TEXT.orgSettingsStep.autoApproveEnginesSettingDescription(),renderRightComponent:()=>jsxRuntime.exports.jsx(Switch,{"data-testid":"settings-is-auto-approve-engines-enabled",checked:r,onChange:()=>{e(actions$1.setAutoApproveEnginesEnabled(!r))}})}),jsxRuntime.exports.jsx(RowSetting,{title:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySettingTitle(),description:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySettingDescription(),renderLeftComponent:()=>jsxRuntime.exports.jsxs(Select,Object.assign({"data-testid":"settings-data-retention-policy",disabled:!p,value:c,onChange:t=>{t=Number(t.target.value);e(actions$1.setDataRetentionPolicyDays(t))},size:"small",sx:{width:"230px",marginTop:"20px"}},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"30","data-testid":"settings-data-retention-policy-30"},{children:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting30Days()})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"90","data-testid":"settings-data-retention-policy-90"},{children:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting90Days()})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"457","data-testid":"settings-data-retention-policy-457"},{children:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting15Months()}))]})),renderRightComponent:()=>jsxRuntime.exports.jsx(Switch,{"data-testid":"settings-is-data-retention-enabled",checked:p,onChange:()=>{e(actions$1.setDataRetentionPolicyEnabled(!p))}})}),jsxRuntime.exports.jsx(RowSetting,{"data-testid":"settings-first-load-application",textDirection:"row",renderLeftComponent:()=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({sx:{fontWeight:400,fontSize:"14px"}},{children:SHARED_TEXT.orgSettingsStep.firstLoadApplicationSettingTitle()})),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{fontWeight:600,fontSize:"14px",marginLeft:"20px"}},{children:(null===t||void 0===t?void 0:t.name)||"--"}))]}),renderRightComponent:()=>jsxRuntime.exports.jsx(IconButton,Object.assign({"data-testid":"settings-first-load-application-button",onClick:()=>o(!n)},{children:jsxRuntime.exports.jsx(Edit,{})}))})]})),jsxRuntime.exports.jsx(FirstLoadApplicationModal,{id:"test",applications:d,isOpen:n,onSelectedApplication:t=>{g(t)},handleClose:()=>o(!1),defaultLoadApplication:s})]})),jsxRuntime.exports.jsx(Footer,{onBack:()=>e(actions.setActiveStep(2)),onSave:()=>{e(actions.saveCreateOrgInit())},isSaveDisabled:!1})]}))},Footer=({onBack:t,onSave:e,isSaveDisabled:s})=>jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",sx:{padding:"60px 0 0 30px",display:"flex",justifyContent:"flex-end",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(Button,Object.assign({onClick:t,disabled:!1,variant:"text","data-testid":"admin-center-custom-login--back-btn",sx:{marginRight:"15px"}},{children:SHARED_TEXT.orgSettingsStep.backBtn()})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:e,disabled:s,variant:"contained","data-testid":"admin-center-custom-login--save-btn"},{children:SHARED_TEXT.orgSettingsStep.saveBtn()}))]}));export{OrganizationSettingsStep as default};
|
package/js-core.esm125.js.gz
CHANGED
|
Binary file
|
package/js-core.esm19.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aq as unmountPanel$1,a1 as hidePanel$1,dT as unmountAllPanel$1,dU as getUniqueID,ar as mountPanel$1,bK as AvailableWidgets,bJ as updatePanelMicroFrontendProps,dV as mountWidget,dW as unmountWidget,dX as updateTokenRequest,dY as HelpCenter,D as takeEvery$1,dZ as mountPanelForResponse$1,d_ as DataCenter,E as select}from"./js-core.esm.js";import{s as setData,b as logout,u as updateActivityStatus}from"./js-core.esm4.js";import{setCustomKnowledgeBaseUrl,setCustomDocsUrl,updateSelectedTab}from"./js-core.esm20.js";import"./js-core.esm5.js";import"./js-core.esm7.js";class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter,createAuthHelpers=t=>({updateToken(e){e?t.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{t.dispatch(logout())},1e3)):t.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&t.dispatch(updateActivityStatus())}}),helpCenter=()=>{var e=new HelpCenter({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}},dataCenter=()=>{var e=new DataCenter;return{openImporterPanel:e.openImporterPanel.bind(e)}},unmountPanel=t=>e=>(t.dispatch(unmountPanel$1(e)),!0),hidePanel=t=>e=>(t.dispatch(hidePanel$1(e)),!0),unmountAllPanel=e=>()=>{e.dispatch(unmountAllPanel$1(""))},mountPanel=s=>(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:a}=e;s.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:a}));const o=[...(null==(e=null==a?void 0:a.header)?void 0:e.actions)||[],...(null==(e=null==a?void 0:a.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);a={id:n,sagas:[function*(){yield takeEvery$1(o.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return s.addModule(a),n},mountPanelForResponse=t=>e=>mountPanelForResponse$1(e,t),attachSdkToWindow=e=>{var{init:e,store:t,aiwareEvents:n,bootstrapOptions:a}=e;!window||void 0!==window.aiware&&0!==Object.keys(window.aiware).length||(window.aiware={init:e,store:t,auth:createAuthHelpers(t),helpCenter:helpCenter(),dataCenter:dataCenter(),on:n.on,off:n.off,hidePanel:hidePanel(t),unmountPanel:unmountPanel(t),mountPanel:mountPanel(t),mountPanelForResponse:mountPanelForResponse(t),registry:a.registry,registryLookup:a.registryLookup,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,unmountWidget:unmountWidget,commit:"
|
|
1
|
+
import{aq as unmountPanel$1,a1 as hidePanel$1,dT as unmountAllPanel$1,dU as getUniqueID,ar as mountPanel$1,bK as AvailableWidgets,bJ as updatePanelMicroFrontendProps,dV as mountWidget,dW as unmountWidget,dX as updateTokenRequest,dY as HelpCenter,D as takeEvery$1,dZ as mountPanelForResponse$1,d_ as DataCenter,E as select}from"./js-core.esm.js";import{s as setData,b as logout,u as updateActivityStatus}from"./js-core.esm4.js";import{setCustomKnowledgeBaseUrl,setCustomDocsUrl,updateSelectedTab}from"./js-core.esm20.js";import"./js-core.esm5.js";import"./js-core.esm7.js";class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter,createAuthHelpers=t=>({updateToken(e){e?t.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{t.dispatch(logout())},1e3)):t.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&t.dispatch(updateActivityStatus())}}),helpCenter=()=>{var e=new HelpCenter({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}},dataCenter=()=>{var e=new DataCenter;return{openImporterPanel:e.openImporterPanel.bind(e)}},unmountPanel=t=>e=>(t.dispatch(unmountPanel$1(e)),!0),hidePanel=t=>e=>(t.dispatch(hidePanel$1(e)),!0),unmountAllPanel=e=>()=>{e.dispatch(unmountAllPanel$1(""))},mountPanel=s=>(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:a}=e;s.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:a}));const o=[...(null==(e=null==a?void 0:a.header)?void 0:e.actions)||[],...(null==(e=null==a?void 0:a.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);a={id:n,sagas:[function*(){yield takeEvery$1(o.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return s.addModule(a),n},mountPanelForResponse=t=>e=>mountPanelForResponse$1(e,t),attachSdkToWindow=e=>{var{init:e,store:t,aiwareEvents:n,bootstrapOptions:a}=e;!window||void 0!==window.aiware&&0!==Object.keys(window.aiware).length||(window.aiware={init:e,store:t,auth:createAuthHelpers(t),helpCenter:helpCenter(),dataCenter:dataCenter(),on:n.on,off:n.off,hidePanel:hidePanel(t),unmountPanel:unmountPanel(t),mountPanel:mountPanel(t),mountPanelForResponse:mountPanelForResponse(t),registry:a.registry,registryLookup:a.registryLookup,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,unmountWidget:unmountWidget,commit:"71165ce8b"})};export{attachSdkToWindow,hidePanel,mountPanel,unmountAllPanel,unmountPanel};
|
package/js-core.esm19.js.gz
CHANGED
|
Binary file
|