@iobroker/json-config 8.2.3 → 8.2.6
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.
- package/README.md +54 -11
- package/build/JsonConfigComponent/ConfigAutocomplete.js +10 -0
- package/build/JsonConfigComponent/ConfigAutocomplete.js.map +1 -1
- package/build/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +5 -0
- package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js +15 -0
- package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -1
- package/build/JsonConfigComponent/ConfigGeneric.d.ts +2 -0
- package/build/JsonConfigComponent/ConfigGeneric.js.map +1 -1
- package/build/JsonConfigComponent/ConfigPanel.js +1 -1
- package/build/JsonConfigComponent/ConfigPanel.js.map +1 -1
- package/build/JsonConfigComponent/ConfigSelect.d.ts +3 -2
- package/build/JsonConfigComponent/ConfigSelect.js +23 -5
- package/build/JsonConfigComponent/ConfigSelect.js.map +1 -1
- package/build/JsonConfigComponent/ConfigSelectSendTo.d.ts +6 -0
- package/build/JsonConfigComponent/ConfigSelectSendTo.js +20 -3
- package/build/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
- package/build/JsonConfigComponent/ConfigStaticText.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigStaticText.js +16 -3
- package/build/JsonConfigComponent/ConfigStaticText.js.map +1 -1
- package/build/JsonConfigComponent/ConfigTable.d.ts +1 -0
- package/build/JsonConfigComponent/ConfigTable.js +28 -2
- package/build/JsonConfigComponent/ConfigTable.js.map +1 -1
- package/build/JsonConfigComponent/wrapper/Components/Editor.d.ts +2 -2
- package/build/JsonConfigComponent/wrapper/Components/Editor.js +1 -2
- package/build/JsonConfigComponent/wrapper/Components/Editor.js.map +1 -1
- package/build/types.d.ts +9 -0
- package/package.json +4 -4
|
@@ -17,7 +17,7 @@ const styles = {
|
|
|
17
17
|
minHeight: 200,
|
|
18
18
|
},
|
|
19
19
|
};
|
|
20
|
-
function Editor(props) {
|
|
20
|
+
export default function Editor(props) {
|
|
21
21
|
return (React.createElement(AceEditor, { style: props.error === true ? styles.jsonError : props.error === false ? styles.jsonNoError : undefined, mode: props.mode || 'json', width: "100%", height: "100%", showPrintMargin: props.editValueMode, showGutter: props.editValueMode, highlightActiveLine: props.editValueMode, defaultValue: props.defaultValue, theme: props.themeType === 'dark' ? 'clouds_midnight' : 'chrome', value: props.value, readOnly: !props.onChange, onChange: newValue => props.onChange?.(newValue), name: props.name || 'UNIQUE_ID_OF_DIV1', fontSize: props.fontSize || 14, setOptions: {
|
|
22
22
|
enableBasicAutocompletion: true,
|
|
23
23
|
enableLiveAutocompletion: true,
|
|
@@ -26,5 +26,4 @@ function Editor(props) {
|
|
|
26
26
|
tabSize: props.editValueMode ? 2 : undefined,
|
|
27
27
|
}, editorProps: { $blockScrolling: true } }));
|
|
28
28
|
}
|
|
29
|
-
export default Editor;
|
|
30
29
|
//# sourceMappingURL=Editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.js","sourceRoot":"./src/","sources":["JsonConfigComponent/wrapper/Components/Editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,yCAAyC,CAAC;AACjD,OAAO,0CAA0C,CAAC;AAClD,OAAO,yCAAyC,CAAC;AACjD,OAAO,2CAA2C,CAAC;AACnD,OAAO,qDAAqD,CAAC;AAC7D,OAAO,4CAA4C,CAAC;AACpD,OAAO,kDAAkD,CAAC;AAE1D,MAAM,MAAM,GAAwC;IAChD,SAAS,EAAE;QACP,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,GAAG;KACjB;IACD,WAAW,EAAE;QACT,MAAM,EAAE,qBAAqB;QAC7B,SAAS,EAAE,GAAG;KACjB;CACJ,CAAC;AAcF,
|
|
1
|
+
{"version":3,"file":"Editor.js","sourceRoot":"./src/","sources":["JsonConfigComponent/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AQ,EAAE,CAAC,QAAQ,CAAC,EAChD,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,mBAAmB,EACvC,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE,EAC9B,UAAU,EAAE;YACR,yBAAyB,EAAE,IAAI;YAC/B,wBAAwB,EAAE,IAAI;YAC9B,cAAc,EAAE,IAAI;YAEpB,eAAe,EAAE,KAAK,CAAC,aAAa;YACpC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;SAC/C,EACD,WAAW,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,GACxC,CACL,CAAC;AACN,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport AceEditor from 'react-ace';\nimport 'ace-builds/src-min-noconflict/mode-json';\nimport 'ace-builds/src-min-noconflict/mode-json5';\nimport 'ace-builds/src-min-noconflict/mode-yaml';\nimport 'ace-builds/src-min-noconflict/worker-json';\nimport 'ace-builds/src-min-noconflict/theme-clouds_midnight';\nimport 'ace-builds/src-min-noconflict/theme-chrome';\nimport 'ace-builds/src-min-noconflict/ext-language_tools';\n\nconst styles: Record<string, React.CSSProperties> = {\n jsonError: {\n border: '1px solid red',\n minHeight: 200,\n },\n jsonNoError: {\n border: '1px solid #00000000',\n minHeight: 200,\n },\n};\n\ninterface EditorProps {\n fontSize?: number;\n value?: string;\n defaultValue?: string;\n mode?: 'json' | 'css' | 'html' | 'json5' | 'yaml';\n name: string;\n onChange?: (newValue: string) => void;\n themeType: string;\n editValueMode?: boolean; // flag that indicates the \"value edit mode\"\n error?: boolean;\n}\n\nexport default function Editor(props: EditorProps): JSX.Element {\n return (\n <AceEditor\n style={props.error === true ? styles.jsonError : props.error === false ? styles.jsonNoError : undefined}\n mode={props.mode || 'json'}\n width=\"100%\"\n height=\"100%\"\n showPrintMargin={props.editValueMode}\n showGutter={props.editValueMode}\n highlightActiveLine={props.editValueMode}\n defaultValue={props.defaultValue}\n theme={props.themeType === 'dark' ? 'clouds_midnight' : 'chrome'}\n value={props.value}\n readOnly={!props.onChange}\n onChange={newValue => props.onChange?.(newValue)}\n name={props.name || 'UNIQUE_ID_OF_DIV1'}\n fontSize={props.fontSize || 14}\n setOptions={{\n enableBasicAutocompletion: true,\n enableLiveAutocompletion: true,\n enableSnippets: true,\n\n showLineNumbers: props.editValueMode,\n tabSize: props.editValueMode ? 2 : undefined,\n }}\n editorProps={{ $blockScrolling: true }}\n />\n );\n}\n"]}
|
package/build/types.d.ts
CHANGED
|
@@ -255,6 +255,8 @@ export interface ConfigItemSelectOption {
|
|
|
255
255
|
color?: string;
|
|
256
256
|
/** Formula or boolean value to show or hide the option */
|
|
257
257
|
hidden?: string | boolean;
|
|
258
|
+
/** Description for the value */
|
|
259
|
+
description?: ioBroker.StringOrTranslated;
|
|
258
260
|
}
|
|
259
261
|
|
|
260
262
|
export interface ConfigItemPanel extends ConfigItem {
|
|
@@ -273,6 +275,8 @@ export interface ConfigItemPanel extends ConfigItem {
|
|
|
273
275
|
i18n?: boolean | string | Record<string, Record<ioBroker.Languages, string>>;
|
|
274
276
|
// If defined, the tab will send a message by initializing to backend with command with string contained in "command"
|
|
275
277
|
command?: string;
|
|
278
|
+
/** Filter states for custom editor dialog. If true, only states of this adapter instance can be edited. If string, it is a regex to filter state IDs. */
|
|
279
|
+
statesFilter?: true | string;
|
|
276
280
|
}
|
|
277
281
|
|
|
278
282
|
export interface ConfigItemPattern extends ConfigItem {
|
|
@@ -301,6 +305,8 @@ export interface ConfigItemTabs extends ConfigItem {
|
|
|
301
305
|
i18n?: boolean | string | Record<string, Record<ioBroker.Languages, string>>;
|
|
302
306
|
// If defined, the tab will send a message by initializing to backend with command "tab" (string contained in "sendTo"). Used in jsonTab.json
|
|
303
307
|
command?: string;
|
|
308
|
+
/** Filter states for custom editor dialog. If true, only states of this adapter instance can be edited. If string, it is a regex to filter state IDs. */
|
|
309
|
+
statesFilter?: true | string;
|
|
304
310
|
}
|
|
305
311
|
|
|
306
312
|
export interface ConfigItemText extends ConfigItem {
|
|
@@ -514,6 +520,8 @@ export interface ConfigItemStaticText extends Omit<ConfigItem, 'button'> {
|
|
|
514
520
|
icon?: ConfigIconType;
|
|
515
521
|
/** styles for the button */
|
|
516
522
|
controlStyle?: CustomCSSProperties;
|
|
523
|
+
/** Show text as HTML, text or pretty-printed JSON */
|
|
524
|
+
format?: 'text' | 'html' | 'json';
|
|
517
525
|
}
|
|
518
526
|
|
|
519
527
|
export interface ConfigItemStaticInfo extends Omit<ConfigItem, 'data'> {
|
|
@@ -592,6 +600,7 @@ export interface ConfigItemSelect extends ConfigItem {
|
|
|
592
600
|
value?: number | string;
|
|
593
601
|
color?: string;
|
|
594
602
|
hidden?: string | boolean;
|
|
603
|
+
description?: ioBroker.StringOrTranslated;
|
|
595
604
|
}
|
|
596
605
|
)[];
|
|
597
606
|
attr?: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/json-config",
|
|
3
3
|
"description": "This package contains the ioBroker JSON config UI components",
|
|
4
|
-
"version": "8.2.
|
|
4
|
+
"version": "8.2.6",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "bluefox",
|
|
7
7
|
"email": "dogafox@gmail.com"
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@iobroker/adapter-react-v5": "^8.1.
|
|
39
|
-
"@module-federation/runtime": "^2.0
|
|
38
|
+
"@iobroker/adapter-react-v5": "^8.1.3",
|
|
39
|
+
"@module-federation/runtime": "^2.1.0",
|
|
40
40
|
"@mui/x-date-pickers": "^7.29.4",
|
|
41
41
|
"crypto-js": "^4.2.0",
|
|
42
42
|
"json5": "^2.2.3",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@iobroker/eslint-config": "^2.2.0",
|
|
52
52
|
"@types/crypto-js": "^4.2.2",
|
|
53
53
|
"@types/json5": "^2.2.0",
|
|
54
|
-
"@types/node": "^25.
|
|
54
|
+
"@types/node": "^25.4.0",
|
|
55
55
|
"@types/react": "^18.3.28",
|
|
56
56
|
"@types/react-color": "^3.0.13",
|
|
57
57
|
"@types/react-dom": "^18.3.7",
|