iobroker.vis-jsontemplate 4.1.3 → 4.3.10

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 (206) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +157 -10
  3. package/io-package.json +88 -49
  4. package/package.json +6 -6
  5. package/widgets/vis-jsontemplate/dist/jsontemplate-dist.js +127 -4
  6. package/widgets/vis-jsontemplate/dist/jsontemplate-dist.js.map +2 -2
  7. package/widgets/vis-jsontemplate/js/jsontemplate.js +167 -3
  8. package/widgets/vis-jsontemplate.html +4 -3
  9. package/widgets/vis2vis-jsontemplate/assets/{JSONTemplateWidget-B-_JjxHw.js → JSONTemplateWidget-B2k4zKNW.js} +71 -71
  10. package/widgets/vis2vis-jsontemplate/assets/abap-C--5yq9Z.js +1 -0
  11. package/widgets/vis2vis-jsontemplate/assets/ada-C3QsGDVq.js +1 -0
  12. package/widgets/vis2vis-jsontemplate/assets/alda-Box5RHm1.js +1 -0
  13. package/widgets/vis2vis-jsontemplate/assets/{applescript-Dtx6iIWt.js → applescript-BJy5dw9_.js} +1 -1
  14. package/widgets/vis2vis-jsontemplate/assets/{asciidoc-CTtTEKKR.js → asciidoc-CrUrtxFT.js} +1 -1
  15. package/widgets/vis2vis-jsontemplate/assets/{asl-CGDnhWkr.js → asl-CO5xIZh4.js} +1 -1
  16. package/widgets/vis2vis-jsontemplate/assets/assembly_arm32-D4PWa6mP.js +1 -0
  17. package/widgets/vis2vis-jsontemplate/assets/astro-DDmDrkyK.js +1 -0
  18. package/widgets/vis2vis-jsontemplate/assets/{c9search-BzbdQPPO.js → c9search-CTa2uBL7.js} +1 -1
  19. package/widgets/vis2vis-jsontemplate/assets/{cirru-UmvTEMH2.js → cirru-yK5pT6OR.js} +1 -1
  20. package/widgets/vis2vis-jsontemplate/assets/{clojure-BvfuACp1.js → clojure-D-5WhNTQ.js} +2 -2
  21. package/widgets/vis2vis-jsontemplate/assets/{coldfusion-jQBfC77-.js → coldfusion-DMKNPhkP.js} +1 -1
  22. package/widgets/vis2vis-jsontemplate/assets/{createSvgIcon-BD_MBhBd.js → createSvgIcon-Dtnn_Tct.js} +2 -2
  23. package/widgets/vis2vis-jsontemplate/assets/{csharp-BX2hMNfl.js → csharp-B2YfzZQ7.js} +1 -1
  24. package/widgets/vis2vis-jsontemplate/assets/{csp-BVgLU7jE.js → csp-2X3q-iBy.js} +1 -1
  25. package/widgets/vis2vis-jsontemplate/assets/{csv-D_5OW9bB.js → csv-Dyb-9ifC.js} +1 -1
  26. package/widgets/vis2vis-jsontemplate/assets/{cuttlefish-BB4QY2Rz.js → cuttlefish-Denh8AZW.js} +1 -1
  27. package/widgets/vis2vis-jsontemplate/assets/{nasal-BgEGeagV.js → d-DiQ7_jzr.js} +1 -1
  28. package/widgets/vis2vis-jsontemplate/assets/{defaultTheme-DP1GTDc1.js → defaultTheme-BtHqNVRw.js} +2 -2
  29. package/widgets/vis2vis-jsontemplate/assets/{drools-nRr1FiNd.js → drools-BuMV3gjz.js} +1 -1
  30. package/widgets/vis2vis-jsontemplate/assets/{ext-beautify-B7kCn5eA.js → ext-beautify-D0t0PsJq.js} +3 -3
  31. package/widgets/vis2vis-jsontemplate/assets/{ext-code_lens-Cd0L1scq.js → ext-code_lens-mK5dEejR.js} +1 -1
  32. package/widgets/vis2vis-jsontemplate/assets/ext-diff-BOVpk3cr.js +150 -0
  33. package/widgets/vis2vis-jsontemplate/assets/{ext-emmet-CZ96P7gQ.js → ext-emmet-CHqEoAKo.js} +3 -3
  34. package/widgets/vis2vis-jsontemplate/assets/{ext-hardwrap-DOx3BiAc.js → ext-hardwrap-DuNCIDfB.js} +2 -2
  35. package/widgets/vis2vis-jsontemplate/assets/ext-inline_autocomplete-C5AE1cIa.js +235 -0
  36. package/widgets/vis2vis-jsontemplate/assets/{ext-keybinding_menu-gzsgTxEE.js → ext-keybinding_menu-CpLp-QGc.js} +1 -1
  37. package/widgets/vis2vis-jsontemplate/assets/{ext-linking-wSRE0KER.js → ext-linking-TSdIr5_y.js} +1 -1
  38. package/widgets/vis2vis-jsontemplate/assets/{ext-prompt-BCF6lmjt.js → ext-prompt-4rVdnI5b.js} +5 -5
  39. package/widgets/vis2vis-jsontemplate/assets/{ext-rtl-Bwce-jN9.js → ext-rtl-DaXC2qsX.js} +1 -1
  40. package/widgets/vis2vis-jsontemplate/assets/{ext-simple_tokenizer-MkPEmA4u.js → ext-simple_tokenizer-DhEe52ho.js} +1 -1
  41. package/widgets/vis2vis-jsontemplate/assets/{ext-static_highlight-BwPaHOba.js → ext-static_highlight-CXB1ZOkv.js} +2 -2
  42. package/widgets/vis2vis-jsontemplate/assets/{ext-statusbar-Dkmz7M2l.js → ext-statusbar-B5GvmNbc.js} +1 -1
  43. package/widgets/vis2vis-jsontemplate/assets/{ext-textarea-MRaqZ_vl.js → ext-textarea-B8jLWxXf.js} +1 -1
  44. package/widgets/vis2vis-jsontemplate/assets/{ext-whitespace-CIw_x4la.js → ext-whitespace-07ksPgyW.js} +1 -1
  45. package/widgets/vis2vis-jsontemplate/assets/{forth-C7qLFM9f.js → forth-B03s9wFi.js} +1 -1
  46. package/widgets/vis2vis-jsontemplate/assets/{fortran-D7LyTru1.js → fortran-Djhlkwqd.js} +1 -1
  47. package/widgets/vis2vis-jsontemplate/assets/fsharp-C_9pE0eN.js +1 -0
  48. package/widgets/vis2vis-jsontemplate/assets/fsl-IP3Za3WJ.js +10 -0
  49. package/widgets/vis2vis-jsontemplate/assets/{haskell_cabal-BETkhooQ.js → haskell_cabal-P5Bblh-f.js} +1 -1
  50. package/widgets/vis2vis-jsontemplate/assets/hostInit-BDi6DR-Y.js +1 -1
  51. package/widgets/vis2vis-jsontemplate/assets/{html_elixir-BZT1fAVA.js → html_elixir-C_M8zitH.js} +1 -1
  52. package/widgets/vis2vis-jsontemplate/assets/{index-BgdSDcyO.js → index-BqVaGGVp.js} +5 -5
  53. package/widgets/vis2vis-jsontemplate/assets/{index-BqJ57sae.js → index-CXmiNQUP.js} +27 -27
  54. package/widgets/vis2vis-jsontemplate/assets/{index-lLIT03Bf.js → index-DA2FLCU0.js} +41 -41
  55. package/widgets/vis2vis-jsontemplate/assets/{index-DLiw0ycz.js → index-pW2ZedEZ.js} +1 -1
  56. package/widgets/vis2vis-jsontemplate/assets/{ini-DOrp8VAL.js → ini-3M3q86Rb.js} +1 -1
  57. package/widgets/vis2vis-jsontemplate/assets/{io-B6WPW4S3.js → io-DKPkG8An.js} +2 -2
  58. package/widgets/vis2vis-jsontemplate/assets/{ion-BxjKPSGO.js → ion-DzjN26zr.js} +1 -1
  59. package/widgets/vis2vis-jsontemplate/assets/{jade-CbhHZW3W.js → jade-mE07afjx.js} +1 -1
  60. package/widgets/vis2vis-jsontemplate/assets/{jsx-runtime-5WCSzT7w.js → jsx-runtime-BCIWF1gJ.js} +1 -1
  61. package/widgets/vis2vis-jsontemplate/assets/{keybinding-emacs-BaUjXW98.js → keybinding-emacs-Q6X_mukn.js} +7 -7
  62. package/widgets/vis2vis-jsontemplate/assets/{mediawiki-DJkwyw9T.js → mediawiki-BQeZfTDA.js} +1 -1
  63. package/widgets/vis2vis-jsontemplate/assets/{mode-abap-Cx2uGxmu.js → mode-abap-izk5yJFO.js} +1 -1
  64. package/widgets/vis2vis-jsontemplate/assets/{mode-abc-DNxxXgCn.js → mode-abc-C0n9SAM4.js} +1 -1
  65. package/widgets/vis2vis-jsontemplate/assets/{mode-ada-DMVjprza.js → mode-ada-DDIWiFzC.js} +1 -1
  66. package/widgets/vis2vis-jsontemplate/assets/{mode-apache_conf-DUgycb9k.js → mode-apache_conf-CvTbIfd9.js} +1 -1
  67. package/widgets/vis2vis-jsontemplate/assets/{mode-applescript-BIn6R63y.js → mode-applescript-BFDh1DLv.js} +1 -1
  68. package/widgets/vis2vis-jsontemplate/assets/{mode-asciidoc-CrgKnY1x.js → mode-asciidoc-CJyH_TmC.js} +1 -1
  69. package/widgets/vis2vis-jsontemplate/assets/{mode-basic-YPMOcp_T.js → mode-basic-DGPOTsFU.js} +1 -1
  70. package/widgets/vis2vis-jsontemplate/assets/mode-c9search-hZCKMZ8Q.js +1 -0
  71. package/widgets/vis2vis-jsontemplate/assets/{mode-cobol-Dfq9SVVZ.js → mode-cobol-BfdoetYT.js} +1 -1
  72. package/widgets/vis2vis-jsontemplate/assets/{mode-coffee-xrjY_rju.js → mode-coffee-Du7el_LI.js} +1 -1
  73. package/widgets/vis2vis-jsontemplate/assets/{mode-coldfusion-OZwNZrIZ.js → mode-coldfusion-CibP_LMr.js} +1 -1
  74. package/widgets/vis2vis-jsontemplate/assets/{mode-csp-D74FoMl0.js → mode-csp-DvvN40TM.js} +1 -1
  75. package/widgets/vis2vis-jsontemplate/assets/{mode-cuttlefish-B1PQW5qP.js → mode-cuttlefish-UE9kbyvF.js} +1 -1
  76. package/widgets/vis2vis-jsontemplate/assets/{mode-diff-CXDWrh6N.js → mode-diff-DmXQRG1t.js} +1 -1
  77. package/widgets/vis2vis-jsontemplate/assets/{mode-django-l3su_Wch.js → mode-django-Bd8S6zSS.js} +3 -3
  78. package/widgets/vis2vis-jsontemplate/assets/{mode-dockerfile-D00fpghG.js → mode-dockerfile-CMU6luWn.js} +1 -1
  79. package/widgets/vis2vis-jsontemplate/assets/{mode-edifact-BJt5WRnI.js → mode-edifact-D70kzT5F.js} +1 -1
  80. package/widgets/vis2vis-jsontemplate/assets/{mode-fortran-FuOeWb1y.js → mode-fortran-D5_4RvkM.js} +1 -1
  81. package/widgets/vis2vis-jsontemplate/assets/{mode-fsharp-DWB4FB5I.js → mode-fsharp-W_hoO0cp.js} +1 -1
  82. package/widgets/vis2vis-jsontemplate/assets/{mode-gherkin-ClzVT6c8.js → mode-gherkin-CgYVM-yF.js} +1 -1
  83. package/widgets/vis2vis-jsontemplate/assets/{mode-gitignore-Cm81mNe0.js → mode-gitignore-Db_Eh_RM.js} +1 -1
  84. package/widgets/vis2vis-jsontemplate/assets/{mode-glsl-BmnhJ7jD.js → mode-glsl-C7ESvkv4.js} +1 -1
  85. package/widgets/vis2vis-jsontemplate/assets/{mode-golang-W5yNK8NQ.js → mode-golang-DndXMByw.js} +1 -1
  86. package/widgets/vis2vis-jsontemplate/assets/{mode-graphqlschema-C1W1BXTc.js → mode-graphqlschema-FY2nwLfP.js} +1 -1
  87. package/widgets/vis2vis-jsontemplate/assets/{mode-haml-DzRoVgZi.js → mode-haml-C1T9mKpP.js} +1 -1
  88. package/widgets/vis2vis-jsontemplate/assets/{mode-handlebars-CmnS29SD.js → mode-handlebars-DqaTqLIs.js} +1 -1
  89. package/widgets/vis2vis-jsontemplate/assets/{mode-haskell-BoBVITB9.js → mode-haskell-w75jMhmq.js} +1 -1
  90. package/widgets/vis2vis-jsontemplate/assets/{mode-hjson-BeLPW_Cs.js → mode-hjson-D5OnEYyM.js} +2 -2
  91. package/widgets/vis2vis-jsontemplate/assets/{mode-html_elixir-COi9C8Yo.js → mode-html_elixir-C2FckpU6.js} +1 -1
  92. package/widgets/vis2vis-jsontemplate/assets/{mode-html_ruby-C2Pmjq37.js → mode-html_ruby-DYeMc6-Y.js} +2 -2
  93. package/widgets/vis2vis-jsontemplate/assets/{mode-ini-BtBiRyI-.js → mode-ini-BIXuxwGu.js} +1 -1
  94. package/widgets/vis2vis-jsontemplate/assets/{mode-jade-BwjId9Hq.js → mode-jade-9Wy0V4G7.js} +1 -1
  95. package/widgets/vis2vis-jsontemplate/assets/{mode-julia-CVO3urMQ.js → mode-julia-DjjbE_C8.js} +1 -1
  96. package/widgets/vis2vis-jsontemplate/assets/{mode-kotlin-GZHgeC2A.js → mode-kotlin-C2spzAx6.js} +1 -1
  97. package/widgets/vis2vis-jsontemplate/assets/{mode-latex-DVUjduXc.js → mode-latex-BFSFRtrE.js} +1 -1
  98. package/widgets/vis2vis-jsontemplate/assets/{mode-livescript-BiuZjE9L.js → mode-livescript-3A2fssjH.js} +1 -1
  99. package/widgets/vis2vis-jsontemplate/assets/{mode-logiql-r7GQoTD0.js → mode-logiql-B7RuWqW1.js} +2 -2
  100. package/widgets/vis2vis-jsontemplate/assets/{mode-mask-qkR1KcB4.js → mode-mask-Cq8PFNcT.js} +1 -1
  101. package/widgets/vis2vis-jsontemplate/assets/{mode-mixal-7NVNCscn.js → mode-mixal-ByjojFO5.js} +1 -1
  102. package/widgets/vis2vis-jsontemplate/assets/{mode-nasal-CQ9lZVT-.js → mode-nasal-Lb23GUg0.js} +1 -1
  103. package/widgets/vis2vis-jsontemplate/assets/{mode-partiql-COxrAtTa.js → mode-partiql-B9DnTsIN.js} +1 -1
  104. package/widgets/vis2vis-jsontemplate/assets/{mode-perl-CONjBhej.js → mode-perl-CFAe63Jt.js} +1 -1
  105. package/widgets/vis2vis-jsontemplate/assets/{mode-plain_text-CFhhAAmr.js → mode-plain_text-Z6liRden.js} +1 -1
  106. package/widgets/vis2vis-jsontemplate/assets/mode-plsql-AgzytsmL.js +1 -0
  107. package/widgets/vis2vis-jsontemplate/assets/{mode-prql-YLxZHTUj.js → mode-prql-C0CNuWUc.js} +1 -1
  108. package/widgets/vis2vis-jsontemplate/assets/{mode-python-BZz04ov9.js → mode-python-JLJDx8il.js} +2 -2
  109. package/widgets/vis2vis-jsontemplate/assets/{mode-r-e10wKfR-.js → mode-r-tDgR_0hi.js} +1 -1
  110. package/widgets/vis2vis-jsontemplate/assets/{mode-razor-HQ3WO4ht.js → mode-razor-oJWPILTI.js} +1 -1
  111. package/widgets/vis2vis-jsontemplate/assets/{mode-rdoc-DX5Wf-Fm.js → mode-rdoc-rvUsLJhJ.js} +1 -1
  112. package/widgets/vis2vis-jsontemplate/assets/{mode-ruby-Bjton-Z6.js → mode-ruby-vxgRJ3at.js} +1 -1
  113. package/widgets/vis2vis-jsontemplate/assets/{mode-sac-CT3iemsq.js → mode-sac-DJEHexLE.js} +1 -1
  114. package/widgets/vis2vis-jsontemplate/assets/{mode-scheme-B5C4oJuT.js → mode-scheme-DSzPV-xZ.js} +1 -1
  115. package/widgets/vis2vis-jsontemplate/assets/{mode-scrypt-PF2qJgu2.js → mode-scrypt-DqnlbU6T.js} +1 -1
  116. package/widgets/vis2vis-jsontemplate/assets/{mode-sh-D24LzE3p.js → mode-sh-BgX1RMPm.js} +2 -2
  117. package/widgets/vis2vis-jsontemplate/assets/{mode-slim-Cl_LtZ3D.js → mode-slim-CGltPf3C.js} +2 -2
  118. package/widgets/vis2vis-jsontemplate/assets/{mode-smarty-B7H45xSz.js → mode-smarty-3yNl7Ed2.js} +1 -1
  119. package/widgets/vis2vis-jsontemplate/assets/{mode-snippets-D8Hbyw7T.js → mode-snippets-C0w3vPfj.js} +1 -1
  120. package/widgets/vis2vis-jsontemplate/assets/{mode-soy_template-D0sFgNSx.js → mode-soy_template-D6znk8zE.js} +1 -1
  121. package/widgets/vis2vis-jsontemplate/assets/{mode-sparql-DHyU529t.js → mode-sparql-DAJkag1U.js} +1 -1
  122. package/widgets/vis2vis-jsontemplate/assets/{mode-swift-CkQ9K8Zi.js → mode-swift-CJrbMvmH.js} +1 -1
  123. package/widgets/vis2vis-jsontemplate/assets/{mode-terraform-CoemOqbf.js → mode-terraform-BvuF3C81.js} +1 -1
  124. package/widgets/vis2vis-jsontemplate/assets/{mode-tex-DderkMrs.js → mode-tex-FKLPAmaj.js} +1 -1
  125. package/widgets/vis2vis-jsontemplate/assets/{mode-textile-cQ4nh_8l.js → mode-textile-Dvy5oOS2.js} +1 -1
  126. package/widgets/vis2vis-jsontemplate/assets/{mode-toml-C7N8acrX.js → mode-toml-Ov1xArGU.js} +1 -1
  127. package/widgets/vis2vis-jsontemplate/assets/{mode-tsv-BW4F9Csx.js → mode-tsv-BceHxjkS.js} +1 -1
  128. package/widgets/vis2vis-jsontemplate/assets/{mode-turtle-D1Gj0Td4.js → mode-turtle-DQpOYisE.js} +1 -1
  129. package/widgets/vis2vis-jsontemplate/assets/{mode-vala-CQgsR3Iz.js → mode-vala-CiRvTtot.js} +1 -1
  130. package/widgets/vis2vis-jsontemplate/assets/mode-vbscript-BuLwesMW.js +4 -0
  131. package/widgets/vis2vis-jsontemplate/assets/{mode-velocity-Bq3AJheK.js → mode-velocity-C11dGP3g.js} +1 -1
  132. package/widgets/vis2vis-jsontemplate/assets/{mode-visualforce-hTvPHkdm.js → mode-visualforce-Dwreo1HH.js} +1 -1
  133. package/widgets/vis2vis-jsontemplate/assets/{mode-xquery-CARgpScm.js → mode-xquery-BahV5sAB.js} +4 -4
  134. package/widgets/vis2vis-jsontemplate/assets/{mushcode-BmgSkBy5.js → mushcode-CXM6a_Ds.js} +1 -1
  135. package/widgets/vis2vis-jsontemplate/assets/{ada-D8cv3bAk.js → nasal-BG4t5gWR.js} +1 -1
  136. package/widgets/vis2vis-jsontemplate/assets/{nim-CuG1Iqzn.js → nim-BSKFaYgP.js} +1 -1
  137. package/widgets/vis2vis-jsontemplate/assets/{nsis-e4bU-iiA.js → nsis-MmekJbPe.js} +1 -1
  138. package/widgets/vis2vis-jsontemplate/assets/{pgsql-BravoAfx.js → pgsql-BBx8_npj.js} +1 -1
  139. package/widgets/vis2vis-jsontemplate/assets/{praat-DUyb5Bk6.js → praat-DBXKMEl3.js} +1 -1
  140. package/widgets/vis2vis-jsontemplate/assets/{prisma-mdDN7d2R.js → prisma-vWqeCBMT.js} +1 -1
  141. package/widgets/vis2vis-jsontemplate/assets/{prolog-DqDHt9zx.js → prolog-DVd3Ju-x.js} +1 -1
  142. package/widgets/vis2vis-jsontemplate/assets/{properties-DZWGPhQI.js → properties-DgsElEoz.js} +1 -1
  143. package/widgets/vis2vis-jsontemplate/assets/{puppet-BtdJ4V45.js → puppet-D32_CDs8.js} +1 -1
  144. package/widgets/vis2vis-jsontemplate/assets/{raku-DVMDIfIU.js → raku-zoAobEMV.js} +1 -1
  145. package/widgets/vis2vis-jsontemplate/assets/rst-DslWQF6N.js +23 -0
  146. package/widgets/vis2vis-jsontemplate/assets/{rust-CfkJXaem.js → rust-D-Wy0AdI.js} +1 -1
  147. package/widgets/vis2vis-jsontemplate/assets/{sac-Cb2eIKD_.js → sac-DPplVCeU.js} +1 -1
  148. package/widgets/vis2vis-jsontemplate/assets/{sass-iV1YOFQN.js → sass-z7tRsV6H.js} +1 -1
  149. package/widgets/vis2vis-jsontemplate/assets/{scheme-BFQyaXim.js → scheme-bskvO7OA.js} +1 -1
  150. package/widgets/vis2vis-jsontemplate/assets/{scss-DWqyVAcU.js → scss-DIA04Vxd.js} +1 -1
  151. package/widgets/vis2vis-jsontemplate/assets/{sh-BHHjLho8.js → sh-Ni1JTqkK.js} +1 -1
  152. package/widgets/vis2vis-jsontemplate/assets/{space-Czl6zHqh.js → space-Y4rU4Lse.js} +1 -1
  153. package/widgets/vis2vis-jsontemplate/assets/{swift-C6jmn2lM.js → swift-xgqH3Y64.js} +1 -1
  154. package/widgets/vis2vis-jsontemplate/assets/{terraform-C_A1grPI.js → terraform-C2ME5Uq4.js} +1 -1
  155. package/widgets/vis2vis-jsontemplate/assets/{theme-cloud9_day-DQoca-VF.js → theme-cloud9_day-D98jah6m.js} +1 -1
  156. package/widgets/vis2vis-jsontemplate/assets/{theme-cloud9_night-DssalqUo.js → theme-cloud9_night-BZh9gIL5.js} +1 -1
  157. package/widgets/vis2vis-jsontemplate/assets/{theme-cloud9_night_low_color-CmQdrSgm.js → theme-cloud9_night_low_color-CkyOLW5t.js} +1 -1
  158. package/widgets/vis2vis-jsontemplate/assets/{theme-dreamweaver-Ce_xMjNm.js → theme-dreamweaver-DLSi49ds.js} +1 -1
  159. package/widgets/vis2vis-jsontemplate/assets/{theme-github-ChbFyXoG.js → theme-github-ucg7mD23.js} +1 -1
  160. package/widgets/vis2vis-jsontemplate/assets/{theme-github_light_default-jezXjzZJ.js → theme-github_light_default-BkrCWcOa.js} +2 -2
  161. package/widgets/vis2vis-jsontemplate/assets/{theme-gob-D4kuHx9p.js → theme-gob-CV2ACXG2.js} +2 -2
  162. package/widgets/vis2vis-jsontemplate/assets/{theme-gruvbox_dark_hard-BcmKgsyJ.js → theme-gruvbox_dark_hard-B0hdbTLh.js} +1 -1
  163. package/widgets/vis2vis-jsontemplate/assets/{theme-gruvbox_light_hard-DOcAP-lF.js → theme-gruvbox_light_hard-CBPSdLRl.js} +1 -1
  164. package/widgets/vis2vis-jsontemplate/assets/{theme-pastel_on_dark-BWcTv7Gy.js → theme-pastel_on_dark-C7BCXLo9.js} +1 -1
  165. package/widgets/vis2vis-jsontemplate/assets/{theme-tomorrow_night_blue-CE7iCYb0.js → theme-tomorrow_night_blue-y9JijjM2.js} +1 -1
  166. package/widgets/vis2vis-jsontemplate/assets/{theme-tomorrow_night_bright-Bf9pHl9K.js → theme-tomorrow_night_bright-bZ89TuEI.js} +1 -1
  167. package/widgets/vis2vis-jsontemplate/assets/{theme-vibrant_ink-D2R0WlUq.js → theme-vibrant_ink-CdBBwU6x.js} +1 -1
  168. package/widgets/vis2vis-jsontemplate/assets/{theme-xcode-DmV08Rqt.js → theme-xcode-Bl6839h-.js} +1 -1
  169. package/widgets/vis2vis-jsontemplate/assets/translations-DrivMuM3.js +1 -0
  170. package/widgets/vis2vis-jsontemplate/assets/{tsv-QCUAN7tM.js → tsv-Sp0RYAyp.js} +1 -1
  171. package/widgets/vis2vis-jsontemplate/assets/{useTheme-iMXDunoW.js → useTheme-16T9er0Q.js} +1 -1
  172. package/widgets/vis2vis-jsontemplate/assets/{verilog-JLsQfqCE.js → verilog-DTbpFidr.js} +1 -1
  173. package/widgets/vis2vis-jsontemplate/assets/{virtualExposes-BL4Me7yj.js → virtualExposes-B1yMnjjp.js} +2 -2
  174. package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__-CM4MYcQD.js +1 -0
  175. package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__loadShare__react__loadShare__-B3mgx0MK.js +1 -0
  176. package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__mf_v__runtimeInit__mf_v__-CbZOhenT.js +1 -0
  177. package/widgets/vis2vis-jsontemplate/assets/{vue-BGFTp4kK.js → vue-DOEpQzYj.js} +1 -1
  178. package/widgets/vis2vis-jsontemplate/assets/{worker-base-BPnv-em4.js → worker-base-C17j_SAK.js} +1 -1
  179. package/widgets/vis2vis-jsontemplate/assets/{worker-coffee-BGt0WG_T.js → worker-coffee-Czp8PZua.js} +2 -2
  180. package/widgets/vis2vis-jsontemplate/assets/{worker-css-DUK_OUGr.js → worker-css-Bg1DwrC5.js} +4 -4
  181. package/widgets/vis2vis-jsontemplate/assets/{worker-html-DnXGSuo3.js → worker-html-C3OPhHnM.js} +6 -6
  182. package/widgets/vis2vis-jsontemplate/assets/{worker-javascript-DKHkjovd.js → worker-javascript-DVjwaarY.js} +9 -9
  183. package/widgets/vis2vis-jsontemplate/assets/{worker-json-BD5o_G43.js → worker-json-Dl4dKylY.js} +2 -2
  184. package/widgets/vis2vis-jsontemplate/assets/{worker-lua-RZJAMBtk.js → worker-lua-lr7wt6XI.js} +3 -3
  185. package/widgets/vis2vis-jsontemplate/assets/{worker-xml-BwUcqzAQ.js → worker-xml-J-SVmGof.js} +3 -3
  186. package/widgets/vis2vis-jsontemplate/assets/{worker-xquery-Bdainhib.js → worker-xquery-MxZhhTva.js} +19 -19
  187. package/widgets/vis2vis-jsontemplate/assets/{worker-yaml-BtpWJJU1.js → worker-yaml-OGxim4Hf.js} +7 -7
  188. package/widgets/vis2vis-jsontemplate/assets/{zeek-CcoNTi-1.js → zeek-vvUf7-q6.js} +1 -1
  189. package/widgets/vis2vis-jsontemplate/customWidgets.js +9 -2
  190. package/widgets/vis2vis-jsontemplate/assets/abap-DfmzwOny.js +0 -1
  191. package/widgets/vis2vis-jsontemplate/assets/alda-BnZCAn_Y.js +0 -1
  192. package/widgets/vis2vis-jsontemplate/assets/assembly_arm32-DmUGZg4l.js +0 -1
  193. package/widgets/vis2vis-jsontemplate/assets/astro-C6vYAtVy.js +0 -1
  194. package/widgets/vis2vis-jsontemplate/assets/d-ZKWDuB0_.js +0 -1
  195. package/widgets/vis2vis-jsontemplate/assets/ext-diff-CQLhij8i.js +0 -150
  196. package/widgets/vis2vis-jsontemplate/assets/ext-inline_autocomplete-BssNoRvW.js +0 -235
  197. package/widgets/vis2vis-jsontemplate/assets/fsharp-BLTDJuay.js +0 -1
  198. package/widgets/vis2vis-jsontemplate/assets/fsl-CdTU_n9i.js +0 -10
  199. package/widgets/vis2vis-jsontemplate/assets/mode-c9search-B7V8RiOe.js +0 -1
  200. package/widgets/vis2vis-jsontemplate/assets/mode-plsql-DgP7Cdl4.js +0 -1
  201. package/widgets/vis2vis-jsontemplate/assets/mode-vbscript-BkEqgnMM.js +0 -4
  202. package/widgets/vis2vis-jsontemplate/assets/rst-Dcwn5Muz.js +0 -23
  203. package/widgets/vis2vis-jsontemplate/assets/translations-RCQ_bOWv.js +0 -1
  204. package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__-CO3TTBdF.js +0 -1
  205. package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__loadShare__react__loadShare__-DCWor3BJ.js +0 -1
  206. package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__mf_v__runtimeInit__mf_v__-Dv-bte9P.js +0 -5
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2025 oweitman <oweitman@gmx.de>
3
+ Copyright (c) 2025-2026 oweitman <oweitman@gmx.de>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -59,18 +59,52 @@ a combined form of HTML code + JavaScript + CSS + special tags that control
59
59
  the display of the JSON attributes.
