iobroker.admin 7.6.7 → 7.6.8

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 (41) hide show
  1. package/README.md +5 -3
  2. package/admin/admin.svg +9 -5
  3. package/admin/favicon.ico +0 -0
  4. package/adminWww/admin.svg +10 -0
  5. package/adminWww/assets/{AdapterUpdateDialog-BieWG-tE.js → AdapterUpdateDialog-DfY1EBeu.js} +1 -1
  6. package/adminWww/assets/{Adapters-B7-VfkLG.js → Adapters-BrSTSdYu.js} +6 -6
  7. package/adminWww/assets/{Config-BhUkOTrM.js → Config-BeaTGYt-.js} +1 -1
  8. package/adminWww/assets/{CustomModal-Ba5hfI_h.js → CustomModal-BSLr10lF.js} +1 -1
  9. package/adminWww/assets/{CustomTab-C1nE_EcS.js → CustomTab-DZDKxorM.js} +1 -1
  10. package/adminWww/assets/{EasyMode-9hRdDZ1P.js → EasyMode-D3a5jCze.js} +1 -1
  11. package/adminWww/assets/{Enums-xyMxWmPL.js → Enums-lPqrc5OI.js} +1 -1
  12. package/adminWww/assets/{Fields-Bxijg57s.js → Fields-D_v9Mg1T.js} +1 -1
  13. package/adminWww/assets/{Files-BdCvappT.js → Files-DrT8yw7T.js} +1 -1
  14. package/adminWww/assets/{Hosts-B_dIGjO0.js → Hosts-Df2pGFj8.js} +3 -3
  15. package/adminWww/assets/{Instances-CdkcZXnd.js → Instances-OgW4ZkNO.js} +2 -2
  16. package/adminWww/assets/{Intro-BRMdQ3Sl.js → Intro-DlDd3mui.js} +1 -1
  17. package/adminWww/assets/{Logs-ChOjjza5.js → Logs-DkZQc3-M.js} +1 -1
  18. package/adminWww/assets/{Objects-CMDaXfW1.js → Objects-T8KyIeKi.js} +1 -1
  19. package/adminWww/assets/{State-CoxCvg3G.js → State-kQYnRpbf.js} +1 -1
  20. package/adminWww/assets/{Users-D6YFG6tJ.js → Users-DARcEk9V.js} +1 -1
  21. package/adminWww/assets/{bootstrap-BWDyX0h-.js → bootstrap-DESn3yW0.js} +67 -63
  22. package/adminWww/assets/{index-Dkw9fN1u.js → index-BsWGIWid.js} +2 -2
  23. package/adminWww/assets/{longLogo-M8FxSFU3.svg → longLogo-Cq2C5cCK.svg} +28 -37
  24. package/adminWww/assets/{sentry-DsYPJQR2.js → sentry-BcqbMQII.js} +1 -1
  25. package/adminWww/assets/{zh-cn-BzH86T_R.js → zh-cn-DDW2Iu8L.js} +1 -1
  26. package/adminWww/favicon.ico +0 -0
  27. package/adminWww/img/admin.png +0 -0
  28. package/adminWww/img/admin.svg +9 -5
  29. package/adminWww/img/logo.svg +9 -0
  30. package/adminWww/img/no-image.svg +9 -0
  31. package/adminWww/index.html +1 -1
  32. package/adminWww/manifest.json +4 -9
  33. package/adminWww/mf-manifest.json +1 -1
  34. package/adminWww/remoteEntry.js +2 -2
  35. package/io-package.json +14 -14
  36. package/package.json +6 -6
  37. package/adminWww/assets/logo-DkawDj71.png +0 -0
  38. package/adminWww/img/logo.png +0 -0
  39. package/adminWww/img/no-image.png +0 -0
  40. package/adminWww/logo192.png +0 -0
  41. package/adminWww/logo512.png +0 -0
