coolcare-lite-scada-component 4.1.7 → 4.1.8
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/es/components/BoxShadowPicker/index.less.d.ts +9 -9
- package/es/components/ColorPicker/util.js +4 -4
- package/es/constant.js +2 -2
- package/es/element/BorderBox/util/typings.d.ts +9 -9
- package/es/element/Decoration/util/typings.d.ts +9 -9
- package/es/hooks/usePointWatch.js +7 -2
- package/es/integration/resource-seed.json +3380 -3380
- package/es/pages/display/Player/index.js +28 -11
- package/es/pages/document.ejs +2 -2
- package/es/pages/editor/PanelLeft/BorderBoxEleList/index.less.d.ts +7 -7
- package/es/pages/editor/PanelLeft/DecorationEleList/index.less.d.ts +7 -7
- package/es/pages/editor/PanelLeft/GroupManageDialog/index.js +4 -4
- package/es/pages/editor/PanelLeft/index.js +3 -3
- package/es/pages/editor/PanelRight/index.less.d.ts +7 -7
- package/es/pages/editor/index.js +1 -1
- package/es/services/common/typings.d.ts +15 -15
- package/es/services/master/typings.d.ts +362 -362
- package/es/services/product/typings.d.ts +1045 -1045
- package/es/services/project/typings.d.ts +1609 -1609
- package/es/shims.x6.d.ts +15 -15
- package/es/typings.d.ts +224 -224
- package/es/utils/cssStyle.js +4 -4
- package/es/utils/decomposeMatrix.js +5 -5
- package/es/utils/events.js +38 -3
- package/es/utils/index.js +34 -34
- package/es/utils/pointDispatcher.js +59 -0
- package/es/utils/pointValueFormat.js +1 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// This file is automatically generated.
|
|
2
|
-
// Please do not change this file!
|
|
3
|
-
interface CssExports {
|
|
4
|
-
'box-shadow-picker-wrap': string;
|
|
5
|
-
'color-picker': string;
|
|
6
|
-
'input-label': string;
|
|
7
|
-
}
|
|
8
|
-
export const cssExports: CssExports;
|
|
9
|
-
export default cssExports;
|
|
1
|
+
// This file is automatically generated.
|
|
2
|
+
// Please do not change this file!
|
|
3
|
+
interface CssExports {
|
|
4
|
+
'box-shadow-picker-wrap': string;
|
|
5
|
+
'color-picker': string;
|
|
6
|
+
'input-label': string;
|
|
7
|
+
}
|
|
8
|
+
export const cssExports: CssExports;
|
|
9
|
+
export default cssExports;
|
package/es/constant.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type BorderColors = [string, string];
|
|
2
|
-
|
|
3
|
-
export type ExtraData = {
|
|
4
|
-
colors: BorderColors;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export interface BorderBoxProps<T> {
|
|
8
|
-
node?: T;
|
|
9
|
-
}
|
|
1
|
+
export type BorderColors = [string, string];
|
|
2
|
+
|
|
3
|
+
export type ExtraData = {
|
|
4
|
+
colors: BorderColors;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export interface BorderBoxProps<T> {
|
|
8
|
+
node?: T;
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type DecorationColors = [string, string];
|
|
2
|
-
|
|
3
|
-
export type ExtraData = {
|
|
4
|
-
colors: DecorationColors;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export type DecorationProps<T> = {
|
|
8
|
-
node?: T;
|
|
9
|
-
};
|
|
1
|
+
export type DecorationColors = [string, string];
|
|
2
|
+
|
|
3
|
+
export type ExtraData = {
|
|
4
|
+
colors: DecorationColors;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type DecorationProps<T> = {
|
|
8
|
+
node?: T;
|
|
9
|
+
};
|
|
@@ -4,19 +4,24 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
4
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
-
import { useState, useEffect } from 'react';
|
|
7
|
+
import { useState, useEffect, useRef } from 'react';
|
|
8
|
+
import { isEqual } from 'lodash-es';
|
|
8
9
|
import emitter from "../utils/events";
|
|
9
10
|
function usePointWatch(point, namespace) {
|
|
10
11
|
var _useState = useState(),
|
|
11
12
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12
13
|
pointData = _useState2[0],
|
|
13
14
|
setPointData = _useState2[1];
|
|
15
|
+
var latestData = useRef();
|
|
14
16
|
useEffect(function () {
|
|
15
17
|
if (window.scadaMode === 'edit' || !point) {
|
|
16
18
|
return function () {};
|
|
17
19
|
}
|
|
18
20
|
var eventHandler = function eventHandler(val) {
|
|
19
|
-
|
|
21
|
+
if (!isEqual(latestData.current, val)) {
|
|
22
|
+
latestData.current = val;
|
|
23
|
+
setPointData(val);
|
|
24
|
+
}
|
|
20
25
|
};
|
|
21
26
|
var eventName = "point-update-".concat('pointId' in point ? point.pointId : 'identifierName' in point ? point.identifierName : 'meterId' in point ? point.meterId : 'indicatorNo' in point ? point.indicatorNo : '', "-").concat(namespace !== null && namespace !== void 0 ? namespace : 0);
|
|
22
27
|
emitter.on(eventName, eventHandler);
|