60
60
  JSONTemplate now supports async calls with await.
61
61
 
62
- | Setting | description |
63
- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
64
- | json_template | The template can be used to determine the appearance of the JSON data. All valid HTML tags (including CSS attributes in style tags) can be used in the template. There are also special tags within which the JSON data is displayed and JavaScript instructions can be executed. |
65
- | json_oid | Selection of the data point with the corresponding JSON data. |
66
- | json_dpCount | Number of data points to be made available in the template. |
67
- | json_dp | Datapoint ID to be made available. |
62
+ | Setting | description |
63
+ | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
64
+ | json_template | The template can be used to determine the appearance of the JSON data. All valid HTML tags (including CSS attributes in style tags) can be used in the template. There are also special tags within which the JSON data is displayed and JavaScript instructions can be executed. |
65
+ | json_oid | Selection of the data point with the corresponding JSON data. |
66
+ | json_dpCount | Number of data points to be made available in the template. |
67
+ | json_dp | Datapoint ID to be made available. |
68
+ | json_scriptCount | Number of JavaScript URLs to be loaded |
69
+ | json_script[] | JavaScript URL to be loaded. See example below. |
70
+ | json_cssCount | Number of CSS URLs to be loaded. |
71
+ | json_css[] | CSS URL to be loaded. |
68
72
 