package/README.md CHANGED
@@ -87,6 +87,11 @@ The icons may not be reused in other projects without the proper flaticon licens
87
87
  <!--
88
88
  ### **WORK IN PROGRESS**
89
89
  -->
90
+ ### 7.6.8 (2025-04-19)
91
+
92
+ - (@GermanBluefox) Allowed following of the `url` types in the object browser
93
+ - (@GermanBluefox) Allowed login by pressing the enter key
94
+
90
95
  ### 7.6.7 (2025-04-15)
91
96
 
92
97
  - (@GermanBluefox) Corrected login with password managers
@@ -108,9 +113,6 @@ The icons may not be reused in other projects without the proper flaticon licens
108
113
  - (@mcm1957) Schema at `ioBroker.admin` is now used to validate jsonConfig.json file
109
114
  - (@GermanBluefox) Corrected the small GUI issues
110
115
 
111
- ### 7.6.2 (2025-03-09)
112
- - (@GermanBluefox) Corrected loading of custom JSON components
113
-
114
116
  ## License
115
117
 
116
118
  The MIT License (MIT)
package/admin/admin.svg CHANGED
@@ -1,6 +1,10 @@
1
- <svg width="1024" height="1024" xmlns="http://www.w3.org/2000/svg">
2
- <path d="m476,4l57,0l14,1l2,2l7,29l11,44l1,5l10,1l29,6l30,8l21,7l4,0l2,-4l8,-8l7,-8l9,-9l7,-8l12,-13l8,-9l5,1l25,12l21,12l19,12l16,11l12,9l1,4l-13,42l-10,31l3,5l26,26l7,8l9,10l13,17l3,5l8,-1l64,-16l11,-2l20,34l10,19l14,31l6,15l-1,5l-16,13l-14,11l-17,14l-14,11l1,7l6,27l5,31l3,30l31,10l39,12l9,4l1,4l-4,58l-4,32l-4,18l-2,2l-63,8l-20,2l-3,14l-8,24l-11,26l-10,20l0,5l13,16l11,14l13,16l11,14l2,5l-12,18l-14,19l-8,10l-12,14l-7,8l-8,9l-2,0l-2,4l-7,6l-40,-20l-19,-10l-14,-7l-4,2l-12,11l-19,14l-19,12l-14,8l-9,4l3,39l4,46l-5,3l-20,9l-30,11l-36,11l-16,4l-6,-8l-16,-28l-14,-24l-6,-11l0,-2l-24,3l-24,2l-37,0l-11,-1l-8,16l-14,30l-15,30l-27,-5l-31,-7l-31,-9l-21,-8l-1,-1l0,-39l1,-43l-16,-8l-25,-13l-21,-14l-15,-11l-5,1l-26,15l-22,13l-21,12l-4,-1l-12,-13l-24,-24l-7,-8l-11,-12l-9,-11l-9,-10l0,-2l-2,0l-1,-5l29,-43l17,-26l-2,-5l-12,-18l-9,-16l-11,-23l-7,-20l0,-2l-67,0l-17,-1l-3,-8l-8,-36l-6,-35l-4,-32l1,-5l76,-30l1,-35l3,-31l4,-26l-1,-5l-18,-12l-16,-11l-23,-16l-8,-6l2,-9l10,-29l11,-27l12,-26l8,-14l12,1l65,12l6,0l11,-18l12,-16l8,-10l9,-10l7,-8l9,-9l1,-5l-28,-64l-3,-6l1,-4l13,-12l11,-9l18,-14l24,-16l21,-13l4,-3l4,1l10,9l13,12l15,14l12,11l9,8l6,-1l24,-10l22,-7l25,-6l12,-2l3,-13l11,-68l2,-3l11,-2l32,-3zm93,268l0,481l7,-1l24,-8l18,-8l17,-9l18,-12l13,-10l10,-9l12,-11l9,-10l11,-14l11,-16l9,-15l11,-24l9,-27l5,-22l3,-19l1,-13l0,-23l-2,-22l-4,-23l-7,-25l-8,-21l-11,-22l-10,-16l-10,-14l-11,-13l-9,-10l-8,-8l-11,-9l-13,-10l-19,-12l-15,-8l-19,-8l-21,-7l-10,-2zm-125,0l-27,9l-22,10l-14,8l-15,10l-12,9l-15,13l-19,19l-11,14l-12,18l-9,16l-9,19l-9,27l-5,22l-3,21l-1,16l0,21l3,27l5,24l5,16l8,21l10,21l12,19l14,19l14,15l15,15l14,11l10,7l21,13l21,10l19,7l12,4l2,0l0,-481l-2,0z" fill="#BBBCBC" />
3
- <path d="m411.3633,106.09091l2.17928,-0.41564l-0.17928,115.41564l-35,14l-22,11l-20,12l-15,11l-13,10l-24,22l-7,8l-10,11l-8,11l-13,19l-12,21l-11,23l-9,25l-7,26l-4,21l-2,16l-1,20l0,15l2,31l4,24l8,30l9,25l14,29l13,21l9,13l11,14l12,13l7,8l8,8l11,9l16,13l23,15l22,12l23,10l30,10l28,6l31,4l12,1l18,0l34,-3l28,-5l25,-7l22,-8l20,-9l23,-13l19,-13l13,-10l11,-10l8,-7l15,-15l1,-2l2,0l2,-4l10,-12l8,-11l10,-15l12,-21l9,-19l10,-27l7,-26l4,-22l2,-16l1,-14l0,-27l-3,-30l-3,-17l-6,-24l-8,-24l-10,-23l-11,-21l-11,-17l-10,-14l-12,-14l-9,-10l-5,-6l-8,-7l-13,-12l-12,-9l-14,-10l-20,-12l-21,-11l-20,-8l-16,-6l-1,-1l-0.17527,-115.06223l10.17527,2.06223l30,9l29,11l29,14l18,10l19,12l20,14l10,8l16,13l15,15l4,3l0,2l2,0l7,8l13,14l11,14l11,15l10,15l9,15l9,16l8,16l11,25l10,28l6,21l5,22l4,24l3,29l0,56l-2,23l-5,32l-5,22l-8,28l-10,27l-8,19l-10,19l-10,18l-13,20l-10,14l-10,13l-13,15l-9,10l-24,24l-11,9l-13,11l-18,13l-14,9l-15,9l-16,9l-26,12l-29,11l-30,9l-29,6l-28,4l-29,2l-37,0l-31,-3l-30,-5l-25,-6l-26,-8l-25,-10l-24,-11l-20,-11l-23,-14l-18,-13l-14,-11l-10,-9l-8,-7l-16,-15l-1,-3l-2,0l-7,-8l-10,-11l-11,-14l-10,-13l-14,-21l-10,-17l-15,-29l-10,-24l-8,-23l-8,-28l-5,-23l-5,-36l-2,-25l0,-30l2,-28l4,-30l5,-25l7,-26l10,-29l12,-28l10,-20l10,-17l13,-20l8,-11l9,-12l9,-11l12,-13l7,-8l11,-11l8,-7l11,-10l10,-8l19,-14l15,-10l15,-9l22,-12l26,-12l30,-11l29,-8l4,-1z" fill="#154578" />
4
- <path d="m496,239.53097l17,0l29,3l23,4l3.53571,1.07301c0.1107,6.65474 0.22139,14.05949 0.33208,20.71423l0.13221,11.21276l0,484l0,8.25l-6,1.75l-16,3l-17,2l-15,1l-18,0l-24,-2l-20,-4l-7.25,-2.25l-0.5,-2l-0.25,-14.75l1.17699,-505.88495l6.82301,-2.11505l23,-5l20,-2z" fill="#3399CA" />
5
- <path d="m483.41176,96.41176l43,0l34,3l7.53097,1.46903l-0.70796,114.30088l-8.82301,-1.76991l-20,-3l-20.47059,-2l-25.52941,0l-29,3l-8,1l-9.88496,1.59292l-0.11504,-4.59292l0,-67l0.28255,-40.87705l5.71745,-1.12295l20,-3l12,-1z" fill="#3399CB" />
1
+ <svg viewBox="0 0 57 57" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M33.0562 0H24.2249L22.4179 8.406H34.8854M36 43.4545H21.9999L24.2249 57H33.0562" fill="#BBBCBC"/>
3
+ <path d="M51.376 11.376L45.3746 5.37458L34.6618 12.4923L44.0652 23.148M22.6982 43.8935L12.4031 33.5969L5.06949 45.6797L11.071 51.6811" fill="#BBBCBC"/>
4
+ <path d="M57 32.2V23.8L43.8446 21L43.0399 35M12.9983 35V21L0 23.8V32.2" fill="#BBBCBC"/>
5
+ <path d="M46.1812 51.8188L52.1317 45.8683L44.1074 34.1074L39.4647 40.7696L33.9348 43.7338M13.5426 22.9853L22.4939 13.0783L11.8266 5.56323L5.87614 11.5137" fill="#BBBCBC"/>
6
+ <path d="M28.5 7C22.7978 7 17.3292 9.26517 13.2972 13.2972C9.26517 17.3292 7 22.7978 7 28.5C7 34.2022 9.26517 39.6708 13.2972 43.7028C17.3292 47.7348 22.7978 50 28.5 50C34.2022 50 39.6708 47.7348 43.7028 43.7028C47.7348 39.6708 50 34.2022 50 28.5C50 22.7978 47.7348 17.3292 43.7028 13.2972C39.6708 9.26517 34.2022 7 28.5 7V14.147C31.161 14.147 36.2171 15.7171 38 17.5C39.8816 19.3816 46.1959 24.4346 46.1959 27.0956C46.1959 29.7566 42.8131 38.3064 40.9315 40.188C39.0499 42.0696 32.4685 45.0862 29.8075 45.0862C27.1465 45.0862 17.8185 42.9394 15.9369 41.0578C14.0553 39.1762 13 30.161 13 27.5C13 24.839 16.1184 19.3816 18 17.5C19.9093 16.2464 26.082 13.9664 28.5 14.147" fill="#BBBCBC"/>
7
+ <path d="M33.4983 9.64819V15.1384C39.0143 17.1473 42.9612 22.3814 42.9612 28.5039C42.9612 36.3551 36.4747 42.7418 28.5081 42.7418C20.5415 42.7418 14.055 36.3551 14.055 28.5039C14.055 22.3814 18.0019 17.1473 23.5178 15.1384V9.64819C15.1549 11.8491 9 19.4522 9 28.4959C9 39.2683 17.7269 47.9999 28.5 47.9999C39.2731 47.9999 48 39.2683 48 28.4959C48 19.4522 41.8451 11.8491 33.4983 9.64819Z" fill="#164477"/>
8
+ <path d="M28.5004 14.2582C29.5033 14.2582 30.4819 14.3622 31.4363 14.5543V9.21609C30.4819 9.07203 29.5033 9 28.5004 9C27.4975 9 26.5269 9.07203 25.5645 9.21609V14.5543C26.5188 14.3622 27.4975 14.2582 28.5004 14.2582Z" fill="#3399CC"/>
9
+ <path d="M28.4996 16.395C27.4886 16.395 26.51 16.5151 25.5718 16.7472V40.0367C26.51 40.2688 27.4967 40.3889 28.4996 40.3889C29.5106 40.3889 30.4892 40.2688 31.4355 40.0367V16.7472C30.4973 16.5231 29.5106 16.395 28.4996 16.395Z" fill="#3399CC"/>
6
10
  </svg>
