@seniorsistemas/angular-components 16.3.4 → 16.3.6

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.
@@ -1482,13 +1482,13 @@ var LocaleModule = /** @class */ (function () {
1482
1482
  var BignumberField = /** @class */ (function (_super) {
1483
1483
  __extends(BignumberField, _super);
1484
1484
  function BignumberField(config) {
1485
- var _a;
1485
+ var _a, _b;
1486
1486
  var _this = _super.call(this, config) || this;
1487
- _this.allowNegative = config.allowNegative;
1487
+ _this.allowNegative = (_a = config.allowNegative) !== null && _a !== void 0 ? _a : true;
1488
1488
  _this.numberLocaleOptions = config.numberLocaleOptions || new NumberLocaleOptions();
1489
1489
  _this.browserAutocomplete = config.browserAutocomplete;
1490
1490
  _this.precision = config.precision;
1491
- _this.scale = (_a = config.scale) !== null && _a !== void 0 ? _a : 2;
1491
+ _this.scale = (_b = config.scale) !== null && _b !== void 0 ? _b : 2;
1492
1492
  _this.alignTo = _this.scale ? AlignmentOptions.RIGHT : AlignmentOptions.LEFT;
1493
1493
  _this.mask = config.mask;
1494
1494
  _this.leftAddon = config.leftAddon;
@@ -1815,6 +1815,7 @@ var LookupField = /** @class */ (function (_super) {
1815
1815
  _this.selectLabel = "Selecionar";
1816
1816
  _this.recordLabel = " registro";
1817
1817
  _this.recordsLabel = " registros";
1818
+ _this.emptyFieldLabel = "Não informado";
1818
1819
  _this.autocompleteForceSelection = true;
1819
1820
  _this.onSelect = function (event) { };
1820
1821
  _this.onUnselect = function (event) { };
@@ -3807,6 +3808,17 @@ var BignumberInputDirective = /** @class */ (function (_super) {
3807
3808
  this.updateVariables();
3808
3809
  }
3809
3810
  };
3811
+ BignumberInputDirective.prototype.onKeypress = function (event) {
3812
+ var code = event.code;
3813
+ if (code === "Minus" || code === "NumpadSubtract") {
3814
+ if (this.allowNegative) {
3815
+ this.maxLength = this._maxLength + 1;
3816
+ }
3817
+ }
3818
+ else if (code === "Equal" || code === "NumpadAdd") {
3819
+ this.maxLength = this._maxLength;
3820
+ }
3821
+ };
3810
3822
  /**
3811
3823
  * Update the options values according to the directive input values.
3812
3824
  */
@@ -3830,6 +3842,7 @@ var BignumberInputDirective = /** @class */ (function (_super) {
3830
3842
  var thoSepLength = this.thousandsSeparator.length;
3831
3843
  var maxLength = this.precision + (this.scale ? decSepLength : 0);
3832
3844
  maxLength += Math.ceil((this.precision - (this.scale ? this.scale : 0)) / 3 - 1) * thoSepLength;
3845
+ this._maxLength = maxLength;
3833
3846
  this.maxLength = maxLength;
3834
3847
  };
3835
3848
  var BignumberInputDirective_1;
@@ -3858,6 +3871,9 @@ var BignumberInputDirective = /** @class */ (function (_super) {
3858
3871
  __decorate([
3859
3872
  HostBinding("attr.maxLength")
3860
3873
  ], BignumberInputDirective.prototype, "maxLength", void 0);
3874
+ __decorate([
3875
+ HostListener("keypress", ["$event"])
3876
+ ], BignumberInputDirective.prototype, "onKeypress", null);
3861
3877
  BignumberInputDirective = BignumberInputDirective_1 = __decorate([
3862
3878
  Directive({
3863
3879
  selector: "input[sBignumberInput]",
@@ -5209,7 +5225,7 @@ var LookupFieldComponent = /** @class */ (function () {
5209
5225
  ], LookupFieldComponent.prototype, "formControl", void 0);
5210
5226
  LookupFieldComponent = __decorate([
5211
5227
  Component({
5212
- template: "<div\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\">\n <s-lookup\n [id]=\"(field.id || field.name)\"\n [multiple]=\"field.multiple\"\n [formControl]=\"formControl\"\n [lookupSuggestions]=\"field.lookupSuggestions\"\n [dataKey]=\"field.dataKey\"\n [placeholder]=\"field.placeholder\"\n [searchFields]=\"field.searchFields\"\n [searchGridFields]=\"field.searchGridFields\"\n [searchGridData]=\"field.gridData\"\n (onLookupRequest)=\"field.onLookupRequest($event)\"\n (onSearchRequest)=\"field.onSearchRequest($event)\"\n [lookupDisplayField]=\"field.lookupDisplayField\"\n [searchTotalRecords]=\"field.searchTotalRecords\"\n [searchTotalRecordsLabel]=\"field.searchTotalRecordsLabel\"\n [searchTitle]=\"field.searchTitle\"\n [selectLabel]=\"field.selectLabel\"\n [searchEmptyTitle]=\"field.searchEmptyTitle\"\n [filterLabel]=\"field.filterLabel\"\n [filterTitle]=\"field.filterTitle\"\n [clearLabel]=\"field.clearLabel\"\n [cancelLabel]=\"field.cancelLabel\"\n (onSelect)=\"field.onSelect($event)\"\n (onUnselect)=\"field.onUnselect($event)\"\n (onClear)=\"field.onClear ? field.onClear($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [lookupAppendTo]=\"field.appendTo\"\n [lookupEmptyMessage]=\"field.emptyMessage\"\n [recordLabel]=\"field.recordLabel\"\n [recordsLabel]=\"field.recordsLabel\"\n [autocompleteForceSelection]=\"field.autocompleteForceSelection\">\n </s-lookup>\n</div>\n"
5228
+ template: "<div\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\">\n <s-lookup\n [id]=\"(field.id || field.name)\"\n [multiple]=\"field.multiple\"\n [formControl]=\"formControl\"\n [lookupSuggestions]=\"field.lookupSuggestions\"\n [dataKey]=\"field.dataKey\"\n [placeholder]=\"field.placeholder\"\n [searchFields]=\"field.searchFields\"\n [searchGridFields]=\"field.searchGridFields\"\n [searchGridData]=\"field.gridData\"\n (onLookupRequest)=\"field.onLookupRequest($event)\"\n (onSearchRequest)=\"field.onSearchRequest($event)\"\n [lookupDisplayField]=\"field.lookupDisplayField\"\n [searchTotalRecords]=\"field.searchTotalRecords\"\n [searchTotalRecordsLabel]=\"field.searchTotalRecordsLabel\"\n [searchTitle]=\"field.searchTitle\"\n [selectLabel]=\"field.selectLabel\"\n [searchEmptyTitle]=\"field.searchEmptyTitle\"\n [filterLabel]=\"field.filterLabel\"\n [filterTitle]=\"field.filterTitle\"\n [clearLabel]=\"field.clearLabel\"\n [cancelLabel]=\"field.cancelLabel\"\n [emptyFieldLabel]=\"field.emptyFieldLabel \"\n (onSelect)=\"field.onSelect($event)\"\n (onUnselect)=\"field.onUnselect($event)\"\n (onClear)=\"field.onClear ? field.onClear($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [lookupAppendTo]=\"field.appendTo\"\n [lookupEmptyMessage]=\"field.emptyMessage\"\n [recordLabel]=\"field.recordLabel\"\n [recordsLabel]=\"field.recordsLabel\"\n [autocompleteForceSelection]=\"field.autocompleteForceSelection\">\n </s-lookup>\n</div>\n"
5213
5229
  })
5214
5230
  ], LookupFieldComponent);
5215
5231
  return LookupFieldComponent;