69
73
  For details on the template system, see chapter Template based on examples
70
74
 
71
- The JSON data is passed to the template with the prefix data. In addition,
72
- the current widgetID is also available as a variable so that it can be
73
- specified in individual CSS instructions.
75
+ Available data objects in the template:
76
+
77
+ | object/variable | description |
78
+ | --------------- | ------------------------------------------------------------------------ |
79
+ | widgetID | widgetID of the widget. |
80
+ | data | JSON object referenced by the datapoint in json_oid. |
81
+ | dp | Array of the datapoint data, referenced by the additional datapoints |
82
+ | widget | internal widget data. object with all available widget settings |
83
+ | style | internal style data. object with all available widget style informations |
84
+
85
+ The additional datapoints can be accessed by
86
+ A) the name of the datapoint
87
+
88
+ ```javascript
89
+ <%- dp["0_userdata.0.test"] %>
90
+ <%- dp["0_userdata.0.abc"] %>
91
+ ```
92
+
93
+ B) Indexnumber of the datapoint (the number always start with 0)
94
+
95
+ ```javascript
96
+ <%- dp[Object.keys(dp)[0]] %>
97
+ <%- dp[Object.keys(dp)[1]] %>
98
+ ```
99
+
100
+ Example output of data, widget and style in the template
101
+
102
+ ```ejs
103
+ <%- JSON
104
+ .stringify(style, null, 4)
105
+ .replace(/\n/g, '<br>')
106
+ .replace(/ /g, '&nbsp;'); %>
107
+ ```
74
108
 
