@flexem/fc-gui 3.0.0-alpha.48 → 3.0.0-alpha.49
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/CHANGELOG.md +1 -1
- package/bundles/@flexem/fc-gui.umd.js +9 -1
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +4 -4
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/numerical-display/numerical-display-element.d.ts +1 -0
- package/elements/numerical-display/numerical-display-element.js +9 -1
- package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@ export declare class NumericalDisplayElement extends ReadableElement {
|
|
|
26
26
|
private writeValue;
|
|
27
27
|
private showValue;
|
|
28
28
|
private numericalOperation;
|
|
29
|
+
private restorationTimer;
|
|
29
30
|
get writeVariableName(): string;
|
|
30
31
|
constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, graphStore: GraphStore, operationRecordService: OperationRecordService, releasedVariableService: ReleasedVariableService, securityChecker: SecurityChecker, variableStore: VariableStore, localization: Localization, signalRAppId: string);
|
|
31
32
|
dispose(): void;
|
|
@@ -186,6 +186,10 @@ export class NumericalDisplayElement extends ReadableElement {
|
|
|
186
186
|
});
|
|
187
187
|
this.writeValueMmodalRef.content.onClosed = (result) => {
|
|
188
188
|
if (result) {
|
|
189
|
+
if (this.restorationTimer) {
|
|
190
|
+
clearTimeout(this.restorationTimer);
|
|
191
|
+
this.restorationTimer = undefined;
|
|
192
|
+
}
|
|
189
193
|
const writeValue = this.dataTypeService.formatToDecimal(this.model.version, result.value, this.model.dataType);
|
|
190
194
|
this.writeValue = writeValue;
|
|
191
195
|
this.showValue = result.showValue;
|
|
@@ -194,7 +198,7 @@ export class NumericalDisplayElement extends ReadableElement {
|
|
|
194
198
|
this.writeValueMmodalRef.hide();
|
|
195
199
|
}
|
|
196
200
|
else {
|
|
197
|
-
setTimeout(() => {
|
|
201
|
+
this.restorationTimer = setTimeout(() => {
|
|
198
202
|
if (+this.displayText !== +this.showValue) {
|
|
199
203
|
this.writeValueMmodalRef.content.isSubmitting = false;
|
|
200
204
|
this.writeValueMmodalRef.content.showValidationErrorInfo(this.localization.writeValueTimeout);
|
|
@@ -237,6 +241,10 @@ export class NumericalDisplayElement extends ReadableElement {
|
|
|
237
241
|
this.displayText = this.formatNumericalDisplayText(this.model.dataType, this.model.fractionDigits, value);
|
|
238
242
|
this.updateDisplayText(this.formatDisplayTextUnit(this.displayText));
|
|
239
243
|
if (((_a = this.writeValueMmodalRef) === null || _a === void 0 ? void 0 : _a.content) && +this.displayText === +this.showValue) {
|
|
244
|
+
if (this.restorationTimer) {
|
|
245
|
+
clearTimeout(this.restorationTimer);
|
|
246
|
+
this.restorationTimer = undefined;
|
|
247
|
+
}
|
|
240
248
|
this.writeValueMmodalRef.hide();
|
|
241
249
|
this.writeValueMmodalRef.content.hideValidationErrorInfo();
|
|
242
250
|
this.recordOperation(this.writeValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"NumericalDisplayElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/readable-element","name":"ReadableElement","line":22,"character":45},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"NumericalDisplayElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/readable-element","name":"ReadableElement","line":22,"character":45},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":44,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":45,"character":18},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":46,"character":39},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":47,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":48,"character":30},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":49,"character":37},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":50,"character":49},{"__symbolic":"reference","module":"../../service","name":"ReleasedVariableService","line":51,"character":50},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":52,"character":42},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":53,"character":23},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":54,"character":22},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"initElement":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"initVariableText":[{"__symbolic":"method"}],"initGraphAndText":[{"__symbolic":"method"}],"doWriteValue":[{"__symbolic":"method"}],"recordOperation":[{"__symbolic":"method"}],"changeStates":[{"__symbolic":"method"}],"updateVariableValue":[{"__symbolic":"method"}],"updateDisplayText":[{"__symbolic":"method"}],"rebuildTextElement":[{"__symbolic":"method"}],"formatNumericalDisplayText":[{"__symbolic":"method"}],"formatFloatDisplayText":[{"__symbolic":"method"}],"isNumeric":[{"__symbolic":"method"}],"formatDisplayTextUnit":[{"__symbolic":"method"}]}}}}]
|