@flexem/fc-gui 3.0.0-alpha.52 → 3.0.0-alpha.54
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 +12 -1
- package/bundles/@flexem/fc-gui.umd.js +10 -10
- 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.js +2 -8
- package/modal/write-value/write-value-modal-args.d.ts +3 -1
- package/modal/write-value/write-value-modal-args.js +2 -1
- package/modal/write-value/write-value-modal-args.metadata.json +1 -1
- package/modal/write-value/write-value-modal.component.d.ts +1 -0
- package/modal/write-value/write-value-modal.component.js +6 -1
- package/modal/write-value/write-value-modal.component.metadata.json +1 -1
- package/package.json +1 -1
- package/service/released-variable/released-variable.service.d.ts +1 -1
|
@@ -52,12 +52,6 @@ export class NumericalDisplayElement extends ReadableElement {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
initElement() {
|
|
55
|
-
this.releasedVariableService.getVariablesWithValueTransform().subscribe(result => {
|
|
56
|
-
const variablesTransform = result.filter(item => item.name === this.writeVariableName);
|
|
57
|
-
if (variablesTransform && variablesTransform.length && JSON.parse(variablesTransform[0].valueTransform).Type !== 0) {
|
|
58
|
-
this.numericalOperation = true;
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
55
|
const { rootElement } = this;
|
|
62
56
|
rootElement.selectAll('*').remove();
|
|
63
57
|
let width = null, height = null;
|
|
@@ -180,7 +174,7 @@ export class NumericalDisplayElement extends ReadableElement {
|
|
|
180
174
|
if (null == this.writeVariableName) {
|
|
181
175
|
return;
|
|
182
176
|
}
|
|
183
|
-
const args = new WriteValueModalArgs(this.writeVariableName, this.model.dataType, this.model.fBoxDataType, this.model.integerDigits, this.model.fractionDigits, this.numericalOperationService.getNumericalOperations(this.model), this.model.version, this.enableDataParsed);
|
|
177
|
+
const args = new WriteValueModalArgs(this.writeVariableName, this.model.dataType, this.model.fBoxDataType, this.model.integerDigits, this.model.fractionDigits, this.numericalOperationService.getNumericalOperations(this.model), this.model.version, this.enableDataParsed, this.releasedVariableService);
|
|
184
178
|
this.writeValueMmodalRef = this.modalService.show(WriteValueModalComponent, {
|
|
185
179
|
initialState: { args: args }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
|
|
186
180
|
});
|
|
@@ -194,7 +188,7 @@ export class NumericalDisplayElement extends ReadableElement {
|
|
|
194
188
|
this.writeValue = writeValue;
|
|
195
189
|
this.showValue = result.showValue;
|
|
196
190
|
if (+this.displayText !== +this.showValue) {
|
|
197
|
-
if (this.numericalOperation || result.enableNumericalOperation) {
|
|
191
|
+
if (this.numericalOperation || result.enableNumericalOperation || result.isNumericalOperation) {
|
|
198
192
|
this.writeValueMmodalRef.hide();
|
|
199
193
|
}
|
|
200
194
|
else {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NumericalOperation } from '../../model';
|
|
2
|
+
import { ReleasedVariableService } from '../../service';
|
|
2
3
|
export declare class WriteValueModalArgs {
|
|
3
4
|
variableName: string;
|
|
4
5
|
dataType: number;
|
|
@@ -8,5 +9,6 @@ export declare class WriteValueModalArgs {
|
|
|
8
9
|
numericalOperation: NumericalOperation;
|
|
9
10
|
version: number;
|
|
10
11
|
enableDataParsed: boolean;
|
|
11
|
-
|
|
12
|
+
releasedVariableService: ReleasedVariableService;
|
|
13
|
+
constructor(variableName: string, dataType: number, fBoxDataType: number, integerDigits: number, fractionDigits: number, numericalOperation: NumericalOperation, version: number, enableDataParsed: boolean, releasedVariableService: ReleasedVariableService);
|
|
12
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export class WriteValueModalArgs {
|
|
2
|
-
constructor(variableName, dataType, fBoxDataType, integerDigits, fractionDigits, numericalOperation, version, enableDataParsed) {
|
|
2
|
+
constructor(variableName, dataType, fBoxDataType, integerDigits, fractionDigits, numericalOperation, version, enableDataParsed, releasedVariableService) {
|
|
3
3
|
this.variableName = variableName;
|
|
4
4
|
this.dataType = dataType;
|
|
5
5
|
this.fBoxDataType = fBoxDataType;
|
|
@@ -8,5 +8,6 @@ export class WriteValueModalArgs {
|
|
|
8
8
|
this.numericalOperation = numericalOperation;
|
|
9
9
|
this.version = version;
|
|
10
10
|
this.enableDataParsed = enableDataParsed;
|
|
11
|
+
this.releasedVariableService = releasedVariableService;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"../../model","name":"NumericalOperation","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"../../model","name":"NumericalOperation","line":10,"character":35},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"boolean"},{"__symbolic":"reference","module":"../../service","name":"ReleasedVariableService","line":13,"character":40}]}]}}}}]
|
|
@@ -27,6 +27,7 @@ export declare class WriteValueModalComponent implements OnInit {
|
|
|
27
27
|
valueType: string;
|
|
28
28
|
variableName: string;
|
|
29
29
|
enableNumericalOperation: boolean;
|
|
30
|
+
isNumericalOperation: boolean;
|
|
30
31
|
numericalOperation: NumericalOperation;
|
|
31
32
|
validationError: boolean;
|
|
32
33
|
validationErrorText: string;
|
|
@@ -110,7 +110,12 @@ let WriteValueModalComponent = class WriteValueModalComponent {
|
|
|
110
110
|
value = this.formatWriteValue();
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
this.
|
|
113
|
+
this.args.releasedVariableService.getVariableWithValueTransform(this.variableName).subscribe(result => {
|
|
114
|
+
if (JSON.parse(result).Type !== 0) {
|
|
115
|
+
this.isNumericalOperation = true;
|
|
116
|
+
}
|
|
117
|
+
this.onClosed({ value, showValue, enableNumericalOperation: this.enableNumericalOperation, isNumericalOperation: this.isNumericalOperation });
|
|
118
|
+
});
|
|
114
119
|
}
|
|
115
120
|
close() {
|
|
116
121
|
this.bsModalRef.hide();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"writeValueModal","template":"<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">×</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}: {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </span> <input type=\"text\" name=\"valueInput\" autoFocus class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ","styles":[".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]}]}],"members":{"invalidErrorText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"writeValueModal","template":"<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">×</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}: {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </span> <input type=\"text\" name=\"valueInput\" autoFocus class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ","styles":[".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]}]}],"members":{"invalidErrorText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":44,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":50,"character":9},"arguments":[{"__symbolic":"reference","module":"../../localization","name":"LOCALIZATION","line":50,"character":16}]}],null,null,null,null],"parameters":[{"__symbolic":"reference","module":"../../localization","name":"Localization","line":50,"character":51},{"__symbolic":"reference","module":"../../utils/data-type/data-type.service","name":"DataTypeService","line":51,"character":42},{"__symbolic":"reference","module":"../../utils/fraction-digit.service","name":"FractionDigitService","line":52,"character":47},{"__symbolic":"reference","module":"../../utils/numerical-operation.service","name":"NumericalOperationService","line":53,"character":52},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalRef","line":54,"character":37}]}],"ngOnInit":[{"__symbolic":"method"}],"initData":[{"__symbolic":"method"}],"setValueRangeAccordToDataParsed":[{"__symbolic":"method"}],"getWriteValueRangeText":[{"__symbolic":"method"}],"save":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"showValidationErrorInfo":[{"__symbolic":"method"}],"hideValidationErrorInfo":[{"__symbolic":"method"}],"getFractionDigits":[{"__symbolic":"method"}],"formatWriteValue":[{"__symbolic":"method"}]}}}}]
|
package/package.json
CHANGED