@main-class/componentes 1.15.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.
- package/bundles/main-class-componentes.umd.js +78 -53
- package/bundles/main-class-componentes.umd.js.map +1 -1
- package/bundles/main-class-componentes.umd.min.js +1 -1
- package/bundles/main-class-componentes.umd.min.js.map +1 -1
- package/esm2015/input/select-many-checkbox/select-many-checkbox.component.js +2 -2
- package/esm2015/input/select-radio/select-radio.component.js +2 -2
- package/esm2015/misc/cpf-cnpj/cpf-cnpj-model.directive.js +9 -3
- package/esm2015/misc/monetario/monetario-mask.js +2 -2
- package/esm2015/misc/monetario/monetario-model.directive.js +33 -9
- package/fesm2015/main-class-componentes.js +42 -12
- package/fesm2015/main-class-componentes.js.map +1 -1
- package/misc/cpf-cnpj/cpf-cnpj-model.directive.d.ts +1 -0
- package/misc/monetario/monetario-model.directive.d.ts +8 -4
- package/package.json +1 -1
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
var moment__namespace = /*#__PURE__*/_interopNamespace(moment$1);
|
|
31
31
|
|
|
32
32
|
/*! *****************************************************************************
|
|
33
|
-
Copyright (c) Microsoft Corporation.
|
|
33
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
34
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
35
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
36
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
39
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
40
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
41
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
41
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
42
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
43
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
44
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
43
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
44
|
+
and limitations under the License.
|
|
45
45
|
***************************************************************************** */
|
|
46
46
|
/* global Reflect, Promise */
|
|
47
47
|
var extendStatics = function (d, b) {
|
|
@@ -99,7 +99,6 @@
|
|
|
99
99
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
100
100
|
}
|
|
101
101
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
102
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
103
102
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
104
103
|
function fulfilled(value) { try {
|
|
105
104
|
step(generator.next(value));
|
|
@@ -113,7 +112,7 @@
|
|
|
113
112
|
catch (e) {
|
|
114
113
|
reject(e);
|
|
115
114
|
} }
|
|
116
|
-
function step(result) { result.done ? resolve(result.value) :
|
|
115
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
117
116
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
118
117
|
});
|
|
119
118
|
}
|
|
@@ -186,29 +185,22 @@
|
|
|
186
185
|
return { value: op[0] ? op[1] : void 0, done: true };
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
|
-
function __createBinding(o, m, k, k2) {
|
|
190
|
-
if (k2 === undefined)
|
|
191
|
-
k2 = k;
|
|
192
|
-
o[k2] = m[k];
|
|
193
|
-
}
|
|
194
188
|
function __exportStar(m, exports) {
|
|
195
189
|
for (var p in m)
|
|
196
|
-
if (
|
|
190
|
+
if (!exports.hasOwnProperty(p))
|
|
197
191
|
exports[p] = m[p];
|
|
198
192
|
}
|
|
199
193
|
function __values(o) {
|
|
200
|
-
var
|
|
194
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
|
201
195
|
if (m)
|
|
202
196
|
return m.call(o);
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
};
|
|
211
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
197
|
+
return {
|
|
198
|
+
next: function () {
|
|
199
|
+
if (o && i >= o.length)
|
|
200
|
+
o = void 0;
|
|
201
|
+
return { value: o && o[i++], done: !o };
|
|
202
|
+
}
|
|
203
|
+
};
|
|
212
204
|
}
|
|
213
205
|
function __read(o, n) {
|
|
214
206
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -307,19 +299,6 @@
|
|
|
307
299
|
function __importDefault(mod) {
|
|
308
300
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
309
301
|
}
|
|
310
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
311
|
-
if (!privateMap.has(receiver)) {
|
|
312
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
313
|
-
}
|
|
314
|
-
return privateMap.get(receiver);
|
|
315
|
-
}
|
|
316
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
317
|
-
if (!privateMap.has(receiver)) {
|
|
318
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
319
|
-
}
|
|
320
|
-
privateMap.set(receiver, value);
|
|
321
|
-
return value;
|
|
322
|
-
}
|
|
323
302
|
|
|
324
303
|
var LoaderComponent = /** @class */ (function () {
|
|
325
304
|
function LoaderComponent(parent) {
|
|
@@ -3863,7 +3842,7 @@
|
|
|
3863
3842
|
});
|
|
3864
3843
|
Object.defineProperty(SelectManyCheckboxComponent.prototype, "focused", {
|
|
3865
3844
|
get: function () {
|
|
3866
|
-
return
|
|
3845
|
+
return false;
|
|
3867
3846
|
},
|
|
3868
3847
|
enumerable: false,
|
|
3869
3848
|
configurable: true
|
|
@@ -4078,7 +4057,7 @@
|
|
|
4078
4057
|
});
|
|
4079
4058
|
Object.defineProperty(SelectRadioComponent.prototype, "focused", {
|
|
4080
4059
|
get: function () {
|
|
4081
|
-
return
|
|
4060
|
+
return false;
|
|
4082
4061
|
},
|
|
4083
4062
|
enumerable: false,
|
|
4084
4063
|
configurable: true
|
|
@@ -4505,7 +4484,13 @@
|
|
|
4505
4484
|
if (value && value.replace(/\D/g, '').length > 11) {
|
|
4506
4485
|
return doApplyMask(value, '##.###.###/####-##');
|
|
4507
4486
|
}
|
|
4508
|
-
return
|
|
4487
|
+
return doApplyMask(value, '###.###.###-##');
|
|
4488
|
+
};
|
|
4489
|
+
CpfCnpjModelDirective.prototype.removeMask = function (value) {
|
|
4490
|
+
if (value && value.replace(/\D/g, '').length > 11) {
|
|
4491
|
+
return doRemoveMask(value, '##.###.###/####-##');
|
|
4492
|
+
}
|
|
4493
|
+
return doRemoveMask(value, '###.###.###-##');
|
|
4509
4494
|
};
|
|
4510
4495
|
return CpfCnpjModelDirective;
|
|
4511
4496
|
}(MaskedModelDirective));
|
|
@@ -4631,7 +4616,7 @@
|
|
|
4631
4616
|
}
|
|
4632
4617
|
var maskedValue = '';
|
|
4633
4618
|
var valorRestante = value.replace(/\D/g, '').replace(/^0+/, '');
|
|
4634
|
-
while (valorRestante.length <
|
|
4619
|
+
while (valorRestante.length < (mascara.length - mascara.indexOf(',')) + 1) {
|
|
4635
4620
|
valorRestante = '0' + valorRestante;
|
|
4636
4621
|
}
|
|
4637
4622
|
for (var i = mascara.length - 1; i >= 0 && valorRestante.length; i--) {
|
|
@@ -4661,10 +4646,10 @@
|
|
|
4661
4646
|
var MonetarioModelDirective = /** @class */ (function () {
|
|
4662
4647
|
function MonetarioModelDirective(ngControl) {
|
|
4663
4648
|
this.ngControl = ngControl;
|
|
4664
|
-
this
|
|
4665
|
-
this
|
|
4666
|
-
this
|
|
4667
|
-
this
|
|
4649
|
+
this.$mascara = '###.###.###.###.###,##';
|
|
4650
|
+
this.$symbol = 'R$';
|
|
4651
|
+
this.$thousandDivider = '.';
|
|
4652
|
+
this.$fractionalDivider = ',';
|
|
4668
4653
|
this.value = null;
|
|
4669
4654
|
this.displayValue = null;
|
|
4670
4655
|
this.mclModelChange = new i0.EventEmitter();
|
|
@@ -4680,6 +4665,46 @@
|
|
|
4680
4665
|
return this.keepMask ? displayValue :
|
|
4681
4666
|
monetarioMask(displayValue, '', '', '.', this.mascara);
|
|
4682
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
|
+
});
|
|
4683
4708
|
Object.defineProperty(MonetarioModelDirective.prototype, "maskValue", {
|
|
4684
4709
|
set: function (value) {
|
|
4685
4710
|
if (value !== this.value) {
|
|
@@ -4729,7 +4754,7 @@
|
|
|
4729
4754
|
value = null;
|
|
4730
4755
|
}
|
|
4731
4756
|
else {
|
|
4732
|
-
displayValue = monetarioMask(newValue);
|
|
4757
|
+
displayValue = monetarioMask(newValue, this.symbol, this.thousandDivider, this.fractionalDivider, this.mascara);
|
|
4733
4758
|
value = this.processValue(displayValue);
|
|
4734
4759
|
}
|
|
4735
4760
|
this.displayValue = displayValue;
|
|
@@ -4752,12 +4777,12 @@
|
|
|
4752
4777
|
{ type: forms.NgControl }
|
|
4753
4778
|
]; };
|
|
4754
4779
|
MonetarioModelDirective.propDecorators = {
|
|
4755
|
-
|
|
4780
|
+
keepMask: [{ type: i0.Input }],
|
|
4781
|
+
mclModelChange: [{ type: i0.Output }],
|
|
4756
4782
|
symbol: [{ type: i0.Input }],
|
|
4757
4783
|
thousandDivider: [{ type: i0.Input }],
|
|
4758
4784
|
fractionalDivider: [{ type: i0.Input }],
|
|
4759
|
-
|
|
4760
|
-
mclModelChange: [{ type: i0.Output }],
|
|
4785
|
+
mascara: [{ type: i0.Input }],
|
|
4761
4786
|
maskValue: [{ type: i0.Input, args: ['mclModel',] }],
|
|
4762
4787
|
onInput: [{ type: i0.HostListener, args: ['input', ['$event'],] }]
|
|
4763
4788
|
};
|