package/admin/favicon.ico CHANGED
Binary file
@@ -0,0 +1,10 @@
1
+ <svg viewBox="0 0 57 57" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M33.0562 0H24.2249L22.4179 8.406H34.8854M36 43.4545H21.9999L24.2249 57H33.0562" fill="#BBBCBC"/>
3
+ <path d="M51.376 11.376L45.3746 5.37458L34.6618 12.4923L44.0652 23.148M22.6982 43.8935L12.4031 33.5969L5.06949 45.6797L11.071 51.6811" fill="#BBBCBC"/>
4
+ <path d="M57 32.2V23.8L43.8446 21L43.0399 35M12.9983 35V21L0 23.8V32.2" fill="#BBBCBC"/>
5
+ <path d="M46.1812 51.8188L52.1317 45.8683L44.1074 34.1074L39.4647 40.7696L33.9348 43.7338M13.5426 22.9853L22.4939 13.0783L11.8266 5.56323L5.87614 11.5137" fill="#BBBCBC"/>
6
+ <path d="M28.5 7C22.7978 7 17.3292 9.26517 13.2972 13.2972C9.26517 17.3292 7 22.7978 7 28.5C7 34.2022 9.26517 39.6708 13.2972 43.7028C17.3292 47.7348 22.7978 50 28.5 50C34.2022 50 39.6708 47.7348 43.7028 43.7028C47.7348 39.6708 50 34.2022 50 28.5C50 22.7978 47.7348 17.3292 43.7028 13.2972C39.6708 9.26517 34.2022 7 28.5 7V14.147C31.161 14.147 36.2171 15.7171 38 17.5C39.8816 19.3816 46.1959 24.4346 46.1959 27.0956C46.1959 29.7566 42.8131 38.3064 40.9315 40.188C39.0499 42.0696 32.4685 45.0862 29.8075 45.0862C27.1465 45.0862 17.8185 42.9394 15.9369 41.0578C14.0553 39.1762 13 30.161 13 27.5C13 24.839 16.1184 19.3816 18 17.5C19.9093 16.2464 26.082 13.9664 28.5 14.147" fill="#BBBCBC"/>
7
+ <path d="M33.4983 9.64819V15.1384C39.0143 17.1473 42.9612 22.3814 42.9612 28.5039C42.9612 36.3551 36.4747 42.7418 28.5081 42.7418C20.5415 42.7418 14.055 36.3551 14.055 28.5039C14.055 22.3814 18.0019 17.1473 23.5178 15.1384V9.64819C15.1549 11.8491 9 19.4522 9 28.4959C9 39.2683 17.7269 47.9999 28.5 47.9999C39.2731 47.9999 48 39.2683 48 28.4959C48 19.4522 41.8451 11.8491 33.4983 9.64819Z" fill="#164477"/>
8
+ <path d="M28.5004 14.2582C29.5033 14.2582 30.4819 14.3622 31.4363 14.5543V9.21609C30.4819 9.07203 29.5033 9 28.5004 9C27.4975 9 26.5269 9.07203 25.5645 9.21609V14.5543C26.5188 14.3622 27.4975 14.2582 28.5004 14.2582Z" fill="#3399CC"/>
9
+ <path d="M28.4996 16.395C27.4886 16.395 26.51 16.5151 25.5718 16.7472V40.0367C26.51 40.2688 27.4967 40.3889 28.4996 40.3889C29.5106 40.3889 30.4892 40.2688 31.4355 40.0367V16.7472C30.4973 16.5231 29.5106 16.395 28.4996 16.395Z" fill="#3399CC"/>
10
+ </svg>
@@ -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-BWDyX0h-.js";import{h as _}from"./zh-cn-BzH86T_R.js";import{S as C}from"./State-CoxCvg3G.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-DESn3yW0.js";import{h as _}from"./zh-cn-DDW2Iu8L.js";import{S as C}from"./State-kQYnRpbf.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};