@flexem/fc-gui 3.0.0-alpha.49 → 3.0.0-alpha.50
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 +10 -5
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/modal/write-value/write-value-modal.component.d.ts +1 -1
- package/modal/write-value/write-value-modal.component.html +1 -1
- package/modal/write-value/write-value-modal.component.js +10 -5
- package/modal/write-value/write-value-modal.component.metadata.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -41204,21 +41204,26 @@ let WriteValueModalComponent = class WriteValueModalComponent {
|
|
|
41204
41204
|
}
|
|
41205
41205
|
save() {
|
|
41206
41206
|
this.isSubmitting = true;
|
|
41207
|
+
let value = this.value;
|
|
41207
41208
|
const showValue = this.value;
|
|
41208
41209
|
if (this.args.enableDataParsed) {
|
|
41209
41210
|
if (this.enableNumericalOperation) {
|
|
41210
|
-
|
|
41211
|
+
value = this.numericalOperationService.getWriteValue(this.args.version, this.value, this.numericalOperation, this.dataType, this.fractionDigits);
|
|
41211
41212
|
}
|
|
41212
41213
|
else {
|
|
41213
|
-
|
|
41214
|
+
value = this.formatWriteValue();
|
|
41214
41215
|
}
|
|
41215
41216
|
}
|
|
41216
|
-
this.onClosed({ value
|
|
41217
|
+
this.onClosed({ value, showValue });
|
|
41217
41218
|
}
|
|
41218
41219
|
close() {
|
|
41219
41220
|
this.bsModalRef.hide();
|
|
41220
41221
|
}
|
|
41221
|
-
validate() {
|
|
41222
|
+
validate(event = null) {
|
|
41223
|
+
if (event && event.keyCode === 13 && !this.validationError) {
|
|
41224
|
+
this.save();
|
|
41225
|
+
return;
|
|
41226
|
+
}
|
|
41222
41227
|
// 校验数值必填
|
|
41223
41228
|
if (null == this.value || '' === this.value.trim()) {
|
|
41224
41229
|
return this.showValidationErrorInfo(this.localization.numericalValueRequired);
|
|
@@ -41294,7 +41299,7 @@ __decorate([
|
|
|
41294
41299
|
WriteValueModalComponent = __decorate([
|
|
41295
41300
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
|
|
41296
41301
|
selector: 'writeValueModal',
|
|
41297
|
-
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()\" 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> ",
|
|
41302
|
+
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> ",
|
|
41298
41303
|
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; } "]
|
|
41299
41304
|
}),
|
|
41300
41305
|
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_1__[/* LOCALIZATION */ "b"]))
|