@iobroker/json-config 7.2.6 → 7.3.1

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 (127) hide show
  1. package/README.md +1402 -0
  2. package/build/JsonConfig.js +2 -2
  3. package/build/JsonConfig.js.map +1 -1
  4. package/build/JsonConfigComponent/ChipInput.js +3 -4
  5. package/build/JsonConfigComponent/ChipInput.js.map +1 -1
  6. package/build/JsonConfigComponent/ConfigAccordion.js +2 -2
  7. package/build/JsonConfigComponent/ConfigAccordion.js.map +1 -1
  8. package/build/JsonConfigComponent/ConfigAlive.js +2 -2
  9. package/build/JsonConfigComponent/ConfigAlive.js.map +1 -1
  10. package/build/JsonConfigComponent/ConfigAutocomplete.js +2 -2
  11. package/build/JsonConfigComponent/ConfigAutocomplete.js.map +1 -1
  12. package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js +2 -2
  13. package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -1
  14. package/build/JsonConfigComponent/ConfigCRON.js +2 -2
  15. package/build/JsonConfigComponent/ConfigCRON.js.map +1 -1
  16. package/build/JsonConfigComponent/ConfigCertCollection.js +2 -2
  17. package/build/JsonConfigComponent/ConfigCertCollection.js.map +1 -1
  18. package/build/JsonConfigComponent/ConfigCertificateSelect.js +2 -2
  19. package/build/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -1
  20. package/build/JsonConfigComponent/ConfigCertificates.js +2 -2
  21. package/build/JsonConfigComponent/ConfigCertificates.js.map +1 -1
  22. package/build/JsonConfigComponent/ConfigCheckLicense.js +2 -2
  23. package/build/JsonConfigComponent/ConfigCheckLicense.js.map +1 -1
  24. package/build/JsonConfigComponent/ConfigCheckbox.js +2 -2
  25. package/build/JsonConfigComponent/ConfigCheckbox.js.map +1 -1
  26. package/build/JsonConfigComponent/ConfigChip.js +2 -2
  27. package/build/JsonConfigComponent/ConfigChip.js.map +1 -1
  28. package/build/JsonConfigComponent/ConfigColor.js +2 -2
  29. package/build/JsonConfigComponent/ConfigColor.js.map +1 -1
  30. package/build/JsonConfigComponent/ConfigCoordinates.js +2 -2
  31. package/build/JsonConfigComponent/ConfigCoordinates.js.map +1 -1
  32. package/build/JsonConfigComponent/ConfigCustom.js +2 -2
  33. package/build/JsonConfigComponent/ConfigCustom.js.map +1 -1
  34. package/build/JsonConfigComponent/ConfigDatePicker.js +2 -2
  35. package/build/JsonConfigComponent/ConfigDatePicker.js.map +1 -1
  36. package/build/JsonConfigComponent/ConfigDeviceManager.js +2 -2
  37. package/build/JsonConfigComponent/ConfigDeviceManager.js.map +1 -1
  38. package/build/JsonConfigComponent/ConfigFile.js +2 -2
  39. package/build/JsonConfigComponent/ConfigFile.js.map +1 -1
  40. package/build/JsonConfigComponent/ConfigFileSelector.js +3 -3
  41. package/build/JsonConfigComponent/ConfigFileSelector.js.map +1 -1
  42. package/build/JsonConfigComponent/ConfigFunc.js +2 -2
  43. package/build/JsonConfigComponent/ConfigFunc.js.map +1 -1
  44. package/build/JsonConfigComponent/ConfigGeneric.js +2 -2
  45. package/build/JsonConfigComponent/ConfigGeneric.js.map +1 -1
  46. package/build/JsonConfigComponent/ConfigIP.js +2 -2
  47. package/build/JsonConfigComponent/ConfigIP.js.map +1 -1
  48. package/build/JsonConfigComponent/ConfigImageSendTo.js +2 -2
  49. package/build/JsonConfigComponent/ConfigImageSendTo.js.map +1 -1
  50. package/build/JsonConfigComponent/ConfigImageUpload.js +2 -2
  51. package/build/JsonConfigComponent/ConfigImageUpload.js.map +1 -1
  52. package/build/JsonConfigComponent/ConfigInstanceSelect.js +2 -2
  53. package/build/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -1
  54. package/build/JsonConfigComponent/ConfigInterface.js +2 -2
  55. package/build/JsonConfigComponent/ConfigInterface.js.map +1 -1
  56. package/build/JsonConfigComponent/ConfigJsonEditor.js +2 -2
  57. package/build/JsonConfigComponent/ConfigJsonEditor.js.map +1 -1
  58. package/build/JsonConfigComponent/ConfigLanguage.js +2 -2
  59. package/build/JsonConfigComponent/ConfigLanguage.js.map +1 -1
  60. package/build/JsonConfigComponent/ConfigLicense.js +2 -2
  61. package/build/JsonConfigComponent/ConfigLicense.js.map +1 -1
  62. package/build/JsonConfigComponent/ConfigNumber.js +2 -2
  63. package/build/JsonConfigComponent/ConfigNumber.js.map +1 -1
  64. package/build/JsonConfigComponent/ConfigObjectId.js +2 -2
  65. package/build/JsonConfigComponent/ConfigObjectId.js.map +1 -1
  66. package/build/JsonConfigComponent/ConfigPanel.js +4 -4
  67. package/build/JsonConfigComponent/ConfigPanel.js.map +1 -1
  68. package/build/JsonConfigComponent/ConfigPassword.js +6 -14
  69. package/build/JsonConfigComponent/ConfigPassword.js.map +1 -1
  70. package/build/JsonConfigComponent/ConfigPattern.js +2 -2
  71. package/build/JsonConfigComponent/ConfigPattern.js.map +1 -1
  72. package/build/JsonConfigComponent/ConfigPort.js +2 -2
  73. package/build/JsonConfigComponent/ConfigPort.js.map +1 -1
  74. package/build/JsonConfigComponent/ConfigQrCode.js +2 -2
  75. package/build/JsonConfigComponent/ConfigQrCode.js.map +1 -1
  76. package/build/JsonConfigComponent/ConfigRoom.js +2 -2
  77. package/build/JsonConfigComponent/ConfigRoom.js.map +1 -1
  78. package/build/JsonConfigComponent/ConfigSelect.js +2 -2
  79. package/build/JsonConfigComponent/ConfigSelect.js.map +1 -1
  80. package/build/JsonConfigComponent/ConfigSelectSendTo.js +2 -2
  81. package/build/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
  82. package/build/JsonConfigComponent/ConfigSendto.js +2 -2
  83. package/build/JsonConfigComponent/ConfigSendto.js.map +1 -1
  84. package/build/JsonConfigComponent/ConfigSetState.js +2 -2
  85. package/build/JsonConfigComponent/ConfigSetState.js.map +1 -1
  86. package/build/JsonConfigComponent/ConfigSlider.js +2 -2
  87. package/build/JsonConfigComponent/ConfigSlider.js.map +1 -1
  88. package/build/JsonConfigComponent/ConfigState.js +2 -2
  89. package/build/JsonConfigComponent/ConfigState.js.map +1 -1
  90. package/build/JsonConfigComponent/ConfigStaticDivider.js +2 -3
  91. package/build/JsonConfigComponent/ConfigStaticDivider.js.map +1 -1
  92. package/build/JsonConfigComponent/ConfigStaticHeader.js +2 -2
  93. package/build/JsonConfigComponent/ConfigStaticHeader.js.map +1 -1
  94. package/build/JsonConfigComponent/ConfigStaticImage.js +2 -2
  95. package/build/JsonConfigComponent/ConfigStaticImage.js.map +1 -1
  96. package/build/JsonConfigComponent/ConfigStaticText.js +2 -2
  97. package/build/JsonConfigComponent/ConfigStaticText.js.map +1 -1
  98. package/build/JsonConfigComponent/ConfigTable.d.ts +1 -1
  99. package/build/JsonConfigComponent/ConfigTable.js +2 -2
  100. package/build/JsonConfigComponent/ConfigTable.js.map +1 -1
  101. package/build/JsonConfigComponent/ConfigTabs.js +2 -2
  102. package/build/JsonConfigComponent/ConfigTabs.js.map +1 -1
  103. package/build/JsonConfigComponent/ConfigText.js +2 -2
  104. package/build/JsonConfigComponent/ConfigText.js.map +1 -1
  105. package/build/JsonConfigComponent/ConfigTextSendTo.js +2 -2
  106. package/build/JsonConfigComponent/ConfigTextSendTo.js.map +1 -1
  107. package/build/JsonConfigComponent/ConfigTimePicker.js +2 -2
  108. package/build/JsonConfigComponent/ConfigTimePicker.js.map +1 -1
  109. package/build/JsonConfigComponent/ConfigTopic.js +2 -2
  110. package/build/JsonConfigComponent/ConfigTopic.js.map +1 -1
  111. package/build/JsonConfigComponent/ConfigUUID.js +2 -2
  112. package/build/JsonConfigComponent/ConfigUUID.js.map +1 -1
  113. package/build/JsonConfigComponent/ConfigUser.js +2 -2
  114. package/build/JsonConfigComponent/ConfigUser.js.map +1 -1
  115. package/build/JsonConfigComponent/Icons.js +1 -1
  116. package/build/JsonConfigComponent/Icons.js.map +1 -1
  117. package/build/JsonConfigComponent/index.js +0 -1
  118. package/build/JsonConfigComponent/index.js.map +1 -1
  119. package/build/JsonConfigComponent/wrapper/Components/CustomModal.js.map +1 -1
  120. package/build/JsonConfigComponent/wrapper/Components/Editor.js +1 -1
  121. package/build/JsonConfigComponent/wrapper/Components/Editor.js.map +1 -1
  122. package/build/Utils.d.ts +1 -1
  123. package/build/Utils.js.map +1 -1
  124. package/build/index.d.ts +2 -2
  125. package/build/index.js.map +1 -1
  126. package/build/types.d.ts +3 -3
  127. package/package.json +5 -13
@@ -1,6 +1,6 @@
1
- import React, {} from 'react';
1
+ import React from 'react';
2
2
  import { Box } from '@mui/material';
3
- import ConfigGeneric, {} from './ConfigGeneric';
3
+ import ConfigGeneric from './ConfigGeneric';
4
4
  const styles = {
5
5
  header: (theme) => ({
6
6
  width: '100%',
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigStaticHeader.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAKpC,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAElG,MAAM,MAAM,GAAwB;IAChC,MAAM,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC;QAC1B,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;QACtC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY;QACzC,OAAO,EAAE,gBAAgB;QACzB,YAAY,EAAE,KAAK;QACnB,cAAc,EAAE,CAAC;QACjB,gBAAgB,EAAE,CAAC;KACtB,CAAC;CACL,CAAC;AAMF,MAAM,kBAAmB,SAAQ,aAA4D;IACzF,UAAU,EAAC,oDAAoD;QAC3D,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;YAC/C,KAAK,GAAG;gBACJ,OAAO,CACH,oBAAC,GAAG,IACA,SAAS,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;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box } from '@mui/material';\n\nimport type { IobTheme } from '@iobroker/adapter-react-v5';\n\nimport type { ConfigItemStaticHeader } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nconst styles: Record<string, any> = {\n header: (theme: IobTheme) => ({\n width: '100%',\n background: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n padding: '4px !important',\n borderRadius: '3px',\n marginBlockEnd: 0,\n marginBlockStart: 0,\n }),\n};\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticHeader;\n}\n\nclass ConfigStaticHeader extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(/* error: string, disabled: boolean, defaultValue */): JSX.Element {\n switch ((this.props.schema.size || 5).toString()) {\n case '1':\n return (\n <Box\n component=\"h1\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '2':\n return (\n <Box\n component=\"h2\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '3':\n return (\n <Box\n component=\"h3\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '4':\n return (\n <Box\n component=\"h4\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '5':\n default:\n return (\n <Box\n component=\"h5\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n }\n }\n}\n\nexport default ConfigStaticHeader;\n"]}
1
+ {"version":3,"file":"ConfigStaticHeader.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE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AI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CACpE,CACT,CAAC;YAEN,KAAK,GAAG;gBACJ,OAAO,CACH,oBAAC,GAAG,IACA,SAAS,EAAC,IAAI,EACd,EAAE,EAAE,MAAM,CAAC,MAAM,IAEhB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CACpE,CACT,CAAC;YAEN,KAAK,GAAG,CAAC;YACT;gBACI,OAAO,CACH,oBAAC,GAAG,IACA,SAAS,EAAC,IAAI,EACd,EAAE,EAAE,MAAM,CAAC,MAAM,IAEhB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CACpE,CACT,CAAC;SACT;IACL,CAAC;CACJ;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box } from '@mui/material';\n\nimport type { IobTheme } from '@iobroker/adapter-react-v5';\n\nimport type { ConfigItemStaticHeader } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nconst styles: Record<string, any> = {\n header: (theme: IobTheme) => ({\n width: '100%',\n background: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n padding: '4px !important',\n borderRadius: '3px',\n marginBlockEnd: 0,\n marginBlockStart: 0,\n }),\n};\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticHeader;\n}\n\nclass ConfigStaticHeader extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(/* error: string, disabled: boolean, defaultValue */): JSX.Element {\n switch ((this.props.schema.size || 5).toString()) {\n case '1':\n return (\n <Box\n component=\"h1\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '2':\n return (\n <Box\n component=\"h2\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '3':\n return (\n <Box\n component=\"h3\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '4':\n return (\n <Box\n component=\"h4\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '5':\n default:\n return (\n <Box\n component=\"h5\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n }\n }\n}\n\nexport default ConfigStaticHeader;\n"]}
@@ -1,5 +1,5 @@
1
- import React, {} from 'react';
2
- import ConfigGeneric, {} from './ConfigGeneric';
1
+ import React from 'react';
2
+ import ConfigGeneric from './ConfigGeneric';
3
3
  class ConfigStaticImage extends ConfigGeneric {
4
4
  renderItem( /* error: string, disabled: boolean, defaultValue */) {
5
5
  let src = this.props.schema.src;
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigStaticImage.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAGxC,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAMlG,MAAM,iBAAkB,SAAQ,aAA4D;IACxF,UAAU,EAAC,oDAAoD;QAC3D,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;QAChC,IACI,GAAG;YACH,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;YACpB,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC;YACvB,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC;YACrD,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,EACzD,CAAC;YACC,GAAG,GAAG,WAAW,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,GAAG,EAAE,CAAC;QACrD,CAAC;QAED,OAAO,CACH,6BACI,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAChG,OAAO,EACH,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;gBAClB,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC;gBAC/E,CAAC,CAAC,IAAI,EAEd,GAAG,EAAC,EAAE,GACR,CACL,CAAC;IACN,CAAC;CACJ;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport type { ConfigItemStaticImage } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticImage;\n}\n\nclass ConfigStaticImage extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(/* error: string, disabled: boolean, defaultValue */): JSX.Element {\n let src = this.props.schema.src;\n if (\n src &&\n !src.startsWith('.') &&\n !src.startsWith('http') &&\n !src.startsWith(`adapter/${this.props.adapterName}/`) &&\n !src.startsWith(`./adapter/${this.props.adapterName}/`)\n ) {\n src = `adapter/${this.props.adapterName}/${src}`;\n }\n\n return (\n <img\n src={src}\n style={{ cursor: this.props.schema.href ? 'pointer' : undefined, width: '100%', height: '100%' }}\n onClick={\n this.props.schema.href\n ? () => this.props.schema.href && window.open(this.props.schema.href, '_blank')\n : null\n }\n alt=\"\"\n />\n );\n }\n}\n\nexport default ConfigStaticImage;\n"]}
1
+ {"version":3,"file":"ConfigStaticImage.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,aAAmE,MAAM,iBAAiB,CAAC;AAMlG,MAAM,iBAAkB,SAAQ,aAA4D;IACxF,UAAU,EAAC,oDAAoD;QAC3D,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;QAChC,IACI,GAAG;YACH,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;YACpB,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC;YACvB,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC;YACrD,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,EACzD;YACE,GAAG,GAAG,WAAW,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,GAAG,EAAE,CAAC;SACpD;QAED,OAAO,CACH,6BACI,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAChG,OAAO,EACH,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;gBAClB,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC;gBAC/E,CAAC,CAAC,IAAI,EAEd,GAAG,EAAC,EAAE,GACR,CACL,CAAC;IACN,CAAC;CACJ;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport type { ConfigItemStaticImage } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticImage;\n}\n\nclass ConfigStaticImage extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(/* error: string, disabled: boolean, defaultValue */): JSX.Element {\n let src = this.props.schema.src;\n if (\n src &&\n !src.startsWith('.') &&\n !src.startsWith('http') &&\n !src.startsWith(`adapter/${this.props.adapterName}/`) &&\n !src.startsWith(`./adapter/${this.props.adapterName}/`)\n ) {\n src = `adapter/${this.props.adapterName}/${src}`;\n }\n\n return (\n <img\n src={src}\n style={{ cursor: this.props.schema.href ? 'pointer' : undefined, width: '100%', height: '100%' }}\n onClick={\n this.props.schema.href\n ? () => this.props.schema.href && window.open(this.props.schema.href, '_blank')\n : null\n }\n alt=\"\"\n />\n );\n }\n}\n\nexport default ConfigStaticImage;\n"]}
@@ -1,7 +1,7 @@
1
- import React, {} from 'react';
1
+ import React from 'react';
2
2
  import { Box, Button } from '@mui/material';
3
3
  import { Utils } from '@iobroker/adapter-react-v5';
4
- import ConfigGeneric, {} from './ConfigGeneric';
4
+ import ConfigGeneric from './ConfigGeneric';
5
5
  const styles = {
6
6
  fullWidth: {
7
7
  height: '100%',
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigStaticText.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,e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pD,OAAO,EACH,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;gBAClB,CAAC,CAAC,GAAG,EAAE;oBACD,2CAA2C;oBAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;oBACxF,IAAI,IAAI,EAAE,CAAC;wBACP,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;4BAC9B,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC;gCACxB,OAAO,EAAE,MAAM;gCACf,GAAG,EAAE,IAAI;gCACT,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,QAAQ;gCAC5C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;6BACjC,CAAC,CAAC;wBACP,CAAC;6BAAM,CAAC;4BACJ,MAAM,CACF,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,QAAQ,EACpC,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CACrD,CAAC;wBACN,CAAC;oBACL,CAAC;gBACL,CAAC;gBACH,CAAC,CAAC,IAAI,IAGb,IAAI,CACH,CACT,CAAC;IACN,CAAC;CACJ;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box, Button } from '@mui/material';\n\nimport { type IobTheme, Utils } from '@iobroker/adapter-react-v5';\n\nimport type { ConfigItemStaticText } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nconst styles: Record<string, any> = {\n fullWidth: {\n height: '100%',\n width: '100%',\n },\n link: (theme: IobTheme) => ({\n textDecoration: 'underline',\n color: theme.palette.mode === 'dark' ? '#4dabf5' : '#254e72',\n cursor: 'pointer',\n }),\n};\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nfunction onLink(href: string, target: '_blank' | '_self' | string, instanceId: string): void {\n let _target;\n let url = '';\n if (!href) {\n url = `#tab-instances/config/${instanceId}`;\n _target = target || '_self';\n } else if (href.toString().startsWith('#')) {\n _target = target || '_self';\n url = href;\n } else if (href.toString().startsWith('/')) {\n _target = target || '_self';\n url = href;\n } else if (href.startsWith('http://') || href.startsWith('https://')) {\n _target = target || '_blank';\n url = href;\n } else {\n url = `#tab-instances/config/${instanceId}/${href}`;\n _target = target || '_self';\n }\n if (_target === '_self') {\n // close dialog\n setTimeout(\n (_url: string) => {\n if (_url.startsWith('#')) {\n window.location.hash = _url;\n } else if (_url.startsWith('/')) {\n url = `${window.location.protocol}:${window.location.host}${url}`;\n } else if (_url.startsWith('http://') || _url.startsWith('https://')) {\n window.location.href = _url;\n }\n },\n 100,\n url,\n );\n } else {\n if (url.startsWith('#')) {\n url = `${window.location.protocol}:${window.location.host}${window.location.pathname}${url}`;\n } else if (url.startsWith('/')) {\n url = `${window.location.protocol}:${window.location.host}${url}`;\n }\n\n window.open(url, _target);\n }\n}\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticText;\n}\n\nclass ConfigStaticText extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(_error: string, disabled: boolean /* , defaultValue */): JSX.Element {\n if (this.props.schema.button) {\n const icon = this.getIcon();\n return (\n <Button\n variant={this.props.schema.variant || undefined}\n color={this.props.schema.color || 'grey'}\n style={{ ...styles.fullWidth, ...(this.props.schema.controlStyle || undefined) }}\n disabled={disabled}\n startIcon={icon}\n onClick={\n this.props.schema.href\n ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href\n ? this.getText(this.props.schema.href, true)\n : null;\n if (href) {\n if (this.props.onBackEndCommand) {\n this.props.onBackEndCommand({\n command: 'link',\n url: href,\n target: this.props.schema.target,\n close: this.props.schema.close,\n });\n } else {\n onLink(\n href,\n this.props.schema.target,\n `${this.props.adapterName}.${this.props.instance}`,\n );\n }\n }\n }\n : null\n }\n >\n {this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation)}\n </Button>\n );\n }\n let text: string | JSX.Element | JSX.Element[] = this.getText(\n this.props.schema.text || this.props.schema.label,\n this.props.schema.noTranslation,\n );\n if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {\n text = Utils.renderTextWithA(text);\n }\n\n return (\n <Box\n component=\"span\"\n style={{ ...(this.props.schema.controlStyle || undefined) }}\n sx={this.props.schema.href ? styles.link : undefined}\n onClick={\n this.props.schema.href\n ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n if (href) {\n if (this.props.onBackEndCommand) {\n this.props.onBackEndCommand({\n command: 'link',\n url: href,\n target: this.props.schema.target || '_blank',\n close: this.props.schema.close,\n });\n } else {\n onLink(\n href,\n this.props.schema.target || '_blank',\n `${this.props.adapterName}.${this.props.instance}`,\n );\n }\n }\n }\n : null\n }\n >\n {text}\n </Box>\n );\n }\n}\n\nexport default ConfigStaticText;\n"]}
1
+ {"version":3,"file":"ConfigStaticText.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAiB,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,aAAmE,MAAM,iBAAiB,CAAC;AAElG,MAAM,MAAM,GAAwB;IAChC,SAAS,EAAE;QACP,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KAChB;IACD,IAAI,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC;QAC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IAAI;gCACT,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,QAAQ;gCAC5C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;6BACjC,CAAC,CAAC;yBACN;6BAAM;4BACH,MAAM,CACF,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,QAAQ,EACpC,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CACrD,CAAC;yBACL;qBACJ;gBACL,CAAC;gBACH,CAAC,CAAC,IAAI,IAGb,IAAI,CACH,CACT,CAAC;IACN,CAAC;CACJ;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box, Button } from '@mui/material';\n\nimport { type IobTheme, Utils } from '@iobroker/adapter-react-v5';\n\nimport type { ConfigItemStaticText } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nconst styles: Record<string, any> = {\n fullWidth: {\n height: '100%',\n width: '100%',\n },\n link: (theme: IobTheme) => ({\n textDecoration: 'underline',\n color: theme.palette.mode === 'dark' ? '#4dabf5' : '#254e72',\n cursor: 'pointer',\n }),\n};\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nfunction onLink(href: string, target: '_blank' | '_self' | string, instanceId: string): void {\n let _target;\n let url = '';\n if (!href) {\n url = `#tab-instances/config/${instanceId}`;\n _target = target || '_self';\n } else if (href.toString().startsWith('#')) {\n _target = target || '_self';\n url = href;\n } else if (href.toString().startsWith('/')) {\n _target = target || '_self';\n url = href;\n } else if (href.startsWith('http://') || href.startsWith('https://')) {\n _target = target || '_blank';\n url = href;\n } else {\n url = `#tab-instances/config/${instanceId}/${href}`;\n _target = target || '_self';\n }\n if (_target === '_self') {\n // close dialog\n setTimeout(\n (_url: string) => {\n if (_url.startsWith('#')) {\n window.location.hash = _url;\n } else if (_url.startsWith('/')) {\n url = `${window.location.protocol}:${window.location.host}${url}`;\n } else if (_url.startsWith('http://') || _url.startsWith('https://')) {\n window.location.href = _url;\n }\n },\n 100,\n url,\n );\n } else {\n if (url.startsWith('#')) {\n url = `${window.location.protocol}:${window.location.host}${window.location.pathname}${url}`;\n } else if (url.startsWith('/')) {\n url = `${window.location.protocol}:${window.location.host}${url}`;\n }\n\n window.open(url, _target);\n }\n}\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticText;\n}\n\nclass ConfigStaticText extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(_error: string, disabled: boolean /* , defaultValue */): JSX.Element {\n if (this.props.schema.button) {\n const icon = this.getIcon();\n return (\n <Button\n variant={this.props.schema.variant || undefined}\n color={this.props.schema.color || 'grey'}\n style={{ ...styles.fullWidth, ...(this.props.schema.controlStyle || undefined) }}\n disabled={disabled}\n startIcon={icon}\n onClick={\n this.props.schema.href\n ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href\n ? this.getText(this.props.schema.href, true)\n : null;\n if (href) {\n if (this.props.onBackEndCommand) {\n this.props.onBackEndCommand({\n command: 'link',\n url: href,\n target: this.props.schema.target,\n close: this.props.schema.close,\n });\n } else {\n onLink(\n href,\n this.props.schema.target,\n `${this.props.adapterName}.${this.props.instance}`,\n );\n }\n }\n }\n : null\n }\n >\n {this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation)}\n </Button>\n );\n }\n let text: string | JSX.Element | JSX.Element[] = this.getText(\n this.props.schema.text || this.props.schema.label,\n this.props.schema.noTranslation,\n );\n if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {\n text = Utils.renderTextWithA(text);\n }\n\n return (\n <Box\n component=\"span\"\n style={{ ...(this.props.schema.controlStyle || undefined) }}\n sx={this.props.schema.href ? styles.link : undefined}\n onClick={\n this.props.schema.href\n ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n if (href) {\n if (this.props.onBackEndCommand) {\n this.props.onBackEndCommand({\n command: 'link',\n url: href,\n target: this.props.schema.target || '_blank',\n close: this.props.schema.close,\n });\n } else {\n onLink(\n href,\n this.props.schema.target || '_blank',\n `${this.props.adapterName}.${this.props.instance}`,\n );\n }\n }\n }\n : null\n }\n >\n {text}\n </Box>\n );\n }\n}\n\nexport default ConfigStaticText;\n"]}
@@ -39,7 +39,7 @@ declare class ConfigTable extends ConfigGeneric<ConfigTableProps, ConfigTableSta
39
39
  static getFilterValue(el: React.RefObject<HTMLInputElement>): string;
40
40
  static setFilterValue(el: React.RefObject<HTMLInputElement>, filterValue: string): string;
41
41
  handleRequestSort: (property: string, orderCheck?: boolean) => void;
42
- stableSort: (order: "desc" | "asc", orderBy: string) => Record<string, any>[];
42
+ stableSort: (order: 'desc' | 'asc', orderBy: string) => Record<string, any>[];
43
43
  enhancedTableHead(buttonsWidth: number, doAnyFilterSet: boolean): JSX.Element;
44
44
  onDelete: (index: number) => () => void;
45
45
  onExport(): void;
@@ -3,7 +3,7 @@ import Dropzone from 'react-dropzone';
3
3
  import { Button, Dialog, DialogActions, DialogContent, DialogTitle, IconButton, InputAdornment, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TableSortLabel, TextField, Toolbar, Tooltip, Typography, FormHelperText, } from '@mui/material';
4
4
  import { Add as AddIcon, Delete as DeleteIcon, Close as CloseIcon, ArrowUpward as UpIcon, ArrowDownward as DownIcon, FilterAlt as IconFilterOn, FilterAltOff as IconFilterOff, ContentCopy as CopyContentIcon, Download as ExportIcon, Warning as ErrorIcon, UploadFile as ImportIcon, Close as IconClose, } from '@mui/icons-material';
5
5
  import { I18n } from '@iobroker/adapter-react-v5';
6
- import ConfigGeneric, {} from './ConfigGeneric';
6
+ import ConfigGeneric from './ConfigGeneric';
7
7
  import ConfigPanel from './ConfigPanel';
8
8
  const MAX_SIZE = 1024 * 1024; // 1MB
9
9
  const styles = {
@@ -403,7 +403,7 @@ class ConfigTable extends ConfigGeneric {
403
403
  onDelete = (index) => () => {
404
404
  const newValue = JSON.parse(JSON.stringify(this.state.value));
405
405
  newValue.splice(index, 1);
406
- this.setState({ value: newValue, iteration: this.state.iteration + 10_000 }, () => this.applyFilter(false, null, () => this.onChangeWrapper(newValue)));
406
+ this.setState({ value: newValue, iteration: this.state.iteration + 10000 }, () => this.applyFilter(false, null, () => this.onChangeWrapper(newValue)));
407
407
  };
408
408
  onExport() {
409
409
  const { schema } = this.props;