@flexem/fc-gui 3.0.0-alpha.118 → 3.0.0-alpha.119
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/bundles/@flexem/fc-gui.umd.js +30 -5
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +2 -2
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/communication/variable/variable-value.d.ts +2 -1
- package/communication/variable/variable-value.js +2 -1
- package/communication/variable/variable-value.metadata.json +1 -1
- package/elements/base/readable-element.js +3 -3
- package/elements/base/state-control-element.d.ts +3 -1
- package/elements/main-element.d.ts +1 -0
- package/elements/main-element.js +25 -1
- package/elements/main-element.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -21868,13 +21868,14 @@ var variable_communicator = __webpack_require__(262);
|
|
|
21868
21868
|
|
|
21869
21869
|
// CONCATENATED MODULE: ./.tmp/communication/variable/variable-value.ts
|
|
21870
21870
|
class VariableValue {
|
|
21871
|
-
constructor(variableName, state, value, timeStamp, systemName, customStatus) {
|
|
21871
|
+
constructor(variableName, state, value, timeStamp, systemName, customStatus, virtualDeviceId) {
|
|
21872
21872
|
this.variableName = variableName;
|
|
21873
21873
|
this.state = state;
|
|
21874
21874
|
this.value = value;
|
|
21875
21875
|
this.timeStamp = timeStamp;
|
|
21876
21876
|
this.systemName = systemName;
|
|
21877
21877
|
this.customStatus = customStatus;
|
|
21878
|
+
this.virtualDeviceId = virtualDeviceId;
|
|
21878
21879
|
}
|
|
21879
21880
|
}
|
|
21880
21881
|
|
|
@@ -35318,14 +35319,14 @@ class readable_element_ReadableElement extends conditional_enable_element_Condit
|
|
|
35318
35319
|
reportValueChanged(value) {
|
|
35319
35320
|
var _a, _b, _c, _d;
|
|
35320
35321
|
Object(lodash["forEach"])(this.elementStates, elementState => {
|
|
35321
|
-
if (elementState.variableName === value.variableName
|
|
35322
|
+
if (elementState.variableName === value.variableName) {
|
|
35322
35323
|
elementState.state = value.state;
|
|
35323
35324
|
this.changeStates();
|
|
35324
35325
|
}
|
|
35325
35326
|
});
|
|
35326
|
-
if (this.state === _tmp_model["State"].Normal || this.state === _tmp_model["State"].Disable
|
|
35327
|
+
if (value.systemName !== '设备状态' && (this.state === _tmp_model["State"].Normal || this.state === _tmp_model["State"].Disable
|
|
35327
35328
|
|| value.variableName === this.minVariableName
|
|
35328
|
-
|| value.variableName === this.maxVariableName) {
|
|
35329
|
+
|| value.variableName === this.maxVariableName)) {
|
|
35329
35330
|
this.updateVariableValue(value.value, value.variableName);
|
|
35330
35331
|
}
|
|
35331
35332
|
if (value.systemName === '设备状态') {
|
|
@@ -41590,15 +41591,39 @@ class main_element_MainElement {
|
|
|
41590
41591
|
});
|
|
41591
41592
|
});
|
|
41592
41593
|
}
|
|
41594
|
+
getVirtualDeviceIdFromRect(rectElement) {
|
|
41595
|
+
let current = rectElement;
|
|
41596
|
+
while (current) {
|
|
41597
|
+
if (current.tagName === 'FC-GUI') {
|
|
41598
|
+
const virtualDeviceId = current.getAttribute('data-virtual-device-id');
|
|
41599
|
+
return virtualDeviceId || null;
|
|
41600
|
+
}
|
|
41601
|
+
current = current.parentElement;
|
|
41602
|
+
}
|
|
41603
|
+
return null;
|
|
41604
|
+
}
|
|
41593
41605
|
reportVariableValues(values) {
|
|
41594
41606
|
this.checkIsLoaded();
|
|
41595
41607
|
Object(lodash["each"])(values, value => {
|
|
41596
41608
|
Object(lodash["each"])(this.elements, e => {
|
|
41609
|
+
var _a;
|
|
41597
41610
|
if (e instanceof readable_element_ReadableElement) {
|
|
41598
41611
|
if ((value.variableName && (e.readVariableName === value.variableName ||
|
|
41599
|
-
e.minVariableName === value.variableName || e.maxVariableName === value.variableName))
|
|
41612
|
+
e.minVariableName === value.variableName || e.maxVariableName === value.variableName))) {
|
|
41600
41613
|
e.reportValueChanged(value);
|
|
41601
41614
|
}
|
|
41615
|
+
if (e.readVariableName === value.systemName) {
|
|
41616
|
+
const rect = (_a = e.currentRect) === null || _a === void 0 ? void 0 : _a[0];
|
|
41617
|
+
const deviceId = this.getVirtualDeviceIdFromRect(rect);
|
|
41618
|
+
if (deviceId) {
|
|
41619
|
+
if (+deviceId === value.virtualDeviceId) {
|
|
41620
|
+
e.reportValueChanged(value);
|
|
41621
|
+
}
|
|
41622
|
+
}
|
|
41623
|
+
else {
|
|
41624
|
+
e.reportValueChanged(value);
|
|
41625
|
+
}
|
|
41626
|
+
}
|
|
41602
41627
|
}
|
|
41603
41628
|
});
|
|
41604
41629
|
});
|