iobroker.mywebui 1.75.0 → 1.76.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.
Files changed (236) hide show
  1. package/default-controls/controls/gauges/gauge-table.control +1 -1
  2. package/default-controls/controls/gauges/linear-gauge.control +1 -1
  3. package/dist/backend/3d-editor-integration.js +1 -1
  4. package/dist/backend/ImportmapCreator.js +1 -1
  5. package/dist/backend/UploadHelper.js +1 -1
  6. package/dist/backend/main.js +1 -1
  7. package/io-package.json +1 -1
  8. package/package.json +1 -1
  9. package/www/3d-editor/js/Animation.js +1 -1
  10. package/www/3d-editor/js/AnimationResizer.js +1 -1
  11. package/www/3d-editor/js/Command.js +1 -1
  12. package/www/3d-editor/js/Config.js +1 -1
  13. package/www/3d-editor/js/Editor.js +1 -1
  14. package/www/3d-editor/js/EditorControls.js +1 -1
  15. package/www/3d-editor/js/GLTFImportDialog.js +1 -1
  16. package/www/3d-editor/js/History.js +1 -1
  17. package/www/3d-editor/js/Loader.js +1 -1
  18. package/www/3d-editor/js/LoaderUtils.js +1 -1
  19. package/www/3d-editor/js/Menubar.Add.js +1 -1
  20. package/www/3d-editor/js/Menubar.Edit.js +1 -1
  21. package/www/3d-editor/js/Menubar.File.js +1 -1
  22. package/www/3d-editor/js/Menubar.Help.js +1 -1
  23. package/www/3d-editor/js/Menubar.Render.js +1 -1
  24. package/www/3d-editor/js/Menubar.Status.js +1 -1
  25. package/www/3d-editor/js/Menubar.View.js +1 -1
  26. package/www/3d-editor/js/Menubar.js +1 -1
  27. package/www/3d-editor/js/Player.js +1 -1
  28. package/www/3d-editor/js/Resizer.js +1 -1
  29. package/www/3d-editor/js/Script.js +1 -1
  30. package/www/3d-editor/js/Selector.js +1 -1
  31. package/www/3d-editor/js/Sidebar.Geometry.BoxGeometry.js +1 -1
  32. package/www/3d-editor/js/Sidebar.Geometry.BufferGeometry.js +1 -1
  33. package/www/3d-editor/js/Sidebar.Geometry.CapsuleGeometry.js +1 -1
  34. package/www/3d-editor/js/Sidebar.Geometry.CircleGeometry.js +1 -1
  35. package/www/3d-editor/js/Sidebar.Geometry.CylinderGeometry.js +1 -1
  36. package/www/3d-editor/js/Sidebar.Geometry.DodecahedronGeometry.js +1 -1
  37. package/www/3d-editor/js/Sidebar.Geometry.ExtrudeGeometry.js +1 -1
  38. package/www/3d-editor/js/Sidebar.Geometry.IcosahedronGeometry.js +1 -1
  39. package/www/3d-editor/js/Sidebar.Geometry.LatheGeometry.js +1 -1
  40. package/www/3d-editor/js/Sidebar.Geometry.Modifiers.js +1 -1
  41. package/www/3d-editor/js/Sidebar.Geometry.OctahedronGeometry.js +1 -1
  42. package/www/3d-editor/js/Sidebar.Geometry.PlaneGeometry.js +1 -1
  43. package/www/3d-editor/js/Sidebar.Geometry.RingGeometry.js +1 -1
  44. package/www/3d-editor/js/Sidebar.Geometry.ShapeGeometry.js +1 -1
  45. package/www/3d-editor/js/Sidebar.Geometry.SphereGeometry.js +1 -1
  46. package/www/3d-editor/js/Sidebar.Geometry.TetrahedronGeometry.js +1 -1
  47. package/www/3d-editor/js/Sidebar.Geometry.TextGeometry.js +1 -1
  48. package/www/3d-editor/js/Sidebar.Geometry.TorusGeometry.js +1 -1
  49. package/www/3d-editor/js/Sidebar.Geometry.TorusKnotGeometry.js +1 -1
  50. package/www/3d-editor/js/Sidebar.Geometry.TubeGeometry.js +1 -1
  51. package/www/3d-editor/js/Sidebar.Geometry.js +1 -1
  52. package/www/3d-editor/js/Sidebar.Material.BooleanProperty.js +1 -1
  53. package/www/3d-editor/js/Sidebar.Material.ColorProperty.js +1 -1
  54. package/www/3d-editor/js/Sidebar.Material.ConstantProperty.js +1 -1
  55. package/www/3d-editor/js/Sidebar.Material.MapProperty.js +1 -1
  56. package/www/3d-editor/js/Sidebar.Material.NumberProperty.js +1 -1
  57. package/www/3d-editor/js/Sidebar.Material.Program.js +1 -1
  58. package/www/3d-editor/js/Sidebar.Material.RangeValueProperty.js +1 -1
  59. package/www/3d-editor/js/Sidebar.Material.js +1 -1
  60. package/www/3d-editor/js/Sidebar.Object.js +1 -1
  61. package/www/3d-editor/js/Sidebar.Project.App.js +1 -1
  62. package/www/3d-editor/js/Sidebar.Project.Materials.js +1 -1
  63. package/www/3d-editor/js/Sidebar.Project.Renderer.js +1 -1
  64. package/www/3d-editor/js/Sidebar.Project.Resources.js +1 -1
  65. package/www/3d-editor/js/Sidebar.Project.js +1 -1
  66. package/www/3d-editor/js/Sidebar.Properties.js +1 -1
  67. package/www/3d-editor/js/Sidebar.Scene.js +1 -1
  68. package/www/3d-editor/js/Sidebar.Script.js +1 -1
  69. package/www/3d-editor/js/Sidebar.Settings.History.js +1 -1
  70. package/www/3d-editor/js/Sidebar.Settings.Shortcuts.js +1 -1
  71. package/www/3d-editor/js/Sidebar.Settings.js +1 -1
  72. package/www/3d-editor/js/Sidebar.js +1 -1
  73. package/www/3d-editor/js/Storage.js +1 -1
  74. package/www/3d-editor/js/Strings.js +1 -1
  75. package/www/3d-editor/js/TextureParametersDialog.js +1 -1
  76. package/www/3d-editor/js/Toolbar.js +1 -1
  77. package/www/3d-editor/js/Viewport.Controls.js +1 -1
  78. package/www/3d-editor/js/Viewport.Info.js +1 -1
  79. package/www/3d-editor/js/Viewport.Pathtracer.js +1 -1
  80. package/www/3d-editor/js/Viewport.ViewHelper.js +1 -1
  81. package/www/3d-editor/js/Viewport.XR.js +1 -1
  82. package/www/3d-editor/js/Viewport.js +1 -1
  83. package/www/3d-editor/js/commands/AddObjectCommand.js +1 -1
  84. package/www/3d-editor/js/commands/AddScriptCommand.js +1 -1
  85. package/www/3d-editor/js/commands/Commands.js +1 -1
  86. package/www/3d-editor/js/commands/MoveObjectCommand.js +1 -1
  87. package/www/3d-editor/js/commands/MultiCmdsCommand.js +1 -1
  88. package/www/3d-editor/js/commands/RemoveObjectCommand.js +1 -1
  89. package/www/3d-editor/js/commands/RemoveScriptCommand.js +1 -1
  90. package/www/3d-editor/js/commands/SetColorCommand.js +1 -1
  91. package/www/3d-editor/js/commands/SetGeometryCommand.js +1 -1
  92. package/www/3d-editor/js/commands/SetGeometryValueCommand.js +1 -1
  93. package/www/3d-editor/js/commands/SetMaterialColorCommand.js +1 -1
  94. package/www/3d-editor/js/commands/SetMaterialCommand.js +1 -1
  95. package/www/3d-editor/js/commands/SetMaterialMapCommand.js +1 -1
  96. package/www/3d-editor/js/commands/SetMaterialRangeCommand.js +1 -1
  97. package/www/3d-editor/js/commands/SetMaterialValueCommand.js +1 -1
  98. package/www/3d-editor/js/commands/SetMaterialVectorCommand.js +1 -1
  99. package/www/3d-editor/js/commands/SetPositionCommand.js +1 -1
  100. package/www/3d-editor/js/commands/SetRotationCommand.js +1 -1
  101. package/www/3d-editor/js/commands/SetScaleCommand.js +1 -1
  102. package/www/3d-editor/js/commands/SetSceneCommand.js +1 -1
  103. package/www/3d-editor/js/commands/SetScriptValueCommand.js +1 -1
  104. package/www/3d-editor/js/commands/SetShadowValueCommand.js +1 -1
  105. package/www/3d-editor/js/commands/SetTextureParametersCommand.js +1 -1
  106. package/www/3d-editor/js/commands/SetUuidCommand.js +1 -1
  107. package/www/3d-editor/js/commands/SetValueCommand.js +1 -1
  108. package/www/dist/frontend/bundle/chunk-3C6XC7RW.js +1 -1
  109. package/www/dist/frontend/bundle/chunk-3WGNLIWJ.js +2 -2
  110. package/www/dist/frontend/bundle/chunk-3YK3Y2SJ.js +1 -1
  111. package/www/dist/frontend/bundle/chunk-43HEBO5G.js +2 -2
  112. package/www/dist/frontend/bundle/chunk-5MUGMRXU.js +1 -1
  113. package/www/dist/frontend/bundle/chunk-5UBRCTRX.js +3 -3
  114. package/www/dist/frontend/bundle/chunk-65A3PNMG.js +1 -1
  115. package/www/dist/frontend/bundle/chunk-7CWDQGAG.js +3 -3
  116. package/www/dist/frontend/bundle/chunk-7PT7IGUJ.js +3 -3
  117. package/www/dist/frontend/bundle/chunk-AI5PDLDE.js +2 -2
  118. package/www/dist/frontend/bundle/chunk-AWKVUUKN.js +3 -3
  119. package/www/dist/frontend/bundle/chunk-B6NXWGSB.js +1 -1
  120. package/www/dist/frontend/bundle/chunk-BHSHNRXW.js +1 -1
  121. package/www/dist/frontend/bundle/chunk-BVONDEOL.js +2 -2
  122. package/www/dist/frontend/bundle/chunk-CHDKROX5.js +3 -3
  123. package/www/dist/frontend/bundle/chunk-DNCD2F6X.js +2 -2
  124. package/www/dist/frontend/bundle/chunk-FHF6DL5U.js +1 -1
  125. package/www/dist/frontend/bundle/chunk-FO56TEZH.js +3 -3
  126. package/www/dist/frontend/bundle/chunk-FSRRPQMX.js +3 -3
  127. package/www/dist/frontend/bundle/chunk-GLQNGCFL.js +1 -1
  128. package/www/dist/frontend/bundle/chunk-JBDSDK2C.js +3 -3
  129. package/www/dist/frontend/bundle/chunk-JSC66ZLQ.js +1 -1
  130. package/www/dist/frontend/bundle/chunk-K6IV7LKW.js +1 -1
  131. package/www/dist/frontend/bundle/chunk-KY73TL6O.js +2 -2
  132. package/www/dist/frontend/bundle/chunk-M6VVTDVX.js +3 -3
  133. package/www/dist/frontend/bundle/chunk-MECWXZRN.js +1 -1
  134. package/www/dist/frontend/bundle/chunk-N2YIZTB2.js +1 -1
  135. package/www/dist/frontend/bundle/chunk-NQ7L7KNT.js +2 -2
  136. package/www/dist/frontend/bundle/chunk-P7EOR36H.js +1 -1
  137. package/www/dist/frontend/bundle/chunk-PJYK24KZ.js +1 -1
  138. package/www/dist/frontend/bundle/chunk-PYLAW6UA.js +3 -3
  139. package/www/dist/frontend/bundle/chunk-QJJGP23I.js +1 -1
  140. package/www/dist/frontend/bundle/chunk-QV4IBWXA.js +1 -1
  141. package/www/dist/frontend/bundle/chunk-R6IQDPAP.js +3 -3
  142. package/www/dist/frontend/bundle/chunk-RTTBZOQU.js +3 -3
  143. package/www/dist/frontend/bundle/chunk-S4TLNW5D.js +1 -1
  144. package/www/dist/frontend/bundle/chunk-SE6N4ZEN.js +1 -1
  145. package/www/dist/frontend/bundle/chunk-SQHXO2IT.js +3 -3
  146. package/www/dist/frontend/bundle/chunk-T4AIQBBH.js +2 -2
  147. package/www/dist/frontend/bundle/chunk-U5Q332OH.js +1 -1
  148. package/www/dist/frontend/bundle/chunk-UIP324PP.js +1 -1
  149. package/www/dist/frontend/bundle/chunk-V27IRYSL.js +1 -1
  150. package/www/dist/frontend/bundle/chunk-V4C5FGJL.js +3 -3
  151. package/www/dist/frontend/bundle/chunk-WED7CGWA.js +3 -3
  152. package/www/dist/frontend/bundle/chunk-WQ5H5LTG.js +3 -3
  153. package/www/dist/frontend/bundle/chunk-WU54NCEU.js +1 -1
  154. package/www/dist/frontend/bundle/chunk-XFO5FUCN.js +1 -1
  155. package/www/dist/frontend/bundle/chunk-XWAQ2BWM.js +2 -2
  156. package/www/dist/frontend/bundle/chunk-YTQCHNRQ.js +3 -3
  157. package/www/dist/frontend/bundle/chunk-YUSK4FN3.js +3 -3
  158. package/www/dist/frontend/bundle/chunk-Z34BSG5O.js +3 -3
  159. package/www/dist/frontend/bundle/common/IobrokerHandler.js +1 -1
  160. package/www/dist/frontend/bundle/runtime/CustomControls.js +1 -1
  161. package/www/dist/frontend/bundle/runtime/ScreenViewer.js +1 -1
  162. package/www/dist/frontend/bundle/runtime/controls.js +4 -4
  163. package/www/dist/frontend/bundle/runtime/init.js +2 -2
  164. package/www/dist/frontend/common/Common.globals.js +1 -1
  165. package/www/dist/frontend/common/IobrokerHandler.js +1 -1
  166. package/www/dist/frontend/common/Runtime.js +1 -1
  167. package/www/dist/frontend/config/CommandHandling.js +1 -1
  168. package/www/dist/frontend/config/ConfigureWebcomponentDesigner.js +1 -1
  169. package/www/dist/frontend/config/DockHelper.js +1 -1
  170. package/www/dist/frontend/config/IobrokerWebui3DDriveEngine.js +1 -1
  171. package/www/dist/frontend/config/IobrokerWebui3DScreenEditor.js +3 -3
  172. package/www/dist/frontend/config/IobrokerWebui3DScreenPropertiesPanel.js +3 -3
  173. package/www/dist/frontend/config/IobrokerWebui3DScreenViewer.js +2 -2
  174. package/www/dist/frontend/config/IobrokerWebuiAppShell.js +3 -3
  175. package/www/dist/frontend/config/IobrokerWebuiBindingsEditor.js +1 -1
  176. package/www/dist/frontend/config/IobrokerWebuiConfirmationWrapper.js +3 -3
  177. package/www/dist/frontend/config/IobrokerWebuiControlPropertiesEditor.js +2 -2
  178. package/www/dist/frontend/config/IobrokerWebuiDynamicPropsEditor.js +1 -1
  179. package/www/dist/frontend/config/IobrokerWebuiEventAssignment.js +1 -1
  180. package/www/dist/frontend/config/IobrokerWebuiIconsView.js +2 -2
  181. package/www/dist/frontend/config/IobrokerWebuiMonacoEditor.js +3 -3
  182. package/www/dist/frontend/config/IobrokerWebuiPropertyGrid.js +1 -1
  183. package/www/dist/frontend/config/IobrokerWebuiScreenEditor.js +1 -1
  184. package/www/dist/frontend/config/IobrokerWebuiScreensView.js +3 -3
  185. package/www/dist/frontend/config/IobrokerWebuiSignalPropertyEditor.js +1 -1
  186. package/www/dist/frontend/config/IobrokerWebuiSolutionExplorer.js +3 -3
  187. package/www/dist/frontend/config/IobrokerWebuiTranslationEditor.js +1 -1
  188. package/www/dist/frontend/config/IobrokerWebuiWidgetGallery.js +2 -2
  189. package/www/dist/frontend/helper/DialogHelper.js +2 -2
  190. package/www/dist/frontend/helper/EsprimaHelper.js +1 -1
  191. package/www/dist/frontend/helper/Helper.js +1 -1
  192. package/www/dist/frontend/helper/LayoutHelper.js +1 -1
  193. package/www/dist/frontend/helper/XmlHelper.js +1 -1
  194. package/www/dist/frontend/helper/ZipHelper.js +1 -1
  195. package/www/dist/frontend/runtime/AnimationService.js +1 -1
  196. package/www/dist/frontend/runtime/CustomControls.js +1 -1
  197. package/www/dist/frontend/runtime/DynamicElementProperties.js +1 -1
  198. package/www/dist/frontend/runtime/HabPanelLikeMenu.js +3 -3
  199. package/www/dist/frontend/runtime/NavigationShell.js +1 -1
  200. package/www/dist/frontend/runtime/ScreenViewer.js +3 -3
  201. package/www/dist/frontend/runtime/TranslateableText.js +2 -2
  202. package/www/dist/frontend/runtime/VisibilityService.js +1 -1
  203. package/www/dist/frontend/runtime/controls.js +1 -1
  204. package/www/dist/frontend/runtime/init.js +1 -1
  205. package/www/dist/frontend/scripting/IobrokerWebuiScriptSystem.js +1 -1
  206. package/www/dist/frontend/scripting/blockly/OpenScreen.js +1 -1
  207. package/www/dist/frontend/scripting/blockly/webuiBlocklyToolbox.js +1 -1
  208. package/www/dist/frontend/services/DynamicPropertiesHelper.js +1 -1
  209. package/www/dist/frontend/services/IobrokerWebuiBindableLocalObjectsService.js +1 -1
  210. package/www/dist/frontend/services/IobrokerWebuiBindableObjectDragDropService.js +1 -1
  211. package/www/dist/frontend/services/IobrokerWebuiBindableObjectsForPropertiesService.js +1 -1
  212. package/www/dist/frontend/services/IobrokerWebuiBindableObjectsService.js +1 -1
  213. package/www/dist/frontend/services/IobrokerWebuiConfigButtonProvider.js +1 -1
  214. package/www/dist/frontend/services/IobrokerWebuiCopyPasteService.js +1 -1
  215. package/www/dist/frontend/services/IobrokerWebuiCustomControlEventsService.js +1 -1
  216. package/www/dist/frontend/services/IobrokerWebuiCustomElementContextMenu.js +1 -1
  217. package/www/dist/frontend/services/IobrokerWebuiDemoProviderService.js +1 -1
  218. package/www/dist/frontend/services/IobrokerWebuiDynamicPropertiesService.js +1 -1
  219. package/www/dist/frontend/services/IobrokerWebuiEventsService.js +1 -1
  220. package/www/dist/frontend/services/IobrokerWebuiExternalDragDropService.js +1 -1
  221. package/www/dist/frontend/services/IobrokerWebuiLitPropertiesService.js +1 -1
  222. package/www/dist/frontend/services/IobrokerWebuiPropertiesService.js +1 -1
  223. package/www/dist/frontend/services/IobrokerWebuiPropertyGroupsService.js +1 -1
  224. package/www/dist/frontend/services/IobrokerWebuiRefactorService.js +1 -1
  225. package/www/dist/frontend/services/IobrokerWebuiScreenContextMenu.js +1 -1
  226. package/www/dist/frontend/services/IobrokerWebuiSpecialPropertiesService.js +1 -1
  227. package/www/dist/frontend/services/IobrokerWebuiSpectrumEditorService.js +1 -1
  228. package/www/dist/frontend/services/IobrokerWebuiVisibilityPropertiesService.js +1 -1
  229. package/www/dist/frontend/services/LayoutComponentsPropertiesService.js +1 -1
  230. package/www/dist/frontend/widgets/OrthoFlowLineTool.js +1 -1
  231. package/www/dist/frontend/widgets/customElementsObserver.js +1 -1
  232. package/www/dist/frontend/widgets/importWidgetFiles.js +1 -1
  233. package/www/dist/frontend/widgets/importWidgetFilesRuntime.js +1 -1
  234. package/www/dist/frontend/widgets/layout-components.js +1 -1
  235. package/www/dist/frontend/widgets/layout-placement-services.js +1 -1
  236. package/www/dist/frontend/widgets/testElement.js +1 -1
@@ -1 +1 @@
1
- {"properties": {"rows": {"type": "string", "default": "[{\"tag\":\"BF234239\",\"value\":86.7,\"zones\":[{\"to\":65,\"color\":\"#7c5ce0\"},{\"to\":75,\"color\":\"#c8551f\"},{\"to\":100,\"color\":\"#d63b45\"}]},{\"tag\":\"BF234240\",\"value\":54.2,\"zones\":[{\"to\":15,\"color\":\"#d63b45\"},{\"to\":30,\"color\":\"#c8551f\"},{\"to\":100,\"color\":\"#7c5ce0\"}]},{\"tag\":\"BF234241\",\"value\":38.7,\"zones\":[{\"to\":100,\"color\":\"#7c5ce0\"}]}]"}, "unit": {"type": "string", "default": ""}, "decimals": {"type": "number", "default": 1}}, "settings": {"width": "720px", "height": "220px"}, "html": "<div id=\"tbl\" class=\"gt\"></div>", "style": ":host{display:block;width:100%;color:#e8e8ea;font-family:'Segoe UI',Roboto,sans-serif;box-sizing:border-box;}\n.gt{display:flex;flex-direction:column;padding:8px 12px;box-sizing:border-box;}\n.gt-head,.gt-row{display:grid;grid-template-columns:160px 1fr 130px;align-items:center;gap:16px;}\n.gt-head{font-size:15px;font-weight:700;padding:6px 0;border-bottom:2px solid rgba(255,255,255,.2);color:#cdd3ff;}\n.gt-row{padding:8px 0;border-bottom:1px solid rgba(255,255,255,.08);}\n.gt-tag{font-size:15px;}\n.gt-val{font-size:16px;text-align:left;}\n.gt-status webui-gauges-linear-gauge{display:block;width:100%;}", "script": "function parseRows(instance){let r=instance.rows;if(Array.isArray(r))return r;try{return JSON.parse(r||'[]');}catch(e){return [];}}\nfunction esc(s){return String(s).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');}\nfunction render(instance){\n const host=instance._getDomElement('tbl'); if(!host) return;\n const rows=parseRows(instance);\n const dec=(instance.decimals!=null&&instance.decimals!=='')?Number(instance.decimals):1;\n const gunit=instance.unit!=null?instance.unit:'';\n let body='';\n for(const row of rows){\n const zones=row.zones?(typeof row.zones==='string'?row.zones:JSON.stringify(row.zones)):'[{\"to\":65,\"color\":\"#7c5ce0\"},{\"to\":75,\"color\":\"#c8551f\"},{\"to\":100,\"color\":\"#d63b45\"}]';\n const zAttr=zones.replace(/'/g,'&#39;');\n const min=row.min!=null?row.min:0, max=row.max!=null?row.max:100;\n const val=row.value!=null?Number(row.value):0;\n const unit=row.unit!=null?row.unit:gunit;\n const ticks=row.ticks!=null?(' ticks=\"'+esc(row.ticks)+'\"'):'';\n body+='<div class=\"gt-row\"><div class=\"gt-tag\">'+esc(row.tag||'')+'</div>'\n +'<div class=\"gt-status\"><webui-gauges-linear-gauge value=\"'+val+'\" min=\"'+min+'\" max=\"'+max+'\" unit=\"\" mode=\"bar\" bar-thickness=\"12\"'+ticks+' zones=\\''+zAttr+'\\'></webui-gauges-linear-gauge></div>'\n +'<div class=\"gt-val\">'+val.toFixed(dec)+esc(unit)+'</div></div>';\n }\n host.innerHTML='<div class=\"gt-head\"><div class=\"gt-tag\">Tag</div><div class=\"gt-status\">Status</div><div class=\"gt-val\">Current value</div></div>'+body;\n}\nexport function init(instance){\n try{instance._bindingsRefresh&&instance._bindingsRefresh();}catch(e){}\n for(const pr of ['rows','unit','decimals']){ try{instance._assignEvent(pr+'-changed',()=>render(instance));}catch(e){} }\n render(instance);\n}\nexport function connectedCallback(instance){ render(instance); }\n"}
1
+ {"properties": {"rows": {"type": "string", "default": "[{\"tag\":\"BF234239\",\"value\":86.7,\"zones\":[{\"to\":65,\"color\":\"#7c5ce0\"},{\"to\":75,\"color\":\"#c8551f\"},{\"to\":100,\"color\":\"#d63b45\"}]},{\"tag\":\"BF234240\",\"value\":54.2,\"zones\":[{\"to\":15,\"color\":\"#d63b45\"},{\"to\":30,\"color\":\"#c8551f\"},{\"to\":100,\"color\":\"#7c5ce0\"}]},{\"tag\":\"BF234241\",\"value\":38.7,\"zones\":[{\"to\":100,\"color\":\"#7c5ce0\"}]}]"}, "unit": {"type": "string", "default": ""}, "decimals": {"type": "number", "default": 1}}, "settings": {"width": "720px", "height": "220px"}, "html": "<div id=\"tbl\" class=\"gt\"></div>", "style": ":host{display:block;width:100%;color:var(--ui-text,#e2e6ec);font-family:'Segoe UI',Roboto,sans-serif;box-sizing:border-box;}\n.gt{display:flex;flex-direction:column;padding:8px 12px;box-sizing:border-box;}\n.gt-head,.gt-row{display:grid;grid-template-columns:160px 1fr 130px;align-items:center;gap:16px;}\n.gt-head{font-size:15px;font-weight:700;padding:6px 0;border-bottom:2px solid var(--ui-border,#3b4250);color:var(--accent,#2680eb);}\n.gt-row{padding:8px 0;border-bottom:1px solid var(--ui-border,rgba(255,255,255,.08));}\n.gt-tag{font-size:15px;}\n.gt-val{font-size:16px;text-align:left;}\n.gt-status webui-gauges-linear-gauge{display:block;width:100%;}", "script": "function parseRows(instance){let r=instance.rows;if(Array.isArray(r))return r;try{return JSON.parse(r||'[]');}catch(e){return [];}}\nfunction esc(s){return String(s).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');}\nfunction render(instance){\n const host=instance._getDomElement('tbl'); if(!host) return;\n const rows=parseRows(instance);\n const dec=(instance.decimals!=null&&instance.decimals!=='')?Number(instance.decimals):1;\n const gunit=instance.unit!=null?instance.unit:'';\n let body='';\n for(const row of rows){\n const zones=row.zones?(typeof row.zones==='string'?row.zones:JSON.stringify(row.zones)):'[{\"to\":65,\"color\":\"#7c5ce0\"},{\"to\":75,\"color\":\"#c8551f\"},{\"to\":100,\"color\":\"#d63b45\"}]';\n const zAttr=zones.replace(/'/g,'&#39;');\n const min=row.min!=null?row.min:0, max=row.max!=null?row.max:100;\n const val=row.value!=null?Number(row.value):0;\n const unit=row.unit!=null?row.unit:gunit;\n const ticks=row.ticks!=null?(' ticks=\"'+esc(row.ticks)+'\"'):'';\n body+='<div class=\"gt-row\"><div class=\"gt-tag\">'+esc(row.tag||'')+'</div>'\n +'<div class=\"gt-status\"><webui-gauges-linear-gauge value=\"'+val+'\" min=\"'+min+'\" max=\"'+max+'\" unit=\"\" mode=\"bar\" bar-thickness=\"12\"'+ticks+' zones=\\''+zAttr+'\\'></webui-gauges-linear-gauge></div>'\n +'<div class=\"gt-val\">'+val.toFixed(dec)+esc(unit)+'</div></div>';\n }\n host.innerHTML='<div class=\"gt-head\"><div class=\"gt-tag\">Tag</div><div class=\"gt-status\">Status</div><div class=\"gt-val\">Current value</div></div>'+body;\n}\nexport function init(instance){\n try{instance._bindingsRefresh&&instance._bindingsRefresh();}catch(e){}\n for(const pr of ['rows','unit','decimals']){ try{instance._assignEvent(pr+'-changed',()=>render(instance));}catch(e){} }\n render(instance);\n}\nexport function connectedCallback(instance){ render(instance); }\n"}
@@ -1 +1 @@
1
- {"properties": {"value": {"type": "number", "default": 0}, "min": {"type": "number", "default": 0}, "max": {"type": "number", "default": 100}, "zones": {"type": "string", "default": "[{\"to\":65,\"color\":\"#7c5ce0\"},{\"to\":75,\"color\":\"#c8551f\"},{\"to\":100,\"color\":\"#d63b45\"}]"}, "ticks": {"type": "string", "default": ""}, "orientation": {"type": "string", "default": "horizontal"}, "mode": {"type": "string", "default": "full"}, "title": {"type": "string", "default": ""}, "subtitle": {"type": "string", "default": ""}, "unit": {"type": "string", "default": "%"}, "decimals": {"type": "number", "default": 1}, "showValue": {"type": "boolean", "default": true}, "showPointer": {"type": "boolean", "default": true}, "trackColor": {"type": "color", "default": "#3a3f4b"}, "barThickness": {"type": "number", "default": 18}}, "settings": {"width": "360px", "height": "150px"}, "html": "<div id=\"wrap\" class=\"lg-wrap\"><div id=\"head\" class=\"lg-head\"></div><div id=\"val\" class=\"lg-val\"></div><div id=\"gauge\" class=\"lg-gauge\"></div></div>", "style": ":host{display:block;width:100%;color:#e8e8ea;font-family:'Segoe UI',Roboto,sans-serif;box-sizing:border-box;}\n.lg-wrap{display:flex;flex-direction:column;gap:6px;padding:8px 10px;box-sizing:border-box;height:100%;}\n.lg-title{font-size:15px;font-weight:700;line-height:1.1;}\n.lg-sub{font-size:12px;opacity:.55;margin-top:2px;}\n.lg-val{margin:2px 0 6px;}\n.lg-val .lg-num{font-size:40px;font-weight:800;line-height:1;}\n.lg-val .lg-unit{font-size:18px;opacity:.8;margin-left:4px;}\n.lg-gauge{position:relative;}\n.lg-track{position:absolute;border-radius:3px;}\n.lg-seg{position:absolute;}\n.lg-ptr{position:absolute;width:0;height:0;}\n.lg-tick{position:absolute;font-size:11px;font-weight:600;opacity:.85;white-space:nowrap;}\n/* horizontal */\n.lg-horizontal{padding:16px 0 20px;}\n.lg-horizontal .lg-track{left:0;right:0;top:16px;height:var(--lg-thick,18px);}\n.lg-horizontal .lg-seg{top:16px;height:var(--lg-thick,18px);}\n.lg-horizontal .lg-ptr-h{top:3px;border-left:7px solid transparent;border-right:7px solid transparent;border-top:10px solid #fff;filter:drop-shadow(0 1px 1px rgba(0,0,0,.5));}\n.lg-horizontal .lg-tick-h{top:calc(16px + var(--lg-thick,18px) + 3px);transform:translateX(-50%);}\n/* vertical */\n.lg-vertical{padding:0 0 0 34px;height:100%;min-height:220px;}\n.lg-vertical .lg-track{left:34px;width:var(--lg-thick,18px);top:8px;bottom:8px;}\n.lg-vertical .lg-seg{left:34px;width:var(--lg-thick,18px);}\n.lg-vertical .lg-ptr-v{left:calc(34px + var(--lg-thick,18px) + 3px);border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:10px solid #fff;filter:drop-shadow(0 1px 1px rgba(0,0,0,.5));}\n.lg-vertical .lg-tick-v{left:0;width:30px;text-align:right;transform:translateY(50%);}", "script": "function num(v,d){v=parseFloat(v);return isNaN(v)?d:v;}\nfunction parseZones(instance){let z=instance.zones;if(Array.isArray(z))return z;try{return JSON.parse(z||'[]');}catch(e){return [];}}\nfunction render(instance){\n const el=(id)=>instance._getDomElement(id);\n const g=el('gauge'); if(!g) return;\n const min=num(instance.min,0), max=num(instance.max,100);\n let value=num(instance.value,0); value=Math.max(min,Math.min(max,value));\n const vertical=(instance.orientation==='vertical');\n const zones=parseZones(instance).slice().sort((a,b)=>num(a.to,0)-num(b.to,0));\n const track=instance.trackColor||'#3a3f4b';\n const thick=num(instance.barThickness,18);\n const dec=num(instance.decimals,1);\n const pct=(v)=>(max>min)?((v-min)/(max-min))*100:0;\n const barOnly=(instance.mode==='bar');\n // head\n const head=el('head');\n if(head){ if(barOnly){head.style.display='none';} else {head.style.display='';head.innerHTML=(instance.title?('<div class=\"lg-title\">'+instance.title+'</div>'):'')+(instance.subtitle?('<div class=\"lg-sub\">'+instance.subtitle+'</div>'):'');} }\n // value\n const valEl=el('val');\n if(valEl){ if(barOnly||instance.showValue===false||instance.showValue==='false'){valEl.style.display='none';} else {valEl.style.display='';valEl.innerHTML='<span class=\"lg-num\">'+value.toFixed(dec)+'</span><span class=\"lg-unit\">'+(instance.unit||'')+'</span>';} }\n // ticks list\n let ticks;\n if(instance.ticks&&String(instance.ticks).trim()) ticks=String(instance.ticks).split(',').map(x=>num(x,null)).filter(x=>x!=null);\n else { ticks=[min]; for(const z of zones) ticks.push(num(z.to,max)); ticks.push(max); ticks=[...new Set(ticks)].sort((a,b)=>a-b); }\n // segments up to value\n let prev=min, segs='';\n const seg=(a,b,color)=>{const s=pct(a),sz=pct(b)-pct(a); if(sz<=0) return ''; return '<div class=\"lg-seg\" style=\"'+(vertical?('bottom:'+s+'%;height:'+sz+'%;'):('left:'+s+'%;width:'+sz+'%;'))+'background:'+(color||'#888')+';\"></div>';};\n for(const z of zones){ const to=Math.min(num(z.to,max),value); if(to>prev) segs+=seg(prev,to,z.color); prev=num(z.to,max); if(prev>=value) break; }\n if(value>prev&&zones.length) segs+=seg(prev,value,zones[zones.length-1].color);\n const p=pct(value);\n const pointer=(instance.showPointer===false||instance.showPointer==='false')?'':(vertical?('<div class=\"lg-ptr lg-ptr-v\" style=\"bottom:calc('+p+'% - 7px);\"></div>'):('<div class=\"lg-ptr lg-ptr-h\" style=\"left:calc('+p+'% - 7px);\"></div>'));\n const ticksHtml=ticks.map(t=>{const tp=pct(t);return vertical?('<div class=\"lg-tick lg-tick-v\" style=\"bottom:calc('+tp+'% - 7px);\">'+t+'</div>'):('<div class=\"lg-tick lg-tick-h\" style=\"left:'+tp+'%;\">'+t+'</div>');}).join('');\n g.className='lg-gauge '+(vertical?'lg-vertical':'lg-horizontal');\n g.style.setProperty('--lg-thick',thick+'px');\n g.innerHTML='<div class=\"lg-track\" style=\"background:'+track+';\"></div>'+segs+pointer+'<div class=\"lg-ticks\">'+ticksHtml+'</div>';\n}\nexport function init(instance){\n try{instance._bindingsRefresh&&instance._bindingsRefresh();}catch(e){}\n const props=['value','min','max','zones','ticks','orientation','mode','title','subtitle','unit','decimals','showValue','showPointer','trackColor','barThickness'];\n for(const pr of props){ try{instance._assignEvent(pr+'-changed',()=>render(instance));}catch(e){} }\n render(instance);\n}\nexport function connectedCallback(instance){ render(instance); }\n"}
1
+ {"properties": {"value": {"type": "number", "default": 0}, "min": {"type": "number", "default": 0}, "max": {"type": "number", "default": 100}, "zones": {"type": "string", "default": "[{\"to\":65,\"color\":\"#7c5ce0\"},{\"to\":75,\"color\":\"#c8551f\"},{\"to\":100,\"color\":\"#d63b45\"}]"}, "ticks": {"type": "string", "default": ""}, "orientation": {"type": "string", "default": "horizontal"}, "mode": {"type": "string", "default": "full"}, "title": {"type": "string", "default": ""}, "subtitle": {"type": "string", "default": ""}, "unit": {"type": "string", "default": "%"}, "decimals": {"type": "number", "default": 1}, "showValue": {"type": "boolean", "default": true}, "showPointer": {"type": "boolean", "default": true}, "trackColor": {"type": "color", "default": ""}, "barThickness": {"type": "number", "default": 18}}, "settings": {"width": "360px", "height": "150px"}, "html": "<div id=\"wrap\" class=\"lg-wrap\"><div id=\"head\" class=\"lg-head\"></div><div id=\"val\" class=\"lg-val\"></div><div id=\"gauge\" class=\"lg-gauge\"></div></div>", "style": ":host{display:block;width:100%;color:var(--ui-text,#e2e6ec);font-family:'Segoe UI',Roboto,sans-serif;box-sizing:border-box;}\n.lg-wrap{display:flex;flex-direction:column;gap:6px;padding:8px 10px;box-sizing:border-box;height:100%;}\n.lg-title{font-size:15px;font-weight:700;line-height:1.1;}\n.lg-sub{font-size:12px;opacity:.55;margin-top:2px;}\n.lg-val{margin:2px 0 6px;}\n.lg-val .lg-num{font-size:40px;font-weight:800;line-height:1;}\n.lg-val .lg-unit{font-size:18px;opacity:.8;margin-left:4px;}\n.lg-gauge{position:relative;}\n.lg-track{position:absolute;border-radius:3px;}\n.lg-seg{position:absolute;}\n.lg-ptr{position:absolute;width:0;height:0;}\n.lg-tick{position:absolute;font-size:11px;font-weight:600;opacity:.85;white-space:nowrap;}\n/* horizontal */\n.lg-horizontal{padding:16px 0 20px;}\n.lg-horizontal .lg-track{left:0;right:0;top:16px;height:var(--lg-thick,18px);}\n.lg-horizontal .lg-seg{top:16px;height:var(--lg-thick,18px);}\n.lg-horizontal .lg-ptr-h{top:3px;border-left:7px solid transparent;border-right:7px solid transparent;border-top:10px solid var(--ui-text,#f2f4f8);filter:drop-shadow(0 1px 1px rgba(0,0,0,.5));}\n.lg-horizontal .lg-tick-h{top:calc(16px + var(--lg-thick,18px) + 3px);transform:translateX(-50%);}\n/* vertical */\n.lg-vertical{padding:0 0 0 34px;height:100%;min-height:220px;}\n.lg-vertical .lg-track{left:34px;width:var(--lg-thick,18px);top:8px;bottom:8px;}\n.lg-vertical .lg-seg{left:34px;width:var(--lg-thick,18px);}\n.lg-vertical .lg-ptr-v{left:calc(34px + var(--lg-thick,18px) + 3px);border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:10px solid var(--ui-text,#f2f4f8);filter:drop-shadow(0 1px 1px rgba(0,0,0,.5));}\n.lg-vertical .lg-tick-v{left:0;width:30px;text-align:right;transform:translateY(50%);}", "script": "function num(v,d){v=parseFloat(v);return isNaN(v)?d:v;}\nfunction parseZones(instance){let z=instance.zones;if(Array.isArray(z))return z;try{return JSON.parse(z||'[]');}catch(e){return [];}}\nfunction render(instance){\n const el=(id)=>instance._getDomElement(id);\n const g=el('gauge'); if(!g) return;\n const min=num(instance.min,0), max=num(instance.max,100);\n let value=num(instance.value,0); value=Math.max(min,Math.min(max,value));\n const vertical=(instance.orientation==='vertical');\n const zones=parseZones(instance).slice().sort((a,b)=>num(a.to,0)-num(b.to,0));\n const track=instance.trackColor||'var(--ui-surface-2,#3a3f4b)';\n const thick=num(instance.barThickness,18);\n const dec=num(instance.decimals,1);\n const pct=(v)=>(max>min)?((v-min)/(max-min))*100:0;\n const barOnly=(instance.mode==='bar');\n // head\n const head=el('head');\n if(head){ if(barOnly){head.style.display='none';} else {head.style.display='';head.innerHTML=(instance.title?('<div class=\"lg-title\">'+instance.title+'</div>'):'')+(instance.subtitle?('<div class=\"lg-sub\">'+instance.subtitle+'</div>'):'');} }\n // value\n const valEl=el('val');\n if(valEl){ if(barOnly||instance.showValue===false||instance.showValue==='false'){valEl.style.display='none';} else {valEl.style.display='';valEl.innerHTML='<span class=\"lg-num\">'+value.toFixed(dec)+'</span><span class=\"lg-unit\">'+(instance.unit||'')+'</span>';} }\n // ticks list\n let ticks;\n if(instance.ticks&&String(instance.ticks).trim()) ticks=String(instance.ticks).split(',').map(x=>num(x,null)).filter(x=>x!=null);\n else { ticks=[min]; for(const z of zones) ticks.push(num(z.to,max)); ticks.push(max); ticks=[...new Set(ticks)].sort((a,b)=>a-b); }\n // segments up to value\n let prev=min, segs='';\n const seg=(a,b,color)=>{const s=pct(a),sz=pct(b)-pct(a); if(sz<=0) return ''; return '<div class=\"lg-seg\" style=\"'+(vertical?('bottom:'+s+'%;height:'+sz+'%;'):('left:'+s+'%;width:'+sz+'%;'))+'background:'+(color||'#888')+';\"></div>';};\n for(const z of zones){ const to=Math.min(num(z.to,max),value); if(to>prev) segs+=seg(prev,to,z.color); prev=num(z.to,max); if(prev>=value) break; }\n if(value>prev&&zones.length) segs+=seg(prev,value,zones[zones.length-1].color);\n const p=pct(value);\n const pointer=(instance.showPointer===false||instance.showPointer==='false')?'':(vertical?('<div class=\"lg-ptr lg-ptr-v\" style=\"bottom:calc('+p+'% - 7px);\"></div>'):('<div class=\"lg-ptr lg-ptr-h\" style=\"left:calc('+p+'% - 7px);\"></div>'));\n const ticksHtml=ticks.map(t=>{const tp=pct(t);return vertical?('<div class=\"lg-tick lg-tick-v\" style=\"bottom:calc('+tp+'% - 7px);\">'+t+'</div>'):('<div class=\"lg-tick lg-tick-h\" style=\"left:'+tp+'%;\">'+t+'</div>');}).join('');\n g.className='lg-gauge '+(vertical?'lg-vertical':'lg-horizontal');\n g.style.setProperty('--lg-thick',thick+'px');\n g.innerHTML='<div class=\"lg-track\" style=\"background:'+track+';\"></div>'+segs+pointer+'<div class=\"lg-ticks\">'+ticksHtml+'</div>';\n}\nexport function init(instance){\n try{instance._bindingsRefresh&&instance._bindingsRefresh();}catch(e){}\n const props=['value','min','max','zones','ticks','orientation','mode','title','subtitle','unit','decimals','showValue','showPointer','trackColor','barThickness'];\n for(const pr of props){ try{instance._assignEvent(pr+'-changed',()=>render(instance));}catch(e){} }\n render(instance);\n}\nexport function connectedCallback(instance){ render(instance); }\n"}