iobroker.admin 7.6.13 → 7.6.15

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.
Files changed (30) hide show
  1. package/README.md +7 -8
  2. package/adminWww/assets/{AdapterUpdateDialog-B8g_ZuhP.js → AdapterUpdateDialog-DnnNHIQJ.js} +1 -1
  3. package/adminWww/assets/{Adapters-XtPWdL3s.js → Adapters-Ctxos-gw.js} +4 -4
  4. package/adminWww/assets/{Config-Dhj9WMpz.js → Config-Dyad6_tq.js} +1 -1
  5. package/adminWww/assets/CustomModal-BNDSg_P8.js +1 -0
  6. package/adminWww/assets/{CustomTab-CSgGzXlh.js → CustomTab-BEL1ttN8.js} +1 -1
  7. package/adminWww/assets/{EasyMode-Bwx_UimW.js → EasyMode-3ydknWSd.js} +1 -1
  8. package/adminWww/assets/{Enums-B-PrqYys.js → Enums-nRoQYhch.js} +2 -2
  9. package/adminWww/assets/{Fields-CYjxm_8L.js → Fields-Bwvci3VO.js} +1 -1
  10. package/adminWww/assets/{Files-CsBMd5VX.js → Files-Dzs9GmrC.js} +1 -1
  11. package/adminWww/assets/{Hosts-D7aAXH9U.js → Hosts-BjpHSLCf.js} +3 -3
  12. package/adminWww/assets/{Instances-Bj8CqStT.js → Instances-BtTV4PMv.js} +2 -2
  13. package/adminWww/assets/Intro-DD3K3IVm.js +2 -0
  14. package/adminWww/assets/{Logs-Bb16bYuu.js → Logs-BXU61QOI.js} +1 -1
  15. package/adminWww/assets/{Objects-C7k5tHdx.js → Objects-jsWq-neK.js} +2 -2
  16. package/adminWww/assets/{State-DPLzxZ6D.js → State-CuA1h-bU.js} +1 -1
  17. package/adminWww/assets/{Users-BQ3pWAxq.js → Users-BFdQMyo4.js} +1 -1
  18. package/adminWww/assets/{ace-j1VT51C2.js → ace-CI9-Cq3I.js} +2 -2
  19. package/adminWww/assets/{bootstrap-BNkcLa73.js → bootstrap-FCtLxt0T.js} +14 -14
  20. package/adminWww/assets/{index-jZ28cZd6.js → index-3IvffoSA.js} +1 -1
  21. package/adminWww/assets/{index-C6O1p4S2.js → index-DPxBLJAn.js} +2 -2
  22. package/adminWww/assets/{sentry-9i5rBs6L.js → sentry-BNaNpYqi.js} +1 -1
  23. package/adminWww/assets/{zh-cn-CULr7ytT.js → zh-cn-CbEN7EL2.js} +1 -1
  24. package/adminWww/index.html +1 -1
  25. package/adminWww/mf-manifest.json +1 -1
  26. package/adminWww/remoteEntry.js +2 -2
  27. package/io-package.json +15 -15
  28. package/package.json +12 -7
  29. package/adminWww/assets/CustomModal-4eTuDNla.js +0 -1
  30. package/adminWww/assets/Intro-sAT0x17e.js +0 -2
package/README.md CHANGED
@@ -84,10 +84,16 @@ This project uses icons from [Flaticon](https://www.flaticon.com/).
84
84
  ioBroker GmbH has a valid license for all used icons.
85
85
  The icons may not be reused in other projects without the proper flaticon license or flaticon subscription.
86
86
 
87
+
87
88
  <!--
88
89
  ### **WORK IN PROGRESS**
89
90
  -->
90
- ### 7.6.13 (2025-04-22)
91
+ ### 7.6.15 (2025-04-29)
92
+
93
+ - (@GermanBluefox) Added debug logs to authentication
94
+ - (@GermanBluefox) Corrected the delete button if noDelete flag set for table (JSONConfig)
95
+
96
+ ### 7.6.14 (2025-04-23)
91
97
 
92
98
  - (@GermanBluefox) Added the device type selector and icon to adapter-react-v5
93
99
  - (@GermanBluefox) Fixed authentication issues with oauth2
@@ -107,13 +113,6 @@ The icons may not be reused in other projects without the proper flaticon licens
107
113
  - (@GermanBluefox) Corrected login with password managers
108
114
  - (@GermanBluefox) Added support for the multiple selection for JSON config
109
115
 
110
- ### 7.6.4 (2025-04-01)
111
-
112
- - (@GermanBluefox) Allowed the usage of node-red together with admin with authentication.
113
- - (@GermanBluefox) Added some options for JSON-Config `state`
114
- - (@GermanBluefox) Added possibility to disable basic authentication
115
- - (@GermanBluefox) Changed the order of authentications. Basic authentication will be checked as the last one.
116
-
117
116
  ## License
118
117
 
119
118
  The MIT License (MIT)
@@ -1,2 +1,2 @@
1
- import{j as t}from"./DefaultPropsProvider-BrbE0teb.js";import{i as k}from"./iobroker_admin__loadShare__react__loadShare__-DtlEM_52.js";import{s as f,ab as T,I as w,i as s,a as u,U as y}from"./bootstrap-BNkcLa73.js";import{h as _}from"./zh-cn-CULr7ytT.js";import{S as C}from"./State-DPLzxZ6D.js";const l={closeButton:c=>({position:"absolute",right:8,top:8,color:c.palette.grey[500]}),languageButton:{position:"absolute",right:60,top:8},languageButtonActive:c=>({color:c.palette.primary.main}),typography:{paddingRight:30},version:c=>({background:"#4dabf5",borderRadius:"3px",pl:"10px",fontWeight:"bold",color:c.palette.mode==="dark"?"black":"white"}),wrapperButton:{"@media screen and (max-width: 465px)":{"& *":{fontSize:10}},"@media screen and (max-width: 380px)":{"& *":{fontSize:9}}},messageText:{},messageIcon:{width:32,height:32,marginRight:8},messageColor_warn:{color:"#cb7642"},messageColor_error:{color:"#f5614d"},messageColor_info:{color:"#5abd29"},messageTitle_warn:c=>({background:"#cb7642",borderRadius:"3px",pl:"10px",fontWeight:"bold",color:c.palette.mode==="dark"?"black":"white"}),messageTitle_error:c=>({background:"#f5614d",borderRadius:"3px",pl:"10px",fontWeight:"bold",color:c.palette.mode==="dark"?"black":"white"}),messageTitle_info:c=>({background:"#5abd29",borderRadius:"3px",pl:"10px",fontWeight:"bold",color:c.palette.mode==="dark"?"black":"white"}),messageDialogText:{fontSize:18},messageDialogTitle:{},versionTime:{fontSize:"smaller",opacity:.5,marginLeft:4},dialogPaper:{maxWidth:880},repoStableVersionText:c=>({color:c.palette.mode==="dark"?"#8dff7a":"#2b9800",fontWeight:"bold",marginLeft:"4px"}),repoLatestVersionText:c=>({color:c.palette.mode==="dark"?"#a3fcff":"#005498",fontWeight:"bold",marginLeft:"4px"})};function D(c,e,d,n){let p=null;return c&&c.forEach(o=>{let g=!o.condition||!o.condition.rules;if(o.condition&&o.condition.rules){const x=(Array.isArray(o.condition.rules)?o.condition.rules:[o.condition.rules]).map(i=>{let r,a,h;if(i.includes("oldVersion"))r=e,i=i.substring(10);else if(i.includes("newVersion"))r=d,i=i.substring(10);else{if(i==="installed")return!!e;if(i==="!"||i==="not-installed")return!e;if(n){const v=i.match(/([a-z][-a-z_0-9]+)([!=<>]+)([.\d]+)/);if(v){const m=Object.keys(n).find(b=>{var j;return((j=n[b])==null?void 0:j.name)===v[1]});if(m){r=n[m].version,a=v[2],h=v[3];try{return a==="=="?f.eq(r,h):a===">"?f.gt(r,h):a==="<"?f.lt(r,h):a===">="?f.gte(r,h):a==="<="?f.lte(r,h):a==="!="?f.neq(r,h):(console.warn(`Unknown rule ${r}${i}`),!1)}catch{return console.warn(`Cannot compare ${r}${i}`),!1}}}else if(i.match(/^[!=<>]+/)){if(i.startsWith("!")){const m=i.substring(1);if(!Object.keys(n).find(b=>{var j;return((j=n[b])==null?void 0:j.name)===m}))return!0}}else if(Object.keys(n).find(m=>{var b;return((b=n[m])==null?void 0:b.name)===i}))return!0;return!1}}i[1]>="0"&&i[1]<="9"?(a=i[0],h=i.substring(1)):(a=i.substring(0,2),h=i.substring(2));try{if(a==="==")return f.eq(r,h);if(a===">")return f.gt(r,h);if(a==="<")return f.lt(r,h);if(a===">=")return f.gte(r,h);if(a==="<=")return f.lte(r,h);if(a==="!=")return f.neq(r,h);console.warn(`Unknown rule ${r}${i}`)}catch{console.warn(`Cannot compare ${r}${i}`)}return!1});o.condition.operand==="or"?g=x.find(i=>i):g=x.findIndex(i=>!i)===-1}g&&(p=p||[],p.push({title:o.title,text:o.text,link:o.link,linkText:o.linkText,buttons:o.buttons,level:o.level}))}),p}class $ extends k.Component{t;mobile;messages;lang;constructor(e){var n,p;super(e),this.t=e.t,this.mobile=window.innerWidth<T,this.state={showMessageDialog:!1};const d=!1;this.messages=D(((n=this.props.adapterObject)==null?void 0:n.messages)||d,this.props.installedVersion,(p=this.props.adapterObject)==null?void 0:p.version,this.props.instances),this.lang=w.getLanguage(),_.locale(this.lang)}getDependencies(){return(this.props.dependencies||[]).map(e=>t.jsx(C,{state:e.rightVersion,children:`${e.name}${e.version?` (${e.version})`:""}: ${e.installed?e.installedVersion:"-"}`},e.name))}getNews(){var p;const e=[];let d,n;return this.props.isStable!==void 0&&(this.props.isStable?(d=this.props.adapterObject.version,n=this.props.adapterObject.latestVersion):(d=this.props.adapterObject.stable,n=this.props.adapterObject.version)),(p=this.props.news)==null||p.forEach(o=>{var x,i,r;const g=(o.news?o.news.split(`
1
+ import{j as t}from"./DefaultPropsProvider-BrbE0teb.js";import{i as k}from"./iobroker_admin__loadShare__react__loadShare__-DtlEM_52.js";import{s as f,ab as T,I as w,i as s,a as u,U as y}from"./bootstrap-FCtLxt0T.js";import{h as _}from"./zh-cn-CbEN7EL2.js";import{S as C}from"./State-CuA1h-bU.js";const l={closeButton:c=>({position:"absolute",right:8,top:8,color:c.palette.grey[500]}),languageButton:{position:"absolute",right:60,top:8},languageButtonActive:c=>({color:c.palette.primary.main}),typography:{paddingRight:30},version:c=>({background:"#4dabf5",borderRadius:"3px",pl:"10px",fontWeight:"bold",color:c.palette.mode==="dark"?"black":"white"}),wrapperButton:{"@media screen and (max-width: 465px)":{"& *":{fontSize:10}},"@media screen and (max-width: 380px)":{"& *":{fontSize:9}}},messageText:{},messageIcon:{width:32,height:32,marginRight:8},messageColor_warn:{color:"#cb7642"},messageColor_error:{color:"#f5614d"},messageColor_info:{color:"#5abd29"},messageTitle_warn:c=>({background:"#cb7642",borderRadius:"3px",pl:"10px",fontWeight:"bold",color:c.palette.mode==="dark"?"black":"white"}),messageTitle_error:c=>({background:"#f5614d",borderRadius:"3px",pl:"10px",fontWeight:"bold",color:c.palette.mode==="dark"?"black":"white"}),messageTitle_info:c=>({background:"#5abd29",borderRadius:"3px",pl:"10px",fontWeight:"bold",color:c.palette.mode==="dark"?"black":"white"}),messageDialogText:{fontSize:18},messageDialogTitle:{},versionTime:{fontSize:"smaller",opacity:.5,marginLeft:4},dialogPaper:{maxWidth:880},repoStableVersionText:c=>({color:c.palette.mode==="dark"?"#8dff7a":"#2b9800",fontWeight:"bold",marginLeft:"4px"}),repoLatestVersionText:c=>({color:c.palette.mode==="dark"?"#a3fcff":"#005498",fontWeight:"bold",marginLeft:"4px"})};function D(c,e,d,n){let p=null;return c&&c.forEach(o=>{let g=!o.condition||!o.condition.rules;if(o.condition&&o.condition.rules){const x=(Array.isArray(o.condition.rules)?o.condition.rules:[o.condition.rules]).map(i=>{let r,a,h;if(i.includes("oldVersion"))r=e,i=i.substring(10);else if(i.includes("newVersion"))r=d,i=i.substring(10);else{if(i==="installed")return!!e;if(i==="!"||i==="not-installed")return!e;if(n){const v=i.match(/([a-z][-a-z_0-9]+)([!=<>]+)([.\d]+)/);if(v){const m=Object.keys(n).find(b=>{var j;return((j=n[b])==null?void 0:j.name)===v[1]});if(m){r=n[m].version,a=v[2],h=v[3];try{return a==="=="?f.eq(r,h):a===">"?f.gt(r,h):a==="<"?f.lt(r,h):a===">="?f.gte(r,h):a==="<="?f.lte(r,h):a==="!="?f.neq(r,h):(console.warn(`Unknown rule ${r}${i}`),!1)}catch{return console.warn(`Cannot compare ${r}${i}`),!1}}}else if(i.match(/^[!=<>]+/)){if(i.startsWith("!")){const m=i.substring(1);if(!Object.keys(n).find(b=>{var j;return((j=n[b])==null?void 0:j.name)===m}))return!0}}else if(Object.keys(n).find(m=>{var b;return((b=n[m])==null?void 0:b.name)===i}))return!0;return!1}}i[1]>="0"&&i[1]<="9"?(a=i[0],h=i.substring(1)):(a=i.substring(0,2),h=i.substring(2));try{if(a==="==")return f.eq(r,h);if(a===">")return f.gt(r,h);if(a==="<")return f.lt(r,h);if(a===">=")return f.gte(r,h);if(a==="<=")return f.lte(r,h);if(a==="!=")return f.neq(r,h);console.warn(`Unknown rule ${r}${i}`)}catch{console.warn(`Cannot compare ${r}${i}`)}return!1});o.condition.operand==="or"?g=x.find(i=>i):g=x.findIndex(i=>!i)===-1}g&&(p=p||[],p.push({title:o.title,text:o.text,link:o.link,linkText:o.linkText,buttons:o.buttons,level:o.level}))}),p}class $ extends k.Component{t;mobile;messages;lang;constructor(e){var n,p;super(e),this.t=e.t,this.mobile=window.innerWidth<T,this.state={showMessageDialog:!1};const d=!1;this.messages=D(((n=this.props.adapterObject)==null?void 0:n.messages)||d,this.props.installedVersion,(p=this.props.adapterObject)==null?void 0:p.version,this.props.instances),this.lang=w.getLanguage(),_.locale(this.lang)}getDependencies(){return(this.props.dependencies||[]).map(e=>t.jsx(C,{state:e.rightVersion,children:`${e.name}${e.version?` (${e.version})`:""}: ${e.installed?e.installedVersion:"-"}`},e.name))}getNews(){var p;const e=[];let d,n;return this.props.isStable!==void 0&&(this.props.isStable?(d=this.props.adapterObject.version,n=this.props.adapterObject.latestVersion):(d=this.props.adapterObject.stable,n=this.props.adapterObject.version)),(p=this.props.news)==null||p.forEach(o=>{var x,i,r;const g=(o.news?o.news.split(`
2
2
  `):[]).map(a=>a.trim().replace(/^\*\s*/,"").replace(/<!--[^>]*->/,"").replace(/<! -[^>]*->/,"").replace(/<!--|--!?>/g,"").trim()).filter(a=>!!a);(x=this.props.adapterObject)!=null&&x.version&&o.version&&f.gt(o.version,(i=this.props.adapterObject)==null?void 0:i.version)||e.push(t.jsxs(s.Grid2,{children:[t.jsxs(s.Typography,{sx:l.version,children:[o.version,n&&n===o.version?t.jsx(s.Box,{component:"span",sx:l.repoLatestVersionText,children:"(latest)"}):null,d&&d===o.version?t.jsx(s.Box,{component:"span",sx:l.repoStableVersionText,children:`(${w.t("stable")})`}):null,((r=this.props.adapterObject)==null?void 0:r.version)===o.version?t.jsxs("span",{style:l.versionTime,children:["(",_(this.props.adapterObject.versionDate).fromNow(),")"]}):null]}),g.map((a,h)=>t.jsx(s.Typography,{component:"div",variant:"body2",children:`• ${a}`},`${o.version}-${h}`))]},o.version))}),e}getText(e,d){return e&&typeof e=="object"?d?e.en:e[this.lang]||e.en:typeof e=="object"?"":e}renderOneMessage(e,d){return t.jsxs(s.Grid2,{children:[t.jsx(s.Typography,{sx:l[`messageTitle_${e.level||"warn"}`],children:this.getText(e.title,this.props.noTranslation)||""}),t.jsx(s.Typography,{component:"div",variant:"body2",style:l.messageText,children:this.getText(e.text,this.props.noTranslation)||""}),e.link?t.jsx(s.Button,{onClick:()=>{window.open(e.link,"_blank").focus()},startIcon:t.jsx(u.Public,{}),variant:"contained",color:"grey",children:this.getText(e.linkText,this.props.noTranslation)||this.props.t("More info")}):null]},d)}renderMessages(){return this.messages?t.jsx(s.Grid2,{container:!0,spacing:2,direction:"column",wrap:"nowrap",sx:{marginBottom:1},children:this.messages.map((e,d)=>this.renderOneMessage(e,d))}):null}renderMessageDialog(){var n;if(!this.state.showMessageDialog)return null;const e=this.messages.find(p=>p.buttons),d=(n=this.props.adapterObject)==null?void 0:n.version;return t.jsxs(s.Dialog,{onClose:()=>this.setState({showMessageDialog:!1}),open:!0,children:[t.jsx(s.DialogTitle,{style:l.messageDialogTitle,children:this.getText(e.title,this.props.noTranslation)||this.props.t("Please confirm")}),t.jsxs(s.DialogContent,{style:l.messageDialogText,children:[e.level==="warn"?t.jsx(u.Warning,{style:{...l.messageIcon,...l.messageColor_warn}}):null,e.level==="error"?t.jsx(u.Error,{style:{...l.messageIcon,...l.messageColor_error}}):null,e.level==="info"?t.jsx(u.Info,{style:{...l.messageIcon,...l.messageColor_info}}):null,this.getText(e.text,this.props.noTranslation)]}),t.jsxs(s.DialogActions,{children:[e.link?t.jsx(s.Button,{onClick:()=>{window.open(e.link,"_blank").focus()},startIcon:t.jsx(u.Public,{}),variant:"contained",color:"secondary",children:this.getText(e.linkText,this.props.noTranslation)||this.props.t("More info")}):null,e.link?t.jsx("div",{style:{flexGrow:1}}):null,e.buttons.map((p,o)=>p==="ok"?t.jsx(s.Button,{variant:"contained",onClick:()=>this.setState({showMessageDialog:!1},()=>this.props.onUpdate(d)),color:"primary",startIcon:t.jsx(u.Check,{}),children:this.t("Update")},o):p==="agree"?t.jsx(s.Button,{sx:l[`messageTitle_${e.level||"warn"}`],variant:"contained",onClick:()=>this.setState({showMessageDialog:!1},()=>this.props.onUpdate(d)),color:"primary",startIcon:t.jsx(u.Check,{}),children:this.t("Agree")},o):p==="cancel"?t.jsx(s.Button,{variant:"contained",onClick:()=>this.setState({showMessageDialog:!1}),startIcon:t.jsx(u.Close,{}),color:"grey",children:this.t("Cancel")},o):null)]})]})}render(){var p,o;const e=(p=this.props.adapterObject)==null?void 0:p.version,d=(o=this.props.news)==null?void 0:o.every(g=>g.downloaded),n=this.getNews();return t.jsxs(s.Dialog,{onClose:this.props.onClose,open:!0,sx:{"& .MuiDialog-paper":l.dialogPaper},children:[this.renderMessageDialog(),t.jsx(s.DialogTitle,{children:t.jsxs(s.Typography,{component:"h2",variant:"h6",sx:{"&.MuiTypography-root":l.typography},children:[t.jsx("div",{style:{width:"calc(100% - 60px)"},children:this.t('Update "%s" to v%s',this.props.adapter,e)}),t.jsx(s.IconButton,{size:"large",sx:l.closeButton,onClick:this.props.onClose,children:t.jsx(u.Close,{})}),this.lang!=="en"&&this.props.toggleTranslation&&!d?t.jsx(s.IconButton,{size:"large",style:y.getStyle(this.props.theme,l.languageButton,this.props.noTranslation&&l.languageButtonActive),onClick:this.props.toggleTranslation,title:w.t("Disable/Enable translation"),children:t.jsx(u.Language,{})}):null]})}),t.jsxs(s.DialogContent,{dividers:!0,children:[this.renderMessages(),t.jsxs(s.Grid2,{container:!0,direction:"column",spacing:2,wrap:"nowrap",children:[this.props.dependencies&&this.props.dependencies.length>0&&this.props.dependencies.find(g=>!g.rightVersion)&&t.jsxs(s.Grid2,{children:[t.jsx(s.Typography,{variant:"h6",gutterBottom:!0,children:this.t("Dependencies")}),this.getDependencies()]}),n.length?t.jsxs(s.Grid2,{children:[t.jsx(s.Typography,{variant:"h6",gutterBottom:!0,children:this.t("Change log")}),t.jsx(s.Grid2,{container:!0,spacing:2,direction:"column",wrap:"nowrap",children:n})]}):this.t("No change log available")]})]}),t.jsxs(s.DialogActions,{sx:l.wrapperButton,children:[!!this.props.rightDependencies&&this.props.onIgnore&&e&&t.jsx(s.Button,{id:"adapter-update-dialog-ignore",variant:"outlined",onClick:()=>this.props.onIgnore(e),color:"primary",children:this.t("Ignore version %s",e)}),t.jsx(s.Button,{variant:"contained",id:"adapter-update-dialog-ok",autoFocus:!0,disabled:!this.props.rightDependencies||!e||!this.props.adapterObject,onClick:()=>{var g;(g=this.messages)!=null&&g.find(x=>x.buttons)?this.setState({showMessageDialog:!0}):this.props.onUpdate(e)},color:"primary",startIcon:t.jsx(u.Check,{}),children:this.mobile?null:this.props.textUpdate?this.props.textUpdate:this.t("Update")}),this.props.textInstruction?t.jsx(s.Button,{id:"adapter-update-dialog-instructions",variant:"contained",autoFocus:!0,disabled:!this.props.rightDependencies||!e||!this.props.adapterObject,onClick:()=>{var g;(g=this.messages)!=null&&g.find(x=>x.buttons)?this.setState({showMessageDialog:!0}):this.props.onInstruction()},color:"primary",startIcon:t.jsx(u.Book,{}),children:this.mobile?null:this.props.textInstruction}):null,t.jsx(s.Button,{id:"adapter-update-dialog-cancel",variant:"contained",onClick:()=>this.props.onClose(),color:"grey",startIcon:t.jsx(u.Close,{}),children:this.mobile?null:this.t("Close")})]})]})}}export{$ as A,D as c};