aiware-js 1.0.0-master.1206 → 1.0.0-master.1208
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.esm129.js +1 -1
- package/js-core.esm129.js.gz +0 -0
- package/js-core.esm19.js +1 -1
- package/js-core.esm19.js.gz +0 -0
- package/js-core.esm79.js +1 -1
- package/js-core.esm79.js.gz +0 -0
- package/js-core.esm90.js +3 -3
- package/js-core.esm90.js.gz +0 -0
- package/js-core.esm91.js +2 -2
- package/js-core.esm91.js.gz +0 -0
- package/js-core.umd.js +23 -23
- package/js-core.umd.js.gz +0 -0
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm129.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.esm91.js";import{j as jsxRuntime,Y as useSelector,r as react,w as useIntl,g0 as img$2,g1 as img$3,bR as img$I,bQ as selectIsFullscreenEnabled,ap as mountPanel,a0 as hidePanel}from"./js-core.esm.js";import{u as debounce_1,aM as Stack,T as TextField,p as InputAdornment,V as Search,A as Avatar,aW as truncatedString,e as Tooltip,c as CheckCircle,t as tableInfiniteScroll}from"./js-core.esm6.js";import{c as createSvgIcon,k as FormattedMessage,T as Typography,U as Select,V as MenuItem,h as Button,am as NullState,af as Grid,dy as Applications,dz as Engines2,D as Divider}from"./js-core.esm5.js";import{a as usePackageStyles,b as usePackageButtonsStyles,c as usePackageRowStyles}from"./js-core.esm128.js";import{B as Box}from"./js-core.esm28.js";import{A as AddCircleOutline}from"./js-core.esm85.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,sx:{padding:"2px"}},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,className:e.gridContainer,sx:{backgroundColor:t?"#F2F7FE":""}},{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,sx:{height:"25px"}},{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:"INSTANCE_ADMIN_CENTER_BROWSE",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0}}))}})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:1,sx:{height:"25px"}},{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(""),[p,x]=react.exports.useState(!1),d=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 Search Results Found",description:"Empty state label"}),m=jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org.packages.empty-state-description",defaultMessage:"There are no items that match your search",description:"Empty state label description"}),j=jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org.applications-packages.empty-state",defaultMessage:"No Applications are selected",description:"Empty state label"}),h=jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org.engine-packages.empty-state",defaultMessage:"No engines are selected",description:"Empty state label"}),R=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:p,setShowSelectedResources:x,packageNameFilter:c,setPackageNameFilter:l}),p?jsxRuntime.exports.jsx(Box,Object.assign({className:d.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,TableEmptyStateComponent:"application"===s?jsxRuntime.exports.jsx(NullState,{header:j,image:img$2}):jsxRuntime.exports.jsx(NullState,{header:h,image:img$3}),MessageErrorState:R,listRef:r},s)})):jsxRuntime.exports.jsx(Box,Object.assign({className:d.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,TableEmptyStateComponent:jsxRuntime.exports.jsx(NullState,{header:g,description:m,image:img$I}),MessageErrorState:R,listRef:r},s)})),jsxRuntime.exports.jsx(ActionButtons,{})]}))};export{Packages as default};
|
|
1
|
+
import{v as selectResourcePagination,w as selectPackagesStatus,x as selectPackages,y as selectSelectedPackages,f as actions$2,z as selectActiveStep,e as actions,P as PARENT_PANEL_ID}from"./js-core.esm91.js";import{j as jsxRuntime,Y as useSelector,r as react,w as useIntl,g0 as img$2,g1 as img$3,bR as img$I,bQ as selectIsFullscreenEnabled,ap as mountPanel,a0 as hidePanel}from"./js-core.esm.js";import{u as debounce_1,aM as Stack,T as TextField,p as InputAdornment,V as Search,A as Avatar,aW as truncatedString,e as Tooltip,c as CheckCircle,t as tableInfiniteScroll}from"./js-core.esm6.js";import{c as createSvgIcon,k as FormattedMessage,T as Typography,U as Select,V as MenuItem,h as Button,am as NullState,af as Grid,dy as Applications,dz as Engines2,D as Divider}from"./js-core.esm5.js";import{a as usePackageStyles,b as usePackageButtonsStyles,c as usePackageRowStyles}from"./js-core.esm128.js";import{B as Box}from"./js-core.esm28.js";import{A as AddCircleOutline}from"./js-core.esm85.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,sx:{padding:"2px"}},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,className:e.gridContainer,sx:{backgroundColor:t?"#F2F7FE":""}},{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"}}):"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,sx:{height:"25px"}},{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:PARENT_PANEL_ID,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0}}))}})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:1,sx:{height:"25px"}},{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(""),[p,d]=react.exports.useState(!1),x=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 Search Results Found",description:"Empty state label"}),m=jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org.packages.empty-state-description",defaultMessage:"There are no items that match your search",description:"Empty state label description"}),j=jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org.applications-packages.empty-state",defaultMessage:"No Applications are selected",description:"Empty state label"}),h=jsxRuntime.exports.jsx(FormattedMessage,{id:"create-org.engine-packages.empty-state",defaultMessage:"No engines are selected",description:"Empty state label"}),R=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:p,setShowSelectedResources:d,packageNameFilter:c,setPackageNameFilter:l}),p?jsxRuntime.exports.jsx(Box,Object.assign({className:x.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,TableEmptyStateComponent:"application"===s?jsxRuntime.exports.jsx(NullState,{header:j,image:img$2}):jsxRuntime.exports.jsx(NullState,{header:h,image:img$3}),MessageErrorState:R,listRef:r},s)})):jsxRuntime.exports.jsx(Box,Object.assign({className:x.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,TableEmptyStateComponent:jsxRuntime.exports.jsx(NullState,{header:g,description:m,image:img$I}),MessageErrorState:R,listRef:r},s)})),jsxRuntime.exports.jsx(ActionButtons,{})]}))};export{Packages as default};
|
package/js-core.esm129.js.gz
CHANGED
|
Binary file
|
package/js-core.esm19.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as unmountPanel$1,a0 as hidePanel$1,d$ as unmountAllPanel$1,e0 as getUniqueID,ap as mountPanel$1,bH as AvailableWidgets,bG as updatePanelMicroFrontendProps,e1 as mountWidget,e2 as unmountWidget,e3 as updateTokenRequest,e4 as HelpCenter,B as takeEvery$1,e5 as mountPanelForResponse$1,e6 as DataCenter,C 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{ao as unmountPanel$1,a0 as hidePanel$1,d$ as unmountAllPanel$1,e0 as getUniqueID,ap as mountPanel$1,bH as AvailableWidgets,bG as updatePanelMicroFrontendProps,e1 as mountWidget,e2 as unmountWidget,e3 as updateTokenRequest,e4 as HelpCenter,B as takeEvery$1,e5 as mountPanelForResponse$1,e6 as DataCenter,C 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:"88bea0a8a4"})};export{attachSdkToWindow,hidePanel,mountPanel,unmountAllPanel,unmountPanel};
|
package/js-core.esm19.js.gz
CHANGED
|
Binary file
|
package/js-core.esm79.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as jsxRuntime,bb as injectIntl,X as combineReducers,aH as AIWareThemeProvider,Y as useSelector,bQ as selectIsFullscreenEnabled,z as all,aE as betaFeaturesSelector,K as userSelector,ca as switchApiSelector,r as react,$ as selectApiConfigs,fr as setIsFullscreenEnabled,bp as panelsSelector}from"./js-core.esm.js";import{c as createSvgIcon,m as makeStyles,p as DynamicModuleLoader,A as AIWareIntlProvider,k as FormattedMessage,cw as Hamburger,T as Typography,b4 as FullscreenExit,b3 as Fullscreen,Z as Hide,d9 as Article,da as Task,db as View,d0 as OpenWindow,a_ as Tabs,s as classNames,b0 as Tab}from"./js-core.esm5.js";import{getProcessingCenterJobsModule,JobsPanel}from"./js-core.esm80.js";import{getProcessingCenterTasksModule,TasksPanel}from"./js-core.esm81.js";import{a as index}from"./js-core.esm14.js";import{e as Tooltip,I as IconButton,am as FullscreenPortal}from"./js-core.esm6.js";import{H as HelpOutline}from"./js-core.esm60.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm9.js";import"./js-core.esm54.js";import"./js-core.esm48.js";import"./js-core.esm55.js";import"./js-core.esm50.js";import"./js-core.esm56.js";import"./js-core.esm61.js";import"./js-core.esm2.js";import"./js-core.esm4.js";import"./js-core.esm3.js";import"./js-core.esm34.js";import"./js-core.esm30.js";import"./js-core.esm17.js";import"./js-core.esm57.js";import"./js-core.esm59.js";import"./js-core.esm26.js";import"./js-core.esm25.js";import"./js-core.esm58.js";import"./js-core.esm51.js";var AssessmentOutlined=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}),"AssessmentOutlined");const useStyles$2=makeStyles()((e,{height:s})=>({header:{alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider,display:"flex",height:s,padding:e.spacing(2),position:"relative"},title:{minWidth:"126px"},marginRight:{marginRight:e.spacing(2)},navigationToggle:{marginRight:e.spacing(1)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid "+e.palette.divider,height:"70%",margin:"0 "+e.spacing(1)},searchContainer:{alignItems:"center",border:"1px solid transparent",borderRadius:4,display:"flex",flexGrow:1,height:44,marginLeft:"48px"}})),Header=({intl:e,hidePanel:s,isNavExpanded:t,onLeftNavigationToggle:a,height:i})=>{i=useStyles$2({height:i}).classes;const n=useDispatch(),r=useSelector(selectIsFullscreenEnabled);return e.formatMessage({id:"processing-center-browse.search-input-placeholder",defaultMessage:[{type:0,value:"Search by Job ID, Task ID, TDO ID, Application or User"}]}),jsxRuntime.exports.jsxs("header",Object.assign({className:i.header,"data-testid":"pc-header"},{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.navigation.menu",defaultMessage:"Toggle Navigation Menu",description:"Toggle Navigation Menu"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({sx:{mr:1},onClick:a,"aria-expanded":t,"aria-labelledby":"ac-header-toggle-nav","data-test":"ac-header-toggle-nav",size:"large"},{children:jsxRuntime.exports.jsx(Hamburger,{})}))})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",className:i.title,"data-test":"ac-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.header.title",defaultMessage:"Processing Center",description:"Panel header of the processing center"})})),jsxRuntime.exports.jsx("div",{className:i.searchContainer}),jsxRuntime.exports.jsxs("div",Object.assign({className:i.headerActionContainer},{children:[jsxRuntime.exports.jsx("div",{className:i.verticalDivider}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.open.help-center.tooltip",defaultMessage:"View Help",description:"Help icon"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"processing-center-help-icon",size:"large"},{children:jsxRuntime.exports.jsx(HelpOutline,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.close.full.screen",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.open.full.screen",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>n(setIsFullscreenEnabled(!r)),"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large"},{children:r?jsxRuntime.exports.jsx(FullscreenExit,{}):jsxRuntime.exports.jsx(Fullscreen,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.close.panel",defaultMessage:"Close Panel",description:"Close Panel"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:s,"aria-labelledby":"ac-close-panel","data-test-id":"ac-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))};var ProcessingCenterView,Header$1=injectIntl(Header);function __rest(e,s){var t={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&s.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,i=Object.getOwnPropertySymbols(e);a<i.length;a++)s.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(t[i[a]]=e[i[a]]);return t}const SLICE_NAME="processingCenterBrowse",namespace$1=(!function(e){e[e.jobs=0]="jobs",e[e.tasks=1]="tasks",e[e.monitoring=2]="monitoring",e[e.analytics=3]="analytics"}(ProcessingCenterView=ProcessingCenterView||{}),"application"),{slice,selectors,sagas,initialState:initialState$1}=index.applications.generateApplicationsRedux({sliceName:SLICE_NAME,namespace:namespace$1,additionalSelectors:{primaryResourceType:()=>"applications",applicationFilters:()=>[],searchValue:()=>"analytics center"}}),namespace=SLICE_NAME,initialState={[namespace$1]:initialState$1},actions={[namespace$1]:slice.actions},rootReducer=combineReducers({[namespace$1]:slice.reducer});function*rootSaga(){yield all([sagas.watchRead()])}function getBrowsePanelModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const TAB_WIDTH=197,useStyles$1=makeStyles()((e,{height:s},t)=>({root:{display:"flex",flexGrow:1,height:s,position:"relative"},tabs:{borderRight:".5px solid "+e.palette.divider,transition:".2s ease",width:e.spacing(14),minWidth:e.spacing(14),padding:e.spacing(1.6)+" "+e.spacing(2.5),boxSizing:"border-box"},tabsContainer:{alignItems:"center"},tabIndicator:{background:"transparent"},tabRoot:{opacity:1,borderRadius:4,fontSize:"14px",marginBottom:e.spacing(1),minHeight:e.spacing(9),minWidth:e.spacing(9),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),width:"100%","&:hover":{background:"#F2F5F9"},"&.Sdk-Mui-disabled":{cursor:"not-allowed",pointerEvents:"auto"},"&:disabled":{cursor:"not-allowed",pointerEvents:"auto"}},tabsExpanded:{width:TAB_WIDTH,minWidth:TAB_WIDTH,paddingRight:e.spacing(2),paddingLeft:e.spacing(2),["& "+t.tabRoot]:{width:`calc(${TAB_WIDTH}px - ${e.spacing(3)})`,flexDirection:"row",textTransform:"capitalize","& svg:first-of-type":{marginRight:e.spacing(2),marginBottom:"0"}}},tabExpandedWrapper:{flexDirection:"row",display:"flex",justifyContent:"flex-start","& svg:first-of-type":{marginBottom:"0 !important",marginRight:e.spacing(2)},"& svg:last-child":{marginBottom:"0 !important",marginLeft:"auto"}},tabSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg:first-of-type":{marginBottom:"0 !important",marginRight:"0",color:e.palette.primary.main}},contentPanel:{flexGrow:1},tabExpandedSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg:first-of-type":{marginBottom:"0 !important",marginRight:e.spacing(2),color:e.palette.primary.main}},tabWrapper:{flexDirection:"row",display:"flex",justifyContent:"center","& svg":{marginBottom:"0 !important",marginRight:"0"}},condensedNavIcon:{display:"flex",marginBottom:"0px !important"}})),MainTabPanel=({currentView:s,setCurrentView:t,intl:o,isNavExpanded:l,height:e})=>{const a=useDispatch(),c=useStyles$1({height:e})["classes"],i=useSelector(betaFeaturesSelector);var e=useSelector(userSelector),n=useSelector(selectors.selectItems);const r=useSelector(switchApiSelector),p=null!=(n=null==(n=null==n?void 0:n[0])?void 0:n.id)?n:void 0;e=null!=(n=null==e?void 0:e.roles)?n:[];const d=[{id:ProcessingCenterView.jobs,label:o.formatMessage({id:"os-processing-center-browse.jobs.view",defaultMessage:[{type:0,value:"Jobs"}]}),testLabel:"jobs-view",icon:jsxRuntime.exports.jsx(Article,{}),content:()=>jsxRuntime.exports.jsx(JobsPanel,{})},{id:ProcessingCenterView.tasks,label:o.formatMessage({id:"os-processing-center-browse.tasks.view",defaultMessage:[{type:0,value:"Tasks"}]}),testLabel:"tasks-view",icon:jsxRuntime.exports.jsx(Task,{style:{transform:"translateX(4px)"}}),content:()=>jsxRuntime.exports.jsx(TasksPanel,{})},{id:ProcessingCenterView.monitoring,label:o.formatMessage({id:"os-processing-center-browse.monitoring.view",defaultMessage:[{type:0,value:"Monitoring"}]}),testLabel:"monitoring-view",icon:jsxRuntime.exports.jsx(View,{}),content:()=>jsxRuntime.exports.jsx("div",{children:"Monitoring"}),disabled:!0},{id:ProcessingCenterView.analytics,label:o.formatMessage({id:"os-processing-center-browse.analytics.label",defaultMessage:[{type:0,value:"Analytics"}]}),labelTooltip:o.formatMessage({id:"os-processing-center-browse.analytics.link.tooltip",defaultMessage:[{type:0,value:"Open Analytics Center App"}]}),testLabel:"analytics-link",icon:jsxRuntime.exports.jsx(AssessmentOutlined,{}),iconEnd:jsxRuntime.exports.jsx(OpenWindow,{}),beta:!0,show:e.includes("ce_analytics_app")&&void 0!==p,props:{onClick:()=>window.open(r+"/"+p,"_blank")}}].filter(e=>(null==e||!e.beta||i)&&(void 0===(null==e?void 0:e.show)||e.show));return react.exports.useEffect(()=>{a(actions.application.readStart(null))},[]),jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:c.root},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({id:"processingCenterViewTabs",orientation:"vertical",value:s,onChange:(e,s)=>{void 0!==d[s].content&&t(s)},className:classNames(c.tabs,{[c.tabsExpanded]:l}),classes:{flexContainer:c.tabsContainer,indicator:c.tabIndicator},"aria-label":"processing center tabs","data-test":"pc-nav-tabs-container"},{children:d.map(e=>{var s,t,a,i,n=e.props||{},r=e.disabled||!1;return react.exports.createElement(Tab,Object.assign({},n,{key:e.id},a11yProps(e.id),{wrapped:!0,label:(t=(n=e).disabled||!1,a=n.label,i=null!=(i=null==n?void 0:n.labelTooltip)?i:a,jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:t?o.formatMessage({id:"processing-center.nav-list.coming-soon-label",defaultMessage:[{type:1,value:"label"},{type:0,value:" coming soon"}]},{label:a}):i},{children:jsxRuntime.exports.jsx("span",{children:l?n.label:""})})),null!=n&&n.iconEnd&&l?n.iconEnd:null]})),icon:(a=(t=e).icon,i=t.label,n=t.disabled||!1,s=null!=(s=null==t?void 0:t.labelTooltip)?s:t.label,l?a:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:n?o.formatMessage({id:"processing-center.nav-list.coming-soon-label",defaultMessage:[{type:1,value:"label"},{type:0,value:" coming soon"}]},{label:i}):s},{children:jsxRuntime.exports.jsx("span",Object.assign({className:c.condensedNavIcon},{children:a}))}))),classes:{root:c.tabRoot,wrapped:l?c.tabExpandedWrapper:c.tabWrapper,selected:l?c.tabExpandedSelected:c.tabSelected},disabled:r,"data-test":"pc-nav-tab-"+e.testLabel}))})})),d.map(e=>void 0===(null==e?void 0:e.content)?null:jsxRuntime.exports.jsx(TabPanel,Object.assign({value:s,index:e.id,className:c.contentPanel,"data-test":"pc-tab-"+e.testLabel},{children:e.content()}),e.id))]}))})};function TabPanel(e){var{children:s,value:t,index:a}=e,e=__rest(e,["children","value","index"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:t!==a,id:"processing-center-tabpanel-"+a,"aria-labelledby":"processing-center-tab-"+a},e,{children:t===a&&s}))}function a11yProps(e){return{id:"admin-center-tab-"+e,"aria-controls":"admin-center-tabpanel-"+e}}var MainTabPanel$1=injectIntl(MainTabPanel);const Container=({classes:e,dimmed:s,children:t})=>{return useSelector(selectIsFullscreenEnabled)?jsxRuntime.exports.jsx(FullscreenPortal,Object.assign({dataTest:"ac-widget",dimmed:!!s,panelId:"PROCESSING_CENTER"},{children:t})):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classNames(e.root,e.panel)},{children:t}))},appBarHeight=55,headerHeight=64,borderBottom=5,useStyles=makeStyles()(e=>({root:{width:"100%",position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%"}})),MainLayout=({hidePanel:e})=>{const[s,t]=react.exports.useState(!0);var a=useSelector(selectIsFullscreenEnabled),i=useStyles()["classes"],n=useSelector(panelsSelector)||[],[r,o]=react.exports.useState(ProcessingCenterView.jobs),n=n.find(e=>"PROCESSING_CENTER"===e.panelId)||{panelConfig:{dimmed:0}},n=0<(null==(n=null===n?void 0:n.panelConfig)?void 0:n.dimmed),a=`calc(100vh - ${a?25:appBarHeight+borderBottom}px - ${headerHeight}px)`;return jsxRuntime.exports.jsxs(Container,Object.assign({dimmed:n,classes:i},{children:[jsxRuntime.exports.jsx(Header$1,{height:headerHeight,hidePanel:e,isNavExpanded:s,onLeftNavigationToggle:()=>{t(!s)}}),jsxRuntime.exports.jsx(MainTabPanel$1,{currentView:r,setCurrentView:o,height:a,isNavExpanded:s})]}))},Content=e=>{var{apiRoot:s,graphQLEndpoint:t,token:a}=useSelector(selectApiConfigs);return s&&t&&a?jsxRuntime.exports.jsx(MainLayout,Object.assign({},e)):null},ProcessingCenterBrowse=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getBrowsePanelModule(),getProcessingCenterJobsModule(),getProcessingCenterTasksModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(Content,Object.assign({},e))})}))});export{ProcessingCenterBrowse,actions,selectors as applicationSelectors,getBrowsePanelModule,initialState,namespace,rootReducer};
|
|
1
|
+
import{j as jsxRuntime,bb as injectIntl,X as combineReducers,aH as AIWareThemeProvider,Y as useSelector,bQ as selectIsFullscreenEnabled,z as all,aE as betaFeaturesSelector,K as userSelector,ca as switchApiSelector,r as react,$ as selectApiConfigs,fr as setIsFullscreenEnabled,bp as panelsSelector}from"./js-core.esm.js";import{c as createSvgIcon,m as makeStyles,p as DynamicModuleLoader,A as AIWareIntlProvider,k as FormattedMessage,cw as Hamburger,T as Typography,b4 as FullscreenExit,b3 as Fullscreen,Z as Hide,d9 as Article,da as Task,db as View,d0 as OpenWindow,a_ as Tabs,s as classNames,b0 as Tab}from"./js-core.esm5.js";import{getProcessingCenterJobsModule,JobsPanel}from"./js-core.esm80.js";import{getProcessingCenterTasksModule,TasksPanel}from"./js-core.esm81.js";import{a as index}from"./js-core.esm14.js";import{e as Tooltip,I as IconButton,am as FullscreenPortal}from"./js-core.esm6.js";import{H as HelpOutline}from"./js-core.esm60.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm9.js";import"./js-core.esm54.js";import"./js-core.esm48.js";import"./js-core.esm55.js";import"./js-core.esm50.js";import"./js-core.esm56.js";import"./js-core.esm61.js";import"./js-core.esm2.js";import"./js-core.esm4.js";import"./js-core.esm3.js";import"./js-core.esm34.js";import"./js-core.esm30.js";import"./js-core.esm17.js";import"./js-core.esm57.js";import"./js-core.esm59.js";import"./js-core.esm26.js";import"./js-core.esm25.js";import"./js-core.esm58.js";import"./js-core.esm51.js";var AssessmentOutlined=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}),"AssessmentOutlined");const useStyles$2=makeStyles()((e,{height:s})=>({header:{alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider,display:"flex",height:s,padding:e.spacing(2),position:"relative"},title:{minWidth:"126px"},marginRight:{marginRight:e.spacing(2)},navigationToggle:{marginRight:e.spacing(1)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid "+e.palette.divider,height:"70%",margin:"0 "+e.spacing(1)},searchContainer:{alignItems:"center",border:"1px solid transparent",borderRadius:4,display:"flex",flexGrow:1,height:44,marginLeft:"48px"}})),Header=({intl:e,hidePanel:s,isNavExpanded:t,onLeftNavigationToggle:a,height:i})=>{i=useStyles$2({height:i}).classes;const n=useDispatch(),r=useSelector(selectIsFullscreenEnabled);return e.formatMessage({id:"processing-center-browse.search-input-placeholder",defaultMessage:[{type:0,value:"Search by Job ID, Task ID, TDO ID, Application or User"}]}),jsxRuntime.exports.jsxs("header",Object.assign({className:i.header,"data-testid":"pc-header"},{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.navigation.menu",defaultMessage:"Toggle Navigation Menu",description:"Toggle Navigation Menu"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({sx:{mr:1},onClick:a,"aria-expanded":t,"aria-labelledby":"ac-header-toggle-nav","data-test":"ac-header-toggle-nav",size:"large"},{children:jsxRuntime.exports.jsx(Hamburger,{})}))})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",className:i.title,"data-test":"ac-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.header.title",defaultMessage:"Processing Center",description:"Panel header of the processing center"})})),jsxRuntime.exports.jsx("div",{className:i.searchContainer}),jsxRuntime.exports.jsxs("div",Object.assign({className:i.headerActionContainer},{children:[jsxRuntime.exports.jsx("div",{className:i.verticalDivider}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.open.help-center.tooltip",defaultMessage:"View Help",description:"Help icon"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"processing-center-help-icon",size:"large"},{children:jsxRuntime.exports.jsx(HelpOutline,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.close.full.screen",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.open.full.screen",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>n(setIsFullscreenEnabled(!r)),"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large"},{children:r?jsxRuntime.exports.jsx(FullscreenExit,{}):jsxRuntime.exports.jsx(Fullscreen,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-browse.close.panel",defaultMessage:"Close Panel",description:"Close Panel"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:s,"aria-labelledby":"ac-close-panel","data-test-id":"ac-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))};var ProcessingCenterView,Header$1=injectIntl(Header);function __rest(e,s){var t={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&s.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,i=Object.getOwnPropertySymbols(e);a<i.length;a++)s.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(t[i[a]]=e[i[a]]);return t}const SLICE_NAME="processingCenterBrowse",namespace$1=(!function(e){e[e.jobs=0]="jobs",e[e.tasks=1]="tasks",e[e.monitoring=2]="monitoring",e[e.analytics=3]="analytics"}(ProcessingCenterView=ProcessingCenterView||{}),"application"),{slice,selectors,sagas,initialState:initialState$1}=index.applications.generateApplicationsRedux({sliceName:SLICE_NAME,namespace:namespace$1,additionalSelectors:{primaryResourceType:()=>"applications",applicationFilters:()=>[],searchValue:()=>"analytics center"}}),namespace=SLICE_NAME,initialState={[namespace$1]:initialState$1},actions={[namespace$1]:slice.actions},rootReducer=combineReducers({[namespace$1]:slice.reducer});function*rootSaga(){yield all([sagas.watchRead()])}function getBrowsePanelModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const TAB_WIDTH=197,useStyles$1=makeStyles()((e,{height:s},t)=>({root:{display:"flex",flexGrow:1,height:s,position:"relative"},tabs:{borderRight:".5px solid "+e.palette.divider,transition:".2s ease",width:e.spacing(14),minWidth:e.spacing(14),padding:e.spacing(1.6)+" "+e.spacing(2.5),boxSizing:"border-box"},tabsContainer:{alignItems:"center"},tabIndicator:{background:"transparent"},tabRoot:{opacity:1,borderRadius:4,fontSize:"14px",marginBottom:e.spacing(1),minHeight:e.spacing(9),minWidth:e.spacing(9),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),width:"100%","&:hover":{background:"#F2F5F9"},"&.Sdk-Mui-disabled":{cursor:"not-allowed",pointerEvents:"auto"},"&:disabled":{cursor:"not-allowed",pointerEvents:"auto"}},tabsExpanded:{width:TAB_WIDTH,minWidth:TAB_WIDTH,paddingRight:e.spacing(2),paddingLeft:e.spacing(2),["& "+t.tabRoot]:{width:`calc(${TAB_WIDTH}px - ${e.spacing(3)})`,flexDirection:"row",textTransform:"capitalize","& svg:first-of-type":{marginRight:e.spacing(2),marginBottom:"0"}}},tabExpandedWrapper:{flexDirection:"row",display:"flex",justifyContent:"flex-start","& svg:first-of-type":{marginBottom:"0 !important",marginRight:e.spacing(2)},"& svg:last-child":{marginBottom:"0 !important",marginLeft:"auto"}},tabSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg:first-of-type":{marginBottom:"0 !important",marginRight:"0",color:e.palette.primary.main}},contentPanel:{flexGrow:1},tabExpandedSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg:first-of-type":{marginBottom:"0 !important",marginRight:e.spacing(2),color:e.palette.primary.main}},tabWrapper:{flexDirection:"row",display:"flex",justifyContent:"center","& svg":{marginBottom:"0 !important",marginRight:"0"}},condensedNavIcon:{display:"flex",marginBottom:"0px !important"}})),MainTabPanel=({currentView:s,setCurrentView:t,intl:o,isNavExpanded:l,height:e})=>{const a=useDispatch(),c=useStyles$1({height:e})["classes"],i=useSelector(betaFeaturesSelector);var e=useSelector(userSelector),n=useSelector(selectors.selectItems);const r=useSelector(switchApiSelector),p=null!=(n=null==(n=null==n?void 0:n[0])?void 0:n.id)?n:void 0;e=null!=(n=null==e?void 0:e.roles)?n:[];const d=[{id:ProcessingCenterView.jobs,label:o.formatMessage({id:"os-processing-center-browse.jobs.view",defaultMessage:[{type:0,value:"Jobs"}]}),testLabel:"jobs-view",icon:jsxRuntime.exports.jsx(Article,{}),content:()=>jsxRuntime.exports.jsx(JobsPanel,{})},{id:ProcessingCenterView.tasks,label:o.formatMessage({id:"os-processing-center-browse.tasks.view",defaultMessage:[{type:0,value:"Tasks"}]}),testLabel:"tasks-view",icon:jsxRuntime.exports.jsx(Task,{style:{transform:"translateX(4px)"}}),content:()=>jsxRuntime.exports.jsx(TasksPanel,{})},{id:ProcessingCenterView.monitoring,label:o.formatMessage({id:"os-processing-center-browse.monitoring.view",defaultMessage:[{type:0,value:"Monitoring"}]}),testLabel:"monitoring-view",icon:jsxRuntime.exports.jsx(View,{}),content:()=>jsxRuntime.exports.jsx("div",{children:"Monitoring"}),disabled:!0},{id:ProcessingCenterView.analytics,label:o.formatMessage({id:"os-processing-center-browse.analytics.label",defaultMessage:[{type:0,value:"Analytics"}]}),labelTooltip:o.formatMessage({id:"os-processing-center-browse.analytics.link.tooltip",defaultMessage:[{type:0,value:"Open Analytics Center App"}]}),testLabel:"analytics-link",icon:jsxRuntime.exports.jsx(AssessmentOutlined,{}),iconEnd:jsxRuntime.exports.jsx(OpenWindow,{}),beta:!0,show:e.includes("ce_analytics_app")&&void 0!==p,props:{onClick:()=>window.open(`${r}/${p}?page=processingsummary`,"_blank")}}].filter(e=>(null==e||!e.beta||i)&&(void 0===(null==e?void 0:e.show)||e.show));return react.exports.useEffect(()=>{a(actions.application.readStart(null))},[]),jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:c.root},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({id:"processingCenterViewTabs",orientation:"vertical",value:s,onChange:(e,s)=>{void 0!==d[s].content&&t(s)},className:classNames(c.tabs,{[c.tabsExpanded]:l}),classes:{flexContainer:c.tabsContainer,indicator:c.tabIndicator},"aria-label":"processing center tabs","data-test":"pc-nav-tabs-container"},{children:d.map(e=>{var s,t,a,i,n=e.props||{},r=e.disabled||!1;return react.exports.createElement(Tab,Object.assign({},n,{key:e.id},a11yProps(e.id),{wrapped:!0,label:(t=(n=e).disabled||!1,a=n.label,i=null!=(i=null==n?void 0:n.labelTooltip)?i:a,jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:t?o.formatMessage({id:"processing-center.nav-list.coming-soon-label",defaultMessage:[{type:1,value:"label"},{type:0,value:" coming soon"}]},{label:a}):i},{children:jsxRuntime.exports.jsx("span",{children:l?n.label:""})})),null!=n&&n.iconEnd&&l?n.iconEnd:null]})),icon:(a=(t=e).icon,i=t.label,n=t.disabled||!1,s=null!=(s=null==t?void 0:t.labelTooltip)?s:t.label,l?a:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:n?o.formatMessage({id:"processing-center.nav-list.coming-soon-label",defaultMessage:[{type:1,value:"label"},{type:0,value:" coming soon"}]},{label:i}):s},{children:jsxRuntime.exports.jsx("span",Object.assign({className:c.condensedNavIcon},{children:a}))}))),classes:{root:c.tabRoot,wrapped:l?c.tabExpandedWrapper:c.tabWrapper,selected:l?c.tabExpandedSelected:c.tabSelected},disabled:r,"data-test":"pc-nav-tab-"+e.testLabel}))})})),d.map(e=>void 0===(null==e?void 0:e.content)?null:jsxRuntime.exports.jsx(TabPanel,Object.assign({value:s,index:e.id,className:c.contentPanel,"data-test":"pc-tab-"+e.testLabel},{children:e.content()}),e.id))]}))})};function TabPanel(e){var{children:s,value:t,index:a}=e,e=__rest(e,["children","value","index"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:t!==a,id:"processing-center-tabpanel-"+a,"aria-labelledby":"processing-center-tab-"+a},e,{children:t===a&&s}))}function a11yProps(e){return{id:"admin-center-tab-"+e,"aria-controls":"admin-center-tabpanel-"+e}}var MainTabPanel$1=injectIntl(MainTabPanel);const Container=({classes:e,dimmed:s,children:t})=>{return useSelector(selectIsFullscreenEnabled)?jsxRuntime.exports.jsx(FullscreenPortal,Object.assign({dataTest:"ac-widget",dimmed:!!s,panelId:"PROCESSING_CENTER"},{children:t})):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classNames(e.root,e.panel)},{children:t}))},appBarHeight=55,headerHeight=64,borderBottom=5,useStyles=makeStyles()(e=>({root:{width:"100%",position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%"}})),MainLayout=({hidePanel:e})=>{const[s,t]=react.exports.useState(!0);var a=useSelector(selectIsFullscreenEnabled),i=useStyles()["classes"],n=useSelector(panelsSelector)||[],[r,o]=react.exports.useState(ProcessingCenterView.jobs),n=n.find(e=>"PROCESSING_CENTER"===e.panelId)||{panelConfig:{dimmed:0}},n=0<(null==(n=null===n?void 0:n.panelConfig)?void 0:n.dimmed),a=`calc(100vh - ${a?25:appBarHeight+borderBottom}px - ${headerHeight}px)`;return jsxRuntime.exports.jsxs(Container,Object.assign({dimmed:n,classes:i},{children:[jsxRuntime.exports.jsx(Header$1,{height:headerHeight,hidePanel:e,isNavExpanded:s,onLeftNavigationToggle:()=>{t(!s)}}),jsxRuntime.exports.jsx(MainTabPanel$1,{currentView:r,setCurrentView:o,height:a,isNavExpanded:s})]}))},Content=e=>{var{apiRoot:s,graphQLEndpoint:t,token:a}=useSelector(selectApiConfigs);return s&&t&&a?jsxRuntime.exports.jsx(MainLayout,Object.assign({},e)):null},ProcessingCenterBrowse=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getBrowsePanelModule(),getProcessingCenterJobsModule(),getProcessingCenterTasksModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(Content,Object.assign({},e))})}))});export{ProcessingCenterBrowse,actions,selectors as applicationSelectors,getBrowsePanelModule,initialState,namespace,rootReducer};
|
package/js-core.esm79.js.gz
CHANGED
|
Binary file
|