iobroker.utility-monitor 1.4.5 → 1.5.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 (35) hide show
  1. package/README.md +159 -44
  2. package/admin/custom/.vite/manifest.json +90 -0
  3. package/admin/custom/@mf-types/Components.d.ts +2 -0
  4. package/admin/custom/@mf-types/compiled-types/Components/CSVImporter.d.ts +11 -0
  5. package/admin/custom/@mf-types/compiled-types/Components.d.ts +2 -0
  6. package/admin/custom/@mf-types.d.ts +3 -0
  7. package/admin/custom/@mf-types.zip +0 -0
  8. package/admin/custom/CSVImporter_v15_11.js +4415 -0
  9. package/admin/custom/assets/Components-i0AZ59nl.js +18887 -0
  10. package/admin/custom/assets/UtilityMonitor__loadShare__react__loadShare__-Da99Mak4.js +42 -0
  11. package/admin/custom/assets/UtilityMonitor__mf_v__runtimeInit__mf_v__-BmC4OGk6.js +16 -0
  12. package/admin/custom/assets/_commonjsHelpers-Dj2_voLF.js +30 -0
  13. package/admin/custom/assets/hostInit-DEXfeB0W.js +10 -0
  14. package/admin/custom/assets/index-B3WVNJTz.js +401 -0
  15. package/admin/custom/assets/index-VBwl8x_k.js +64 -0
  16. package/admin/custom/assets/preload-helper-BelkbqnE.js +61 -0
  17. package/admin/custom/assets/virtualExposes-CqCLUNLT.js +19 -0
  18. package/admin/custom/index.html +12 -0
  19. package/admin/custom/mf-manifest.json +1 -0
  20. package/admin/jsonConfig.json +219 -35
  21. package/io-package.json +51 -2
  22. package/lib/billingManager.js +276 -170
  23. package/lib/calculator.js +19 -138
  24. package/lib/consumptionManager.js +48 -331
  25. package/lib/importManager.js +300 -0
  26. package/lib/messagingHandler.js +112 -49
  27. package/lib/meter/MeterRegistry.js +110 -0
  28. package/lib/multiMeterManager.js +410 -181
  29. package/lib/stateManager.js +508 -36
  30. package/lib/utils/billingHelper.js +69 -0
  31. package/lib/utils/consumptionHelper.js +47 -0
  32. package/lib/utils/helpers.js +178 -0
  33. package/lib/utils/typeMapper.js +19 -0
  34. package/main.js +99 -36
  35. package/package.json +10 -4
@@ -0,0 +1,42 @@
1
+ import { g as getDefaultExportFromCjs } from './_commonjsHelpers-Dj2_voLF.js';
2
+ import { U as UtilityMonitor__mf_v__runtimeInit__mf_v__ } from './UtilityMonitor__mf_v__runtimeInit__mf_v__-BmC4OGk6.js';
3
+
4
+ function _mergeNamespaces(n, m) {
5
+ for (var i = 0; i < m.length; i++) {
6
+ const e = m[i];
7
+ if (typeof e !== 'string' && !Array.isArray(e)) { for (const k in e) {
8
+ if (k !== 'default' && !(k in n)) {
9
+ const d = Object.getOwnPropertyDescriptor(e, k);
10
+ if (d) {
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: () => e[k]
14
+ });
15
+ }
16
+ }
17
+ } }
18
+ }
19
+ return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: 'Module' }));
20
+ }
21
+
22
+ // dev uses dynamic import to separate chunks
23
+
24
+ const {initPromise} = UtilityMonitor__mf_v__runtimeInit__mf_v__;
25
+ const res = initPromise.then(runtime => runtime.loadShare("react", {
26
+ customShareInfo: {shareConfig:{
27
+ singleton: true,
28
+ strictVersion: false,
29
+ requiredVersion: "^18.3.1"
30
+ }}
31
+ }));
32
+ const exportModule = await res.then(factory => factory());
33
+ var UtilityMonitor__loadShare__react__loadShare__ = exportModule;
34
+
35
+ const React = /*@__PURE__*/getDefaultExportFromCjs(UtilityMonitor__loadShare__react__loadShare__);
36
+
37
+ const React$1 = /*#__PURE__*/_mergeNamespaces({
38
+ __proto__: null,
39
+ default: React
40
+ }, [UtilityMonitor__loadShare__react__loadShare__]);
41
+
42
+ export { React as R, UtilityMonitor__loadShare__react__loadShare__ as U, React$1 as a };
@@ -0,0 +1,16 @@
1
+ const globalKey = "__mf_init____mf__virtual/UtilityMonitor__mf_v__runtimeInit__mf_v__.js__";
2
+ if (!globalThis[globalKey]) {
3
+ let initResolve, initReject;
4
+ const initPromise = new Promise((re, rj) => {
5
+ initResolve = re;
6
+ initReject = rj;
7
+ });
8
+ globalThis[globalKey] = {
9
+ initPromise,
10
+ initResolve,
11
+ initReject
12
+ };
13
+ }
14
+ var UtilityMonitor__mf_v__runtimeInit__mf_v__ = globalThis[globalKey];
15
+
16
+ export { UtilityMonitor__mf_v__runtimeInit__mf_v__ as U };
@@ -0,0 +1,30 @@
1
+ function getDefaultExportFromCjs (x) {
2
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
+ }
4
+
5
+ function getAugmentedNamespace(n) {
6
+ if (n.__esModule) return n;
7
+ var f = n.default;
8
+ if (typeof f == "function") {
9
+ var a = function a () {
10
+ if (this instanceof a) {
11
+ return Reflect.construct(f, arguments, this.constructor);
12
+ }
13
+ return f.apply(this, arguments);
14
+ };
15
+ a.prototype = f.prototype;
16
+ } else a = {};
17
+ Object.defineProperty(a, '__esModule', {value: true});
18
+ Object.keys(n).forEach(function (k) {
19
+ var d = Object.getOwnPropertyDescriptor(n, k);
20
+ Object.defineProperty(a, k, d.get ? d : {
21
+ enumerable: true,
22
+ get: function () {
23
+ return n[k];
24
+ }
25
+ });
26
+ });
27
+ return a;
28
+ }
29
+
30
+ export { getAugmentedNamespace as a, getDefaultExportFromCjs as g };
@@ -0,0 +1,10 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["CSVImporter_v15_11.js","assets/virtualExposes-CqCLUNLT.js","assets/preload-helper-BelkbqnE.js","assets/UtilityMonitor__mf_v__runtimeInit__mf_v__-BmC4OGk6.js"])))=>i.map(i=>d[i]);
2
+ import { _ as __vitePreload } from './preload-helper-BelkbqnE.js';
3
+
4
+ const remoteEntryPromise = __vitePreload(() => import('../CSVImporter_v15_11.js'),true?__vite__mapDeps([0,1,2,3]):void 0);
5
+ // __tla only serves as a hack for vite-plugin-top-level-await.
6
+ Promise.resolve(remoteEntryPromise)
7
+ .then(remoteEntry => {
8
+ return Promise.resolve(remoteEntry.__tla)
9
+ .then(remoteEntry.init).catch(remoteEntry.init)
10
+ });