@main-class/componentes 1.16.4 → 1.16.5

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.
@@ -4616,7 +4616,7 @@
4616
4616
  }
4617
4617
  var maskedValue = '';
4618
4618
  var valorRestante = value.replace(/\D/g, '').replace(/^0+/, '');
4619
- while (valorRestante.length < 3) {
4619
+ while (valorRestante.length < (mascara.length - mascara.indexOf(',')) + 1) {
4620
4620
  valorRestante = '0' + valorRestante;
4621
4621
  }
4622
4622
  for (var i = mascara.length - 1; i >= 0 && valorRestante.length; i--) {
@@ -4646,10 +4646,10 @@
4646
4646
  var MonetarioModelDirective = /** @class */ (function () {
4647
4647
  function MonetarioModelDirective(ngControl) {
4648
4648
  this.ngControl = ngControl;
4649
- this.mascara = '###.###.###.###.###,##';
4650
- this.symbol = 'R$';
4651
- this.thousandDivider = '.';
4652
- this.fractionalDivider = ',';
4649
+ this.$mascara = '###.###.###.###.###,##';
4650
+ this.$symbol = 'R$';
4651
+ this.$thousandDivider = '.';
4652
+ this.$fractionalDivider = ',';
4653
4653
  this.value = null;
4654
4654
  this.displayValue = null;
4655
4655
  this.mclModelChange = new i0.EventEmitter();
@@ -4665,6 +4665,46 @@
4665
4665
  return this.keepMask ? displayValue :
4666
4666
  monetarioMask(displayValue, '', '', '.', this.mascara);
4667
4667
  };
4668
+ Object.defineProperty(MonetarioModelDirective.prototype, "symbol", {
4669
+ set: function (symbol) {
4670
+ if (symbol !== this.$symbol) {
4671
+ this.$symbol = symbol;
4672
+ this.defineValue();
4673
+ }
4674
+ },
4675
+ enumerable: false,
4676
+ configurable: true
4677
+ });
4678
+ Object.defineProperty(MonetarioModelDirective.prototype, "thousandDivider", {
4679
+ set: function (thousandDivider) {
4680
+ if (thousandDivider !== this.$thousandDivider) {
4681
+ this.$thousandDivider = thousandDivider;
4682
+ this.defineValue();
4683
+ }
4684
+ },
4685
+ enumerable: false,
4686
+ configurable: true
4687
+ });
4688
+ Object.defineProperty(MonetarioModelDirective.prototype, "fractionalDivider", {
4689
+ set: function (fractionalDivider) {
4690
+ if (fractionalDivider !== this.$fractionalDivider) {
4691
+ this.$fractionalDivider = fractionalDivider;
4692
+ this.defineValue();
4693
+ }
4694
+ },
4695
+ enumerable: false,
4696
+ configurable: true
4697
+ });
4698
+ Object.defineProperty(MonetarioModelDirective.prototype, "mascara", {
4699
+ set: function (mascara) {
4700
+ if (mascara !== this.$mascara) {
4701
+ this.$mascara = mascara;
4702
+ this.defineValue();
4703
+ }
4704
+ },
4705
+ enumerable: false,
4706
+ configurable: true
4707
+ });
4668
4708
  Object.defineProperty(MonetarioModelDirective.prototype, "maskValue", {
4669
4709
  set: function (value) {
4670
4710
  if (value !== this.value) {
@@ -4737,12 +4777,12 @@
4737
4777
  { type: forms.NgControl }
4738
4778
  ]; };
4739
4779
  MonetarioModelDirective.propDecorators = {
4740
- mascara: [{ type: i0.Input }],
4780
+ keepMask: [{ type: i0.Input }],
4781
+ mclModelChange: [{ type: i0.Output }],
4741
4782
  symbol: [{ type: i0.Input }],
4742
4783
  thousandDivider: [{ type: i0.Input }],
4743
4784
  fractionalDivider: [{ type: i0.Input }],
4744
- keepMask: [{ type: i0.Input }],
4745
- mclModelChange: [{ type: i0.Output }],
4785
+ mascara: [{ type: i0.Input }],
4746
4786
  maskValue: [{ type: i0.Input, args: ['mclModel',] }],
4747
4787
  onInput: [{ type: i0.HostListener, args: ['input', ['$event'],] }]
4748
4788
  };