aiware-js 2.26.0 → 2.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +1 -1
- package/js-core.esm.js +14 -14
- package/js-core.esm16.js +1 -1
- package/js-core.esm2.js +1 -1
- package/js-core.esm20.js +1 -230
- package/js-core.esm21.js +227 -65
- package/js-core.esm22.js +78 -1
- package/js-core.esm23.js +1 -1
- package/js-core.esm24.js +1 -1
- package/js-core.esm25.js +1 -1
- package/js-core.esm26.js +1 -1
- package/js-core.esm27.js +1 -1
- package/js-core.esm28.js +1 -1
- package/js-core.esm29.js +1 -1
- package/js-core.esm30.js +1 -1
- package/js-core.esm31.js +1 -1
- package/js-core.esm32.js +1 -14
- package/js-core.esm33.js +1 -12
- package/js-core.esm34.js +1 -54
- package/js-core.esm35.js +1 -1
- package/js-core.esm36.js +1 -1
- package/js-core.esm37.js +1 -108
- package/js-core.esm38.js +1 -1
- package/js-core.esm39.js +10 -210
- package/js-core.esm4.js +1 -1
- package/js-core.esm40.js +12 -1
- package/js-core.esm41.js +54 -1
- package/js-core.esm42.js +1 -1
- package/js-core.esm43.js +1 -1
- package/js-core.esm44.js +99 -28
- package/js-core.esm45.js +1 -1
- package/js-core.esm46.js +214 -1
- package/js-core.esm47.js +1 -1
- package/js-core.esm48.js +37 -1
- package/js-core.esm49.js +1 -31
- package/js-core.esm5.js +3 -3
- package/js-core.esm50.js +1 -32
- package/js-core.esm51.js +1 -85
- package/js-core.esm52.js +1 -1
- package/js-core.esm53.js +1 -54
- package/js-core.esm54.js +1 -133
- package/js-core.esm55.js +1 -87
- package/js-core.esm56.js +31 -1
- package/js-core.esm57.js +29 -40
- package/js-core.esm58.js +82 -17
- package/js-core.esm59.js +1 -1
- package/js-core.esm60.js +55 -0
- package/js-core.esm61.js +133 -0
- package/js-core.esm62.js +75 -0
- package/js-core.esm63.js +13 -0
- package/js-core.esm64.js +1 -0
- package/js-core.esm65.js +1 -0
- package/js-core.esm66.js +102 -0
- package/js-core.esm67.js +20 -0
- package/js-core.esm68.js +1 -0
- package/js-core.esm7.js +3 -3
- package/js-core.umd.css +92 -92
- package/js-core.umd.js +224 -148
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +10 -4
package/js-core.esm41.js
CHANGED
|
@@ -1 +1,54 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{g as generateUtilityClass,a as generateUtilityClasses,ep as keyframes,b as styled,d as capitalize,_ as _extends,eZ as css,r as react,u as useThemeProps,e as _objectWithoutPropertiesLoose,b6 as useTheme,j as jsxRuntime,f as clsx,h as composeClasses,el as lighten,em as darken}from"./js-core.esm.js";function getLinearProgressUtilityClass(e){return generateUtilityClass("MuiLinearProgress",e)}generateUtilityClasses("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const _excluded=["className","color","value","valueBuffer","variant"];let _=e=>e,_t,_t2,_t3,_t4,_t5,_t6;const TRANSITION_DURATION=4,indeterminate1Keyframe=keyframes(_t=_t||_`
|
|
2
|
+
0% {
|
|
3
|
+
left: -35%;
|
|
4
|
+
right: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
60% {
|
|
8
|
+
left: 100%;
|
|
9
|
+
right: -90%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
100% {
|
|
13
|
+
left: 100%;
|
|
14
|
+
right: -90%;
|
|
15
|
+
}
|
|
16
|
+
`),indeterminate2Keyframe=keyframes(_t2=_t2||_`
|
|
17
|
+
0% {
|
|
18
|
+
left: -200%;
|
|
19
|
+
right: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
60% {
|
|
23
|
+
left: 107%;
|
|
24
|
+
right: -8%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
100% {
|
|
28
|
+
left: 107%;
|
|
29
|
+
right: -8%;
|
|
30
|
+
}
|
|
31
|
+
`),bufferKeyframe=keyframes(_t3=_t3||_`
|
|
32
|
+
0% {
|
|
33
|
+
opacity: 1;
|
|
34
|
+
background-position: 0 -23px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
60% {
|
|
38
|
+
opacity: 0;
|
|
39
|
+
background-position: 0 -23px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
100% {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
background-position: -200px -23px;
|
|
45
|
+
}
|
|
46
|
+
`),useUtilityClasses=e=>{var{classes:e,variant:r,color:a}=e,a={root:["root","color"+capitalize(a),r],dashed:["dashed","dashedColor"+capitalize(a)],bar1:["bar","barColor"+capitalize(a),("indeterminate"===r||"query"===r)&&"bar1Indeterminate","determinate"===r&&"bar1Determinate","buffer"===r&&"bar1Buffer"],bar2:["bar","buffer"!==r&&"barColor"+capitalize(a),"buffer"===r&&"color"+capitalize(a),("indeterminate"===r||"query"===r)&&"bar2Indeterminate","buffer"===r&&"bar2Buffer"]};return composeClasses(a,getLinearProgressUtilityClass,e)},getColorShade=(e,r)=>"inherit"===r?"currentColor":"light"===e.palette.mode?lighten(e.palette[r].main,.62):darken(e.palette[r].main,.5),LinearProgressRoot=styled("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,r)=>{e=e.ownerState;return[r.root,r["color"+capitalize(e.color)],r[e.variant]]}})(({ownerState:e,theme:r})=>_extends({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:getColorShade(r,e.color)},"inherit"===e.color&&"buffer"!==e.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===e.variant&&{backgroundColor:"transparent"},"query"===e.variant&&{transform:"rotate(180deg)"})),LinearProgressDashed=styled("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,r)=>{e=e.ownerState;return[r.dashed,r["dashedColor"+capitalize(e.color)]]}})(({ownerState:e,theme:r})=>{r=getColorShade(r,e.color);return _extends({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===e.color&&{opacity:.3},{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},css(_t4=_t4||_`
|
|
47
|
+
animation: ${0} 3s infinite linear;
|
|
48
|
+
`,bufferKeyframe)),LinearProgressBar1=styled("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,r)=>{e=e.ownerState;return[r.bar,r["barColor"+capitalize(e.color)],("indeterminate"===e.variant||"query"===e.variant)&&r.bar1Indeterminate,"determinate"===e.variant&&r.bar1Determinate,"buffer"===e.variant&&r.bar1Buffer]}})(({ownerState:e,theme:r})=>_extends({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===e.color?"currentColor":r.palette[e.color].main},"determinate"===e.variant&&{transition:`transform .${TRANSITION_DURATION}s linear`},"buffer"===e.variant&&{zIndex:1,transition:`transform .${TRANSITION_DURATION}s linear`}),({ownerState:e})=>("indeterminate"===e.variant||"query"===e.variant)&&css(_t5=_t5||_`
|
|
49
|
+
width: auto;
|
|
50
|
+
animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
51
|
+
`,indeterminate1Keyframe)),LinearProgressBar2=styled("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,r)=>{e=e.ownerState;return[r.bar,r["barColor"+capitalize(e.color)],("indeterminate"===e.variant||"query"===e.variant)&&r.bar2Indeterminate,"buffer"===e.variant&&r.bar2Buffer]}})(({ownerState:e,theme:r})=>_extends({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==e.variant&&{backgroundColor:"inherit"===e.color?"currentColor":r.palette[e.color].main},"inherit"===e.color&&{opacity:.3},"buffer"===e.variant&&{backgroundColor:getColorShade(r,e.color),transition:`transform .${TRANSITION_DURATION}s linear`}),({ownerState:e})=>("indeterminate"===e.variant||"query"===e.variant)&&css(_t6=_t6||_`
|
|
52
|
+
width: auto;
|
|
53
|
+
animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
54
|
+
`,indeterminate2Keyframe)),LinearProgress=react.exports.forwardRef(function(e,r){var e=useThemeProps({props:e,name:"MuiLinearProgress"}),{className:a,color:t="primary",value:o,valueBuffer:i,variant:n="indeterminate"}=e,s=_objectWithoutPropertiesLoose(e,_excluded),e=_extends({},e,{color:t,variant:n}),t=useUtilityClasses(e),l=useTheme();const d={},u={bar1:{},bar2:{}};if(("determinate"===n||"buffer"===n)&&void 0!==o){d["aria-valuenow"]=Math.round(o),d["aria-valuemin"]=0;let e=o-(d["aria-valuemax"]=100);"rtl"===l.direction&&(e=-e),u.bar1.transform=`translateX(${e}%)`}if("buffer"===n&&void 0!==i){let e=(i||0)-100;"rtl"===l.direction&&(e=-e),u.bar2.transform=`translateX(${e}%)`}return jsxRuntime.exports.jsxs(LinearProgressRoot,_extends({className:clsx(t.root,a),ownerState:e,role:"progressbar"},d,{ref:r},s,{children:["buffer"===n?jsxRuntime.exports.jsx(LinearProgressDashed,{className:t.dashed,ownerState:e}):null,jsxRuntime.exports.jsx(LinearProgressBar1,{className:t.bar1,ownerState:e,style:u.bar1}),"determinate"===n?null:jsxRuntime.exports.jsx(LinearProgressBar2,{className:t.bar2,ownerState:e,style:u.bar2})]}))});var LinearProgress$1=LinearProgress;export{LinearProgress$1 as L};
|
package/js-core.esm42.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as generateUtilityClasses,g as generateUtilityClass,b as styled,_ as _extends,e_ as avatarClasses,bL as Avatar,r as react,u as useThemeProps,e as _objectWithoutPropertiesLoose,j as jsxRuntime,f as clsx,h as composeClasses}from"./js-core.esm.js";function getAvatarGroupUtilityClass(a){return generateUtilityClass("MuiAvatarGroup",a)}const avatarGroupClasses=generateUtilityClasses("MuiAvatarGroup",["root","avatar"]);var avatarGroupClasses$1=avatarGroupClasses;const _excluded=["children","className","componentsProps","max","spacing","total","variant"],SPACINGS={small:-16,medium:null},useUtilityClasses=a=>{a=a.classes;return composeClasses({root:["root"],avatar:["avatar"]},getAvatarGroupUtilityClass,a)},AvatarGroupRoot=styled("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(a,t)=>_extends({["& ."+avatarGroupClasses$1.avatar]:t.avatar},t.root)})(({theme:a})=>({["& ."+avatarClasses.root]:{border:"2px solid "+a.palette.background.default,boxSizing:"content-box",marginLeft:-8,"&:last-child":{marginLeft:0}},display:"flex",flexDirection:"row-reverse"})),AvatarGroupAvatar=styled(Avatar,{name:"MuiAvatarGroup",slot:"Avatar",overridesResolver:(a,t)=>t.avatar})(({theme:a})=>({border:"2px solid "+a.palette.background.default,boxSizing:"content-box",marginLeft:-8,"&:last-child":{marginLeft:0}})),AvatarGroup=react.exports.forwardRef(function(a,t){var a=useThemeProps({props:a,name:"MuiAvatarGroup"});const{children:e,className:s,componentsProps:r={},max:o=5,spacing:l="medium",total:i,variant:n="circular"}=a,v=_objectWithoutPropertiesLoose(a,_excluded);let p=o<2?2:o;a=_extends({},a,{max:o,spacing:l,variant:n});const c=useUtilityClasses(a),u=react.exports.Children.toArray(e).filter(a=>react.exports.isValidElement(a));var d=i||u.length;d===p&&(p+=1),p=Math.min(d+1,p);const m=Math.min(u.length,p-1);d=Math.max(d-p,d-m,0);const x=l&&void 0!==SPACINGS[l]?SPACINGS[l]:-l;return jsxRuntime.exports.jsxs(AvatarGroupRoot,_extends({ownerState:a,className:clsx(c.root,s),ref:t},v,{children:[d?jsxRuntime.exports.jsxs(AvatarGroupAvatar,_extends({ownerState:a,variant:n},r.additionalAvatar,{className:clsx(c.avatar,null==(t=r.additionalAvatar)?void 0:t.className),style:_extends({marginLeft:x},null==(a=r.additionalAvatar)?void 0:a.style),children:["+",d]})):null,u.slice(0,m).reverse().map((a,t)=>react.exports.cloneElement(a,{className:clsx(a.props.className,c.avatar),style:_extends({marginLeft:t===m-1?void 0:x},a.props.style),variant:a.props.variant||n}))]}))});var AvatarGroup$1=AvatarGroup;export{AvatarGroup$1 as A};
|
package/js-core.esm43.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cA as validate}from"./js-core.esm.js";var getRandomValues,rnds8=new Uint8Array(16);function rng(){if(getRandomValues=getRandomValues||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return getRandomValues(rnds8);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}for(var byteToHex=[],i=0;i<256;++i)byteToHex.push((i+256).toString(16).substr(1));function stringify(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,t=(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase();if(validate(t))return t;throw TypeError("Stringified UUID is invalid")}function v4(e,t,o){var r=(e=e||{}).random||(e.rng||rng)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){o=o||0;for(var n=0;n<16;++n)t[o+n]=r[n];return t}return stringify(r)}export{v4 as v};
|
|
1
|
+
import{m as makeStyles,e$ as img$K,j as jsxRuntime,F as FormattedMessage,f0 as img$J,f1 as img$1s,f2 as img$1r,f3 as img$1q,f4 as img$H,f5 as img$1u,f6 as img$G,D as createAction,E as createReducer,i as useDispatch,r as react,k as useSelector,eJ as authSelector,K as lib,bt as getAuthModule,A as AIWareIntlProvider,Z as List,B as Box,$ as ListItem,eO as ListItemAvatar,bL as Avatar,a1 as ListItemText,T as Typography$2,a2 as all,d1 as takeEvery$1}from"./js-core.esm.js";!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}(),makeStyles()(e=>({headerItemContainer:{display:"flex"},itemLabel:{fontWeight:600,color:"#2A323C",marginRight:8}})),makeStyles()(e=>({infoBox:{borderBottom:"0.5px solid #D5DFE9",paddingTop:e.spacing(4),paddingBottom:e.spacing(4),paddingLeft:e.spacing(),display:"flex"},squareBox:{width:150,height:150,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:e.spacing(2)},appInfo:{marginBottom:e.spacing(3)},avatarGird:{display:"flex",alignItems:"center"},avatar:{border:"10px solid #D5DFE9",background:"#F2F5F9",padding:e.spacing(3.4),width:"unset",height:"unset"},appName:{fontWeight:500,fontSize:22,color:"#335B89",lineHeight:"28px"},version:{fontSize:10,color:"#2A323C",lineHeight:"14px"},versionTitle:{fontWeight:600,color:"#2A323C"},appInfoDetail:{marginBottom:e.spacing(3)},buttonSU:{textTransform:"initial",fontWeight:400,fontSize:"10px",padding:e.spacing(.2,2),borderRadius:"2px"}}));const useStyles$1=makeStyles()((e,{backgroundColor:t})=>({boxItem:{display:"flex",padding:0,height:70,borderBottom:"1px solid "+e.palette.divider},avatarContainer:{background:t,width:40,height:40,borderRadius:"50%"},avatar:{width:"40px !important",height:"40px !important",fontSize:"14px !important",margin:"auto !important",marginRight:e.spacing(2.4)+" !important"},avatarIcon:{width:16,height:"auto"},listItemText:{fontSize:"14px!important",lineHeight:"19px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:500,textTransform:"capitalize",color:"#2A323C"},descriptionItemText:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px !important",color:e.palette.secondary.main,lineHeight:"16px"}}));function CustomListItem({item:e,onClick:t}){var s,i=useStyles$1({backgroundColor:e.backgroundColor})["classes"];return jsxRuntime.exports.jsxs(ListItem,Object.assign({button:!0,className:i.boxItem,onClick:(s=e.key,()=>{null!=t&&t(s)}),"data-test":"toggle-"+e.key,"data-testid":"toggle-"+e.key},{children:[jsxRuntime.exports.jsx(ListItemAvatar,{children:jsxRuntime.exports.jsx("div",Object.assign({className:i.avatarContainer},{children:jsxRuntime.exports.jsx(Avatar,{src:e.icon,className:i.avatar,classes:{img:i.avatarIcon}})}))}),jsxRuntime.exports.jsx(ListItemText,{primary:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2",className:i.listItemText},{children:e.label})),secondary:jsxRuntime.exports.jsx(Typography$2,Object.assign({color:"textSecondary",variant:"body2",className:i.descriptionItemText},{children:e.description})),className:i.listItemText})]}))}const adminSettingListItem=[{key:"profile",icon:img$K,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.profile",defaultMessage:"Profile",description:"The label of org info profile label"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.profileDescription",defaultMessage:"View and edit organization info",description:"The description of org info profile label"}),backgroundColor:"#E8F7FF",roles:["superadmin","admin"]},{key:"users",icon:img$J,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.user",defaultMessage:"User",description:"The label of org info user label"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.userDescription",defaultMessage:"View and edit all client users",description:"The description of org info user label"}),backgroundColor:"#E9FFF1",roles:["superadmin","admin"]},{key:"organizations",icon:img$1s,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.orgs",defaultMessage:"Organizations",description:"The label of org info organizations label"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.orgsDescription",defaultMessage:"View and add new organizations",description:"The description of org info organizations description"}),backgroundColor:"#FFF7E2",roles:["superadmin"]},{key:"applications",icon:img$1r,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.apps",defaultMessage:"Applications",description:"The label of org info applications label"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.appsDescription",defaultMessage:"View and edit all clients applications",description:"The description of org info apps description"}),backgroundColor:"#F6EDFF",roles:["superadmin"]},{key:"engines",icon:img$1q,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.engines",defaultMessage:"Engines",description:"The label of org info engines label"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.enginesDescription",defaultMessage:"Manage and edit all client engines",description:"The description of org info engines description"}),backgroundColor:"#FFECE1",roles:["superadmin"]},{key:"edge/overview",icon:img$H,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.overview",defaultMessage:"Overview",description:"The label of org info overview label"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.overviewDescription",defaultMessage:"Administrative view of Edge Ecosystem",description:"The description of org info Edge Ecosystem description"}),backgroundColor:"#FFE8E8",roles:["superadmin","admin"]},{key:"aiware",icon:img$1u,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.edge",defaultMessage:"aiWARE Edge",description:"The label of org info aiware edge label"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.edgeDescription",defaultMessage:"Add and configure software settings",description:"The description of org info aiware edge description"}),backgroundColor:"#EDFBFF",roles:["superadmin","admin"]},{key:"config",icon:img$G,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.configuration",defaultMessage:"Configuration",description:"The label of org info configuration label"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-setting-preference-panel.configurationDescription",defaultMessage:"View and edit all system settings",description:"The description of org info configuration description"}),backgroundColor:"#ECF1FF",roles:["superadmin"]}],GET_SETTING_CONFIGURATION="os-setting-panel/GET_SETTING_CONFIGURATION",GET_SETTING_CONFIGURATION_START="os-setting-panel/GET_SETTING_CONFIGURATION_START",GET_SETTING_CONFIGURATION_SUCCESS="os-setting-panel/GET_SETTING_CONFIGURATION_SUCCESS",GET_SETTING_CONFIGURATION_ERROR="os-setting-panel/GET_SETTING_CONFIGURATION_ERROR",getPreferenceSetting=createAction(GET_SETTING_CONFIGURATION),getPreferenceSettingStart=createAction(GET_SETTING_CONFIGURATION_START),getPreferenceSettingSuccess=createAction(GET_SETTING_CONFIGURATION_SUCCESS,function(e){return{payload:e}}),getPreferenceSettingError=createAction(GET_SETTING_CONFIGURATION_ERROR,function(e){return{payload:e}}),initialState={status:"idle",failureMessage:"",settings:{version:"3.1.1.0193903a",environment:"US AWS Production",edgeClusters:20,processors:3121,storage:65200}},settingReducer=createReducer(initialState,e=>{e.addCase(getPreferenceSettingStart,e=>Object.assign(Object.assign({},e),{status:"loading"})).addCase(getPreferenceSettingSuccess,(e,t)=>Object.assign(Object.assign({},e),{status:"success",settings:t.payload})).addCase(getPreferenceSettingError,(e,t)=>Object.assign(Object.assign({},e),{failureMessage:t.payload,status:"failure"}))}),namespace="settingPreferencePanel",settingSelector=e=>(null==e?void 0:e[namespace])||{};function*getPreferenceSettingSaga(){}function*settingSaga(){yield all([takeEvery$1(getPreferenceSetting().type,getPreferenceSettingSaga)])}function getSettingModule(){return{id:"os-setting-panel",reducerMap:{[namespace]:settingReducer},sagas:[settingSaga],initialActions:[]}}const useStyles=makeStyles()(e=>({root:{overflowX:"hidden",overflowY:"auto",height:"100%"},listMenuBox:{padding:e.spacing(5,7,4,6)},listContainer:{padding:0},listAccounts:{}})),enableApplicationInfo=!1,SettingsPreferencesPanel=()=>{var e=useStyles()["classes"];const t=useDispatch(),[s,i]=react.exports.useState([]),n=(useSelector(settingSelector),useSelector(e=>e.configs))["config"],a=useSelector(authSelector)["user"],o=(react.exports.useEffect(()=>{t(getPreferenceSetting())},[t]),react.exports.useCallback(e=>{var t=n["adminAppUrl"];const{roles:s,organization:{organizationId:i}}=a;s.includes("superadmin")?window.open(t+"/"+e):window.open(t+`/organizations/${i}/`+e)},[a,n]));return react.exports.useEffect(()=>{const e=a["roles"];var t;null!==e&&void 0!==e&&e.includes("superadmin")?(t=adminSettingListItem.filter(e=>e.roles.includes("superadmin")),i(t)):(t=adminSettingListItem.filter(e=>e.roles.includes("admin")),i(t))},[a]),jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getSettingModule(),getAuthModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.root,"data-testid":"setting-preference-panel"},{children:[enableApplicationInfo,jsxRuntime.exports.jsx("div",Object.assign({className:e.listMenuBox},{children:jsxRuntime.exports.jsx(List,Object.assign({className:e.listContainer},{children:jsxRuntime.exports.jsx(Box,Object.assign({className:e.listAccounts},{children:s.map(e=>jsxRuntime.exports.jsx(react.exports.Fragment,{children:jsxRuntime.exports.jsx(CustomListItem,{item:e,onClick:o})},e.key))}))}))}))]}))})}))};export{SettingsPreferencesPanel};
|