75
109
  #### Advanced use case
76
110
 
@@ -143,6 +177,76 @@ definition of the sendToAsync function
143
177
  [{"label":"Afghanistan","value":"AF"},{"label":"Åland Islands","value":"AX"},{"label":"Albania","value":"AL"}]
144
178
  ```
145
179
 
180
+ #### Use case for loading additional scripts
181
+
182
+ Additional fields allow you to load JavaScript libraries (e.g., from CDNs
183
+ like jsDelivr or cdnjs). The following example demonstrates this
184
+ for the chartJS library.
185
+
186
+ **Step 1:**
187
+
188
+ Create a new Datapoint with type string or json named `0_userdata.0.chartData`
189
+ and the following content
190
+
191
+ ```json
192
+ [12, 19, 3, 5, 2, 3]
193
+ ```
194
+
195
+ **Step 2:**
196
+
197
+ Enter the following url in the json_script[1] field:
198
+
199
+ ```text
200
+ https://cdn.jsdelivr.net/npm/chart.js
201
+ ```
202
+
203
+ **Step 3:**
204
+
205
+ Enter the created data point name in the JSON Datapoint field.
206
+ Enter the following template in the JSON Template field.
207
+
208
+ Except for one line, this is standard HTML + JavaScript.
209
+
210
+ ```html
211
+ data: <%- JSON.stringify(data) %>,
212
+ ```
213
+
214
+ The data read from the data point is available in the JavaScript
215
+ variable `data` and is output within the template instructions <%- ... %>.
216
+ Once the template is compiled and included in the HTML document,
217
+ it is executed by the browser, so that the chart is displayed via JavaScript.
218
+
219
+ ```ejs
220
+ <div>
221
+ <canvas id="myChart"></canvas>
222
+ </div>
223
+
224
+ <script>
225
+ const ctx = document.getElementById('myChart');
226
+
227
+ new Chart(ctx, {
228
+ type: 'bar',
229
+ data: {
230
+ labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
231
+ datasets: [{
232
+ label: '# of Votes',
233
+ data: <%- JSON.stringify(data) %>,
234
+ borderWidth: 1
235
+ }]
236
+ },
237
+ options: {
238
+ scales: {
239
+ y: {
240
+ beginAtZero: true
241
+ }
242
+ }
243
+ }
244
+ });
245
+ </script>
246
+ ```
247
+
248
+ ![Example](img/example_extscripts.png)
249
+
146
250
  #### Use case for a database-supported task list
147
251
 
148
252
  ##### **Introduction**
@@ -317,6 +421,27 @@ as `local_?` data points are processed internally within VIS (see `vis` document
317
421
 
318
422
  ## Templatesystem
319
423
 
424
+ ## Important note for the template system in vis
425
+
426
+ In vis, all object notations in the following form are recognized and replaced as bindings.
427
+
428
+ Therefore, the opening and closing brackets of all object notations must be placed on separate lines:
429
+
430
+ Incorrect:
431
+
432
+ ```json
433
+ { "a": 1, "b": 2 }
434
+ ```
435
+
436
+ Correct
437
+
438
+ ```json
439
+ {
440
+ "a": 1,
441
+ "b": 2
442
+ }
443
+ ```
444
+
320
445
  ## Tags
321
446
 
322
447
  The template system works with certain tags.
@@ -507,6 +632,28 @@ Loop over the attributes of an object
507
632
  Placeholder for the next version (at the beginning of the line):
508
633
  ### **WORK IN PROGRESS**
509
634
  -->
635
+ ### 4.3.10 (2026-01-25)
636
+
637
+ - update test and release script
638
+
639
+ ### 4.3.1 (2026-01-24)
640
+
641
+ - try again to publish
642
+
643
+ ### 4.3.0 (2026-01-24)
644
+
645
+ - The ability to load additional JavaScript and CSS files has been added.
646
+ This is currently only available for vis1 for testing purposes.
647
+
648
+ ### 4.2.0 (2025-11-14)
649
+
650
+ - Improve documentation for the object notation in a template
651
+ - fix some translations
652
+ - align attribute name to vis1
653
+ - add widget data to the available template objects in vis2
654
+ - add style and widget object to the available template objects in vis1
655
+ - improve documentation
656
+
510
657
  ### 4.1.3 (2025-11-03)
511
658
 
512
659
  - fix race condition if more than one widget use the same datapoint
@@ -532,7 +679,7 @@ Loop over the attributes of an object
532
679
 
533
680
  MIT License
534
681
 
535
- Copyright (c) 2021-2025 oweitman <oweitman@gmx.de>
682
+ Copyright (c) 2021-2026 oweitman <oweitman@gmx.de>
536
683
 
537
684
  Permission is hereby granted, free of charge, to any person obtaining a copy
538
685
  of this software and associated documentation files (the "Software"), to deal
package/io-package.json CHANGED
@@ -1,59 +1,98 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "vis-jsontemplate",
4
- "version": "4.1.3",
4
+ "version": "4.3.10",
5
5
  "news": {
6
- "4.1.3": {
7
- "en": "fix race condition if more than one widget use the same datapoint\nswitch to trusted publishing",
8
- "de": "fixe rassenbedingung, wenn mehr als ein widget den gleichen datenpunkt verwenden\nauf vertrauenswürdige veröffentlichung wechseln",
9
- "ru": "исправить состояние гонки, если более чем один виджет использует одну и ту же точку данных\nпереход к доверенной публикации",
10
- "pt": "corrigir a condição de corrida se mais de um elemento usar o mesmo ponto de dados\nmudar para publicação confiável",
11
- "nl": "fix race conditie als meer dan één widget hetzelfde datapoint gebruiken\noverschakelen naar vertrouwde publicatie",
12
- "fr": "fixer l'état de la course si plus d'un widget utilise le même point de données\npasser à une publication fiable",
13
- "it": "correzione condizione di gara se più di un widget utilizzare lo stesso datapoint\npassare alla pubblicazione di fiducia",
14
- "es": "arreglar la condición de carrera si más de un widget utiliza el mismo punto de datos\ncambio a la publicación de confianza",
15
- "pl": "naprawić stan wyścigu, jeśli więcej niż jeden widget korzystać z tego samego punktu danych\nprzełączanie na zaufaną publikację",
16
- "uk": "фіксувати стан забігу, якщо більше одного віджета використовувати однакову точку даних\nпереключення до перевіреного видання",
17
- "zh-cn": "如果多个部件使用相同的数据点, 则固定种族条件\n切换到可信任的出版"
6
+ "4.3.10": {
7
+ "en": "update test and release script",
8
+ "de": "update-test und release-skript",
9
+ "ru": "обновить тест и выпустить скрипт",
10
+ "pt": "atualizar script de teste e lançamento",
11
+ "nl": "update test- en releasescript",
12
+ "fr": "mettre à jour le script test et release",
13
+ "it": "test di aggiornamento e script di rilascio",
14
+ "es": "actualización de prueba y script de liberación",
15
+ "pl": "aktualizacja skryptu testowego i wydania",
16
+ "uk": "скрипт тестування і реліз",
17
+ "zh-cn": "更新测试并发布脚本"
18
18
  },
19
- "4.1.2": {
20
- "en": "new try of publish",
21
- "de": "neuer Versuch der Veröffentlichung",
22
- "ru": "новая попытка публикации",
23
- "pt": "nova tentativa de publicação",
24
- "nl": "nieuwe poging tot publiceren",
25
- "fr": "nouvel essai de publication",
26
- "it": "nuovo tentativo di pubblicazione",
27
- "es": "nuevo intento de publicar",
28
- "pl": "nowa próba publikacji",
29
- "uk": "нова спроба публікації",
30
- "zh-cn": "new try of publish"
19
+ "4.3.9": {
20
+ "en": "update test and release script",
21
+ "de": "update-test und release-skript",
22
+ "ru": "обновить тест и выпустить скрипт",
23
+ "pt": "atualizar script de teste e lançamento",
24
+ "nl": "update test- en releasescript",
25
+ "fr": "mettre à jour le script test et release",
26
+ "it": "test di aggiornamento e script di rilascio",
27
+ "es": "actualización de prueba y script de liberación",
28
+ "pl": "aktualizacja skryptu testowego i wydania",
29
+ "uk": "скрипт тестування і реліз",
30
+ "zh-cn": "更新测试并发布脚本"
31
31
  },
32
- "4.0.2": {
33
- "en": "remove v4.0.0 from io-package",
34
- "de": "entfernen v4.0.0 von io-package",
35
- "ru": "удалить v4.0.0 из пакета io",
36
- "pt": "remover v4.0.0 do pacote io",
37
- "nl": "v4.0.0 uit io-package verwijderen",
38
- "fr": "supprimer v4.0.0 du io-package",
39
- "it": "rimuovere v4.0.0 da io-package",
40
- "es": "quitar v4.0.0 de io-paquete",
41
- "pl": "usunąć v4.0.0 z opakowania jo-",
42
- "uk": "remove v4.0.0 від io-package",
43
- "zh-cn": "从 io 包装中删除 v4. 0.0"
32
+ "4.3.8": {
33
+ "en": "update test and release script",
34
+ "de": "update-test und release-skript",
35
+ "ru": "обновить тест и выпустить скрипт",
36
+ "pt": "atualizar script de teste e lançamento",
37
+ "nl": "update test- en releasescript",
38
+ "fr": "mettre à jour le script test et release",
39
+ "it": "test di aggiornamento e script di rilascio",
40
+ "es": "actualización de prueba y script de liberación",
41
+ "pl": "aktualizacja skryptu testowego i wydania",
42
+ "uk": "скрипт тестування і реліз",
43
+ "zh-cn": "更新测试并发布脚本"
44
44
  },
45
- "4.0.1": {
46
- "en": "move vis1 and vis2 widgets to vis-jsontemplate adapter",
47
- "de": "vis1 und vis2 widgets zu vis-jsontemplate adapter verschieben",
48
- "ru": "переместить виджеты vis1 и vis2 в адаптер vis-jsontemplate",
49
- "pt": "mover widgets vis1 e vis2 para o adaptador vis-jsontemplate",
50
- "nl": "vis1 en vis2 widgets verplaatsen naar vis-jsentemplaatadapter",
51
- "fr": "déplacer les widgets vis1 et vis2 vers l'adaptateur vis-jsontemplate",
52
- "it": "spostare i widget vis1 e vis2 per l'adattatore vis-jsontemplate",
53
- "es": "mover vis1 y vis2 widgets al adaptador vis-jsontemplate",
54
- "pl": "przesuń widżety vis1 i vis2 do adaptera vis- jsonszablon",
55
- "uk": "перемістіть віджети vis1 і vis2 до адаптера vis-jsontemplate",
56
- "zh-cn": "将粘度1和粘度2的部件移动到粘度调试器上"
45
+ "4.3.7": {
46
+ "en": "update test and release script",
47
+ "de": "update-test und release-skript",
48
+ "ru": "обновить тест и выпустить скрипт",
49
+ "pt": "atualizar script de teste e lançamento",
50
+ "nl": "update test- en releasescript",
51
+ "fr": "mettre à jour le script test et release",
52
+ "it": "test di aggiornamento e script di rilascio",
53
+ "es": "actualización de prueba y script de liberación",
54
+ "pl": "aktualizacja skryptu testowego i wydania",
55
+ "uk": "скрипт тестування і реліз",
56
+ "zh-cn": "更新测试并发布脚本"
57
+ },
58
+ "4.3.6": {
59
+ "en": "update test and release script",
60
+ "de": "update-test und release-skript",
61
+ "ru": "обновить тест и выпустить скрипт",
62
+ "pt": "atualizar script de teste e lançamento",
63
+ "nl": "update test- en releasescript",
64
+ "fr": "mettre à jour le script test et release",
65
+ "it": "test di aggiornamento e script di rilascio",
66
+ "es": "actualización de prueba y script de liberación",
67
+ "pl": "aktualizacja skryptu testowego i wydania",
68
+ "uk": "скрипт тестування і реліз",
69
+ "zh-cn": "更新测试并发布脚本"
70
+ },
71
+ "4.3.5": {
72
+ "en": "update test and release script",
73
+ "de": "update-test und release-skript",
74
+ "ru": "обновить тест и выпустить скрипт",
75
+ "pt": "atualizar script de teste e lançamento",
76
+ "nl": "update test- en releasescript",
77
+ "fr": "mettre à jour le script test et release",
78
+ "it": "test di aggiornamento e script di rilascio",
79
+ "es": "actualización de prueba y script de liberación",
80
+ "pl": "aktualizacja skryptu testowego i wydania",
81
+ "uk": "скрипт тестування і реліз",
82
+ "zh-cn": "更新测试并发布脚本"
83
+ },
84
+ "4.3.4": {
85
+ "en": "update test and release script",
86
+ "de": "update-test und release-skript",
87
+ "ru": "обновить тест и выпустить скрипт",
88
+ "pt": "atualizar script de teste e lançamento",
89
+ "nl": "update test- en releasescript",
90
+ "fr": "mettre à jour le script test et release",
91
+ "it": "test di aggiornamento e script di rilascio",
92
+ "es": "actualización de prueba y script de liberación",
93
+ "pl": "aktualizacja skryptu testowego i wydania",
94
+ "uk": "скрипт тестування і реліз",
95
+ "zh-cn": "更新测试并发布脚本"
57
96
  }
58
97
  },
59
98
  "titleLang": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.vis-jsontemplate",
3
- "version": "4.1.3",
3
+ "version": "4.3.10",
4
4
  "description": "vis-jsontemplate",
5
5
  "author": {
6
6
  "name": "oweitman",
@@ -25,14 +25,13 @@
25
25
  "@alcalzone/release-script-plugin-iobroker": "^4.0.0",
26
26
  "@alcalzone/release-script-plugin-license": "^4.0.0",
27
27
  "@alcalzone/release-script-plugin-manual-review": "^4.0.0",
28
- "@iobroker/build-tools": "^2.0.15",
28
+ "@iobroker/adapter-dev": "^1.5.0",
29
29
  "@iobroker/eslint-config": "^2.2.0",
30
+ "@iobroker/testing": "^5.2.2",
31
+ "@iobroker/build-tools": "^2.0.15",
30
32
  "@iobroker/vis-2-widgets-react-dev": "^4.0.4",
31
33
  "@iobroker/vis-2-widgets-testing": "^1.0.6",
32
- "@iobroker/adapter-dev": "^1.5.0",
33
- "@iobroker/testing": "^5.1.1",
34
- "@types/gulp": "^4.0.18",
35
- "@types/node": "^24.10.0"
34
+ "@types/node": "^24.10.1"
36
35
  },
37
36
  "main": "widgets/vis2jsontemplate/customWidgets.js",
38
37
  "files": [
@@ -44,6 +43,7 @@
44
43
  "scripts": {
45
44
  "test:package": "mocha test/package --exit",
46
45
  "test:widgets": "mocha ./test/*.test.js",
46
+ "test:integration": "mocha test/package --exit",
47
47
  "test": "npm run test:package && npm run test:widgets",
48
48
  "prepublishOnly": "npm run build-vis1widgets && npm run build-vis2widgets",
49
49
  "lint": "npm run lint-adapter && npm run lint-vis1widgets && npm run lint-vis2widgets",
@@ -58,7 +58,7 @@
58
58
  var version;
59
59
  var init_package = __esm({
60
60
  "../package.json"() {
61
- version = "4.1.3";
61
+ version = "4.3.10";
62
62
  }
63
63
  });
64
64
 
@@ -73,6 +73,8 @@
73
73
  }));
74
74
  vis.binds["jsontemplate"] = {
75
75
  version,
76
+ _assetCache: vis.binds["jsontemplate"] && vis.binds["jsontemplate"]._assetCache || /* @__PURE__ */ new Map(),
77
+ _widgetInit: vis.binds["jsontemplate"] && vis.binds["jsontemplate"]._widgetInit || /* @__PURE__ */ new Map(),
76
78
  /**
77
79
  * Log the version of jsontemplate and remove it.
78
80
  * Should be called from the main thread, as it logs to the console.
@@ -139,6 +141,20 @@
139
141
  bound.push(data[`json_dp${i}`]);
140
142
  }
141
143
  }
144
+ const scriptCount = data.json_scriptCount ? data.json_scriptCount : 1;
145
+ const scripts = [];
146
+ for (let i = 1; i <= scriptCount; i++) {
147
+ if (data[`json_script${i}`]) {
148
+ scripts.push(data[`json_script${i}`]);
149
+ }
150
+ }
151
+ const cssCount = data.json_cssCount ? data.json_cssCount : 1;
152
+ const css = [];
153
+ for (let i = 1; i <= cssCount; i++) {
154
+ if (data[`json_css${i}`]) {
155
+ css.push(data[`json_css${i}`]);
156
+ }
157
+ }
142
158
  if (bound) {
143
159
  if (!vis.editMode) {
144
160
  yield vis.binds["jsontemplate"].bindStatesAsync(
@@ -153,7 +169,15 @@
153
169
  );
154
170
  }
155
171
  }
156
- yield this.render(widgetID, view, data);
172
+ try {
173
+ yield vis.binds["jsontemplate"].initWidgetAssetsOnce(widgetID, scripts, css);
174
+ } catch (e) {
175
+ let msg = vis.binds["jsontemplate"].escapeHTML(e.message).replace(/(?:\r\n|\r|\n)/g, "<br>");
176
+ msg = msg.replace(/ /gm, "&nbsp;");
177
+ $div.html(`<code style="color:red;">${msg}</code>`);
178
+ return;
179
+ }
180
+ yield this.render(widgetID, view, data, style);
157
181
  });
158
182
  },
159
183
  /**
@@ -178,7 +202,7 @@
178
202
  * It then uses EJS to render the template with the provided data and updates the widget's HTML content.
179
203
  * In case of an error during rendering, it escapes and formats the error message to display it in the widget.
180
204
  */
181
- render: function(widgetID, view, data) {
205
+ render: function(widgetID, view, data, style) {
182
206
  return __async(this, null, function* () {
183
207
  const oiddata = data.json_oid ? JSON.parse(vis.states.attr(`${data.json_oid}.val`)) : {};
184
208
  const dpCount = data.json_dpCount ? data.json_dpCount : 1;
@@ -193,7 +217,7 @@
193
217
  try {
194
218
  text = yield ejs.render(
195
219
  template,
196
- { widgetID, data: oiddata, dp: datapoints },
220
+ { widgetID, data: oiddata, dp: datapoints, widget: data, style },
197
221
  { async: true }
198
222
  );
199
223
  } catch (e) {
@@ -393,6 +417,105 @@
393
417
  }
394
418
  };
395
419
  return line;
420
+ },
421
+ loadAsset: function(url, kind) {
422
+ const u = (url || "").trim();
423
+ if (!u) {
424
+ return Promise.resolve();
425
+ }
426
+ const cache = vis.binds["jsontemplate"]._assetCache;
427
+ if (cache.has(u)) {
428
+ return cache.get(u);
429
+ }
430
+ const p = new Promise((resolve, reject) => {
431
+ try {
432
+ const isCss = kind === "css" || u.toLowerCase().endsWith(".css");
433
+ const isJs = kind === "js" || u.toLowerCase().endsWith(".js") || !isCss;
434
+ if (isCss) {
435
+ const existing = document.querySelector(`link[rel="stylesheet"][href="${CSS.escape(u)}"]`);
436
+ if (existing) {
437
+ return resolve();
438
+ }
439
+ const link = document.createElement("link");
440
+ link.rel = "stylesheet";
441
+ link.href = u;
442
+ link.onload = () => resolve();
443
+ link.onerror = () => reject(new Error(`CSS konnte nicht geladen werden: ${u}`));
444
+ document.head.appendChild(link);
445
+ return;
446
+ }
447
+ if (isJs) {
448
+ const existing = document.querySelector(`script[src="${CSS.escape(u)}"]`);
449
+ if (existing) {
450
+ return resolve();
451
+ }
452
+ const s = document.createElement("script");
453
+ s.src = u;
454
+ s.async = false;
455
+ s.defer = false;
456
+ s.onload = () => resolve();
457
+ s.onerror = () => reject(new Error(`Script konnte nicht geladen werden: ${u}`));
458
+ document.head.appendChild(s);
459
+ return;
460
+ }
461
+ resolve();
462
+ } catch (err) {
463
+ reject(err);
464
+ }
465
+ });
466
+ cache.set(u, p);
467
+ return p;
468
+ },
469
+ loadAssetsInOrder: function(assets) {
470
+ return __async(this, null, function* () {
471
+ if (!assets || !assets.length) {
472
+ return;
473
+ }
474
+ for (const a of assets) {
475
+ if (!a) {
476
+ continue;
477
+ }
478
+ if (typeof a === "string") {
479
+ yield vis.binds["jsontemplate"].loadAsset(a);
480
+ } else {
481
+ yield vis.binds["jsontemplate"].loadAsset(a.url, a.kind);
482
+ }
483
+ }
484
+ });
485
+ },
486
+ /**
487
+ * Lädt CSS und Scripts (einmalig) in definierter Reihenfolge:
488
+ * 1) CSS (Reihenfolge beibehalten, relevant für Overrides)
489
+ * 2) JS (sequentiell, relevant für Abhängigkeiten)
490
+ */
491
+ loadScriptsAndCssOnce: function(scripts, css) {
492
+ return __async(this, null, function* () {
493
+ if (Array.isArray(css) && css.length) {
494
+ const cssAssets = css.map((u) => (u || "").trim()).filter(Boolean).map((u) => ({ url: u, kind: "css" }));
495
+ yield vis.binds["jsontemplate"].loadAssetsInOrder(cssAssets);
496
+ }
497
+ if (Array.isArray(scripts) && scripts.length) {
498
+ const scriptAssets = scripts.map((u) => (u || "").trim()).filter(Boolean).map((u) => ({ url: u, kind: "js" }));
499
+ yield vis.binds["jsontemplate"].loadAssetsInOrder(scriptAssets);
500
+ }
501
+ });
502
+ },
503
+ /**
504
+ * Einmalige Initialisierung pro WidgetID + Asset-Set.
505
+ * Dadurch wird bei render()-Aufrufen (State changes) nicht erneut geladen.
506
+ * Wenn sich Assets in den Properties ändern, erzeugt der Key ein neues Init-Promise.
507
+ */
508
+ initWidgetAssetsOnce: function(widgetID, scripts, css) {
509
+ const initMap = vis.binds["jsontemplate"]._widgetInit;
510
+ const key = `${widgetID}::css=${(css || []).map((s) => String(s).trim()).filter(Boolean).join("|")}::js=${(scripts || []).map((s) => String(s).trim()).filter(Boolean).join("|")}`;
511
+ if (initMap.has(key)) {
512
+ return initMap.get(key);
513
+ }
514
+ const p = (() => __async(null, null, function* () {
515
+ yield vis.binds["jsontemplate"].loadScriptsAndCssOnce(scripts, css);
516
+ }))();
517
+ initMap.set(key, p);
518
+ return p;
396
519
  }
397
520
  };
398
521
  vis.binds["jsontemplate"].showVersion();