@iobroker/adapter-react-v5 7.5.1 → 7.6.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 (91) hide show
  1. package/LICENSE +22 -22
  2. package/build/AdminConnection.js.map +1 -1
  3. package/build/Components/404.js +13 -13
  4. package/build/Components/404.js.map +1 -1
  5. package/build/Components/ColorPicker.js.map +1 -1
  6. package/build/Components/CopyToClipboard.js.map +1 -1
  7. package/build/Components/CustomModal.js.map +1 -1
  8. package/build/Components/FileViewer.js.map +1 -1
  9. package/build/Components/Icon.js.map +1 -1
  10. package/build/Components/IconPicker.js.map +1 -1
  11. package/build/Components/IconSelector.js.map +1 -1
  12. package/build/Components/IobUri.js.map +1 -1
  13. package/build/Components/Loader.js +223 -223
  14. package/build/Components/Loader.js.map +1 -1
  15. package/build/Components/Loaders/MV.js.map +1 -1
  16. package/build/Components/Loaders/PT.js +103 -103
  17. package/build/Components/Loaders/PT.js.map +1 -1
  18. package/build/Components/Loaders/Vendor.js +7 -7
  19. package/build/Components/Loaders/Vendor.js.map +1 -1
  20. package/build/Components/MDUtils.js.map +1 -1
  21. package/build/Components/ObjectBrowser.js +1 -1
  22. package/build/Components/ObjectBrowser.js.map +1 -1
  23. package/build/Components/Router.js.map +1 -1
  24. package/build/Components/SaveCloseButtons.js.map +1 -1
  25. package/build/Components/SimpleCron/cronText.js.map +1 -1
  26. package/build/Components/SimpleCron/index.js.map +1 -1
  27. package/build/Components/TabContainer.js.map +1 -1
  28. package/build/Components/TabContent.js.map +1 -1
  29. package/build/Components/TabHeader.js.map +1 -1
  30. package/build/Components/TableResize.js.map +1 -1
  31. package/build/Components/TextWithIcon.js.map +1 -1
  32. package/build/Components/ToggleThemeMenu.js.map +1 -1
  33. package/build/Components/TreeTable.js.map +1 -1
  34. package/build/Components/UploadImage.js +305 -305
  35. package/build/Components/UploadImage.js.map +1 -1
  36. package/build/Components/withWidth.js.map +1 -1
  37. package/build/Connection.js.map +1 -1
  38. package/build/Dialogs/ComplexCron.js.map +1 -1
  39. package/build/Dialogs/Confirm.js.map +1 -1
  40. package/build/Dialogs/Cron.js.map +1 -1
  41. package/build/Dialogs/Error.js.map +1 -1
  42. package/build/Dialogs/Message.js.map +1 -1
  43. package/build/Dialogs/SelectFile.js.map +1 -1
  44. package/build/Dialogs/SimpleCron.js.map +1 -1
  45. package/build/Dialogs/TextInput.d.ts +1 -1
  46. package/build/Dialogs/TextInput.js.map +1 -1
  47. package/build/Prompt.js +7 -7
  48. package/build/Prompt.js.map +1 -1
  49. package/build/assets/devices/parseNames.js.map +1 -1
  50. package/build/assets/devices.json +1 -1
  51. package/build/assets/lamp_ceiling.svg +8 -8
  52. package/build/assets/lamp_table.svg +7 -7
  53. package/build/assets/no_icon.svg +9 -9
  54. package/build/assets/rooms/parseNames.js.map +1 -1
  55. package/build/assets/rooms.json +1 -1
  56. package/build/dictionary.js.map +1 -1
  57. package/build/i18n.js.map +1 -1
  58. package/build/icons/IconAdapter.js.map +1 -1
  59. package/build/icons/IconAlias.js.map +1 -1
  60. package/build/icons/IconButtonImage.js.map +1 -1
  61. package/build/icons/IconChannel.js.map +1 -1
  62. package/build/icons/IconClearFilter.js.map +1 -1
  63. package/build/icons/IconClosed.js.map +1 -1
  64. package/build/icons/IconCopy.js.map +1 -1
  65. package/build/icons/IconDevice.js.map +1 -1
  66. package/build/icons/IconDocument.js.map +1 -1
  67. package/build/icons/IconDocumentReadOnly.js.map +1 -1
  68. package/build/icons/IconExpert.js.map +1 -1
  69. package/build/icons/IconFx.js +1 -1
  70. package/build/icons/IconFx.js.map +1 -1
  71. package/build/icons/IconInstance.js.map +1 -1
  72. package/build/icons/IconLogout.js +1 -1
  73. package/build/icons/IconLogout.js.map +1 -1
  74. package/build/icons/IconNoIcon.js.map +1 -1
  75. package/build/icons/IconOpen.js.map +1 -1
  76. package/build/icons/IconProps.js.map +1 -1
  77. package/build/icons/IconState.js.map +1 -1
  78. package/build/icons/IconVacuum.js.map +1 -1
  79. package/build/index.css +56 -56
  80. package/build/index.d.ts +1 -0
  81. package/build/index.js +1 -0
  82. package/build/index.js.map +1 -1
  83. package/build/modulefederation.admin.config.d.ts +13 -0
  84. package/build/modulefederation.admin.config.js +44 -0
  85. package/build/modulefederation.admin.config.js.map +1 -0
  86. package/craco-module-federation.js +62 -62
  87. package/index.css +56 -56
  88. package/modulefederation.admin.config.d.ts +13 -0
  89. package/modulefederation.admin.config.js +48 -33
  90. package/package.json +12 -10
  91. package/tasksExample.js +91 -91
package/tasksExample.js CHANGED
@@ -1,91 +1,91 @@
1
- /**
2
- * Copyright 2024 bluefox <dogafox@gmail.com>
3
- *
4
- * MIT License
5
- *
6
- */
7
- 'use strict';
8
-
9
- const fs = require('node:fs');
10
- const { deleteFoldersRecursive, npmInstall, buildReact, copyFiles } = require('@iobroker/build-tools');
11
-
12
- const SRC = 'src';
13
-
14
- function copyAllFiles() {
15
- deleteFoldersRecursive('admin', ['.png', '.json', 'i18n']);
16
-
17
- copyFiles(
18
- [
19
- `${SRC}/build/*`,
20
- `!${SRC}/build/index.html`,
21
- `!${SRC}/build/static/js/main.*.chunk.js`,
22
- `!${SRC}/build/static/media/*.svg`,
23
- `!${SRC}/build/static/media/*.txt`,
24
- `!${SRC}/build/i18n/*`,
25
- `!${SRC}/build/i18n`,
26
- ],
27
- 'admin',
28
- );
29
-
30
- copyFiles(`${SRC}/build/index.html`, 'admin');
31
-
32
- copyFiles(`${SRC}/build/static/js/main.*.chunk.js`, 'admin/static/js');
33
- }
34
-
35
- function clean() {
36
- deleteFoldersRecursive('admin', ['.png', '.json', 'i18n']);
37
- deleteFoldersRecursive(`${SRC}/build`);
38
- }
39
-
40
- function installNpmLocal() {
41
- if (fs.existsSync(`${SRC}/node_modules`)) {
42
- return Promise.resolve();
43
- }
44
- return npmInstall(`${__dirname.replace(/\\/g, '/')}/${SRC}/`);
45
- }
46
-
47
- function patchFiles() {
48
- if (fs.existsSync(`${__dirname}/admin/index.html`)) {
49
- let code = fs.readFileSync(`${__dirname}/admin/index.html`).toString('utf8');
50
- code = code.replace(
51
- /<script>var script=document\.createElement\("script"\).+?<\/script>/,
52
- `<script type="text/javascript" src="./../../lib/js/socket.io.js"></script>`,
53
- );
54
-
55
- fs.writeFileSync(`${__dirname}/admin/index.html`, code);
56
- }
57
- if (fs.existsSync(`${__dirname}/${SRC}/build/index.html`)) {
58
- let code = fs.readFileSync(`${__dirname}/${SRC}/build/index.html`).toString('utf8');
59
- code = code.replace(
60
- /<script>var script=document\.createElement\("script"\).+?<\/script>/,
61
- `<script type="text/javascript" src="./../../lib/js/socket.io.js"></script>`,
62
- );
63
-
64
- fs.writeFileSync(`${SRC}/build/index.html`, code);
65
- }
66
- }
67
-
68
- if (process.argv.find(arg => arg === '--0-clean')) {
69
- clean();
70
- } else if (process.argv.find(arg => arg === '--1-npm')) {
71
- npmInstall(`${__dirname.replace(/\\/g, '/')}/${SRC}/`).catch(e => {
72
- console.error(`Cannot install: ${e}`);
73
- process.exit(1);
74
- });
75
- } else if (process.argv.find(arg => arg === '--2-build')) {
76
- buildReact(SRC, { rootDir: __dirname }).catch(e => {
77
- console.error(`Cannot build: ${e}`);
78
- process.exit(1);
79
- });
80
- } else if (process.argv.find(arg => arg === '--3-copy')) {
81
- copyAllFiles();
82
- } else if (process.argv.find(arg => arg === '--4-patch')) {
83
- patchFiles();
84
- } else {
85
- clean();
86
-
87
- installNpmLocal()
88
- .then(() => buildReact(SRC, { rootDir: __dirname }))
89
- .then(() => copyAllFiles())
90
- .then(() => patchFiles());
91
- }
1
+ /**
2
+ * Copyright 2024 bluefox <dogafox@gmail.com>
3
+ *
4
+ * MIT License
5
+ *
6
+ */
7
+ 'use strict';
8
+
9
+ const fs = require('node:fs');
10
+ const { deleteFoldersRecursive, npmInstall, buildReact, copyFiles } = require('@iobroker/build-tools');
11
+
12
+ const SRC = 'src';
13
+
14
+ function copyAllFiles() {
15
+ deleteFoldersRecursive('admin', ['.png', '.json', 'i18n']);
16
+
17
+ copyFiles(
18
+ [
19
+ `${SRC}/build/*`,
20
+ `!${SRC}/build/index.html`,
21
+ `!${SRC}/build/static/js/main.*.chunk.js`,
22
+ `!${SRC}/build/static/media/*.svg`,
23
+ `!${SRC}/build/static/media/*.txt`,
24
+ `!${SRC}/build/i18n/*`,
25
+ `!${SRC}/build/i18n`,
26
+ ],
27
+ 'admin',
28
+ );
29
+
30
+ copyFiles(`${SRC}/build/index.html`, 'admin');
31
+
32
+ copyFiles(`${SRC}/build/static/js/main.*.chunk.js`, 'admin/static/js');
33
+ }
34
+
35
+ function clean() {
36
+ deleteFoldersRecursive('admin', ['.png', '.json', 'i18n']);
37
+ deleteFoldersRecursive(`${SRC}/build`);
38
+ }
39
+
40
+ function installNpmLocal() {
41
+ if (fs.existsSync(`${SRC}/node_modules`)) {
42
+ return Promise.resolve();
43
+ }
44
+ return npmInstall(`${__dirname.replace(/\\/g, '/')}/${SRC}/`);
45
+ }
46
+
47
+ function patchFiles() {
48
+ if (fs.existsSync(`${__dirname}/admin/index.html`)) {
49
+ let code = fs.readFileSync(`${__dirname}/admin/index.html`).toString('utf8');
50
+ code = code.replace(
51
+ /<script>var script=document\.createElement\("script"\).+?<\/script>/,
52
+ `<script type="text/javascript" src="./../../lib/js/socket.io.js"></script>`,
53
+ );
54
+
55
+ fs.writeFileSync(`${__dirname}/admin/index.html`, code);
56
+ }
57
+ if (fs.existsSync(`${__dirname}/${SRC}/build/index.html`)) {
58
+ let code = fs.readFileSync(`${__dirname}/${SRC}/build/index.html`).toString('utf8');
59
+ code = code.replace(
60
+ /<script>var script=document\.createElement\("script"\).+?<\/script>/,
61
+ `<script type="text/javascript" src="./../../lib/js/socket.io.js"></script>`,
62
+ );
63
+
64
+ fs.writeFileSync(`${SRC}/build/index.html`, code);
65
+ }
66
+ }
67
+
68
+ if (process.argv.find(arg => arg === '--0-clean')) {
69
+ clean();
70
+ } else if (process.argv.find(arg => arg === '--1-npm')) {
71
+ npmInstall(`${__dirname.replace(/\\/g, '/')}/${SRC}/`).catch(e => {
72
+ console.error(`Cannot install: ${e}`);
73
+ process.exit(1);
74
+ });
75
+ } else if (process.argv.find(arg => arg === '--2-build')) {
76
+ buildReact(SRC, { rootDir: __dirname }).catch(e => {
77
+ console.error(`Cannot build: ${e}`);
78
+ process.exit(1);
79
+ });
80
+ } else if (process.argv.find(arg => arg === '--3-copy')) {
81
+ copyAllFiles();
82
+ } else if (process.argv.find(arg => arg === '--4-patch')) {
83
+ patchFiles();
84
+ } else {
85
+ clean();
86
+
87
+ installNpmLocal()
88
+ .then(() => buildReact(SRC, { rootDir: __dirname }))
89
+ .then(() => copyAllFiles())
90
+ .then(() => patchFiles());
91
+ }