@main-class/componentes 1.15.5 → 1.16.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.
- package/bundles/main-class-componentes.umd.js +73 -54
- 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/monetario/monetario-mask.js +2 -2
- package/esm2015/misc/monetario/monetario-model.directive.js +35 -11
- package/fesm2015/main-class-componentes.js +37 -13
- package/fesm2015/main-class-componentes.js.map +1 -1
- 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
|
|
@@ -4637,7 +4616,7 @@
|
|
|
4637
4616
|
}
|
|
4638
4617
|
var maskedValue = '';
|
|
4639
4618
|
var valorRestante = value.replace(/\D/g, '').replace(/^0+/, '');
|
|
4640
|
-
while (valorRestante.length <
|
|
4619
|
+
while (valorRestante.length < (mascara.length - mascara.indexOf(',')) + 1) {
|
|
4641
4620
|
valorRestante = '0' + valorRestante;
|
|
4642
4621
|
}
|
|
4643
4622
|
for (var i = mascara.length - 1; i >= 0 && valorRestante.length; i--) {
|
|
@@ -4667,10 +4646,10 @@
|
|
|
4667
4646
|
var MonetarioModelDirective = /** @class */ (function () {
|
|
4668
4647
|
function MonetarioModelDirective(ngControl) {
|
|
4669
4648
|
this.ngControl = ngControl;
|
|
4670
|
-
this
|
|
4671
|
-
this
|
|
4672
|
-
this
|
|
4673
|
-
this
|
|
4649
|
+
this.$mascara = '###.###.###.###.###,##';
|
|
4650
|
+
this.$symbol = 'R$';
|
|
4651
|
+
this.$thousandDivider = '.';
|
|
4652
|
+
this.$fractionalDivider = ',';
|
|
4674
4653
|
this.value = null;
|
|
4675
4654
|
this.displayValue = null;
|
|
4676
4655
|
this.mclModelChange = new i0.EventEmitter();
|
|
@@ -4684,8 +4663,48 @@
|
|
|
4684
4663
|
};
|
|
4685
4664
|
MonetarioModelDirective.prototype.processValue = function (displayValue) {
|
|
4686
4665
|
return this.keepMask ? displayValue :
|
|
4687
|
-
monetarioMask(displayValue, '', '', '.', this
|
|
4666
|
+
monetarioMask(displayValue, '', '', '.', this.$mascara);
|
|
4688
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
|
+
});
|
|
4689
4708
|
Object.defineProperty(MonetarioModelDirective.prototype, "maskValue", {
|
|
4690
4709
|
set: function (value) {
|
|
4691
4710
|
if (value !== this.value) {
|
|
@@ -4712,7 +4731,7 @@
|
|
|
4712
4731
|
var value = this.value;
|
|
4713
4732
|
var displayValue = null;
|
|
4714
4733
|
if (value != null) {
|
|
4715
|
-
displayValue = monetarioMask(value, this
|
|
4734
|
+
displayValue = monetarioMask(value, this.$symbol, this.$thousandDivider, this.$fractionalDivider, this.$mascara);
|
|
4716
4735
|
value = this.processValue(displayValue);
|
|
4717
4736
|
}
|
|
4718
4737
|
this.delay().subscribe(function () {
|
|
@@ -4735,7 +4754,7 @@
|
|
|
4735
4754
|
value = null;
|
|
4736
4755
|
}
|
|
4737
4756
|
else {
|
|
4738
|
-
displayValue = monetarioMask(newValue);
|
|
4757
|
+
displayValue = monetarioMask(newValue, this.$symbol, this.$thousandDivider, this.$fractionalDivider, this.$mascara);
|
|
4739
4758
|
value = this.processValue(displayValue);
|
|
4740
4759
|
}
|
|
4741
4760
|
this.displayValue = displayValue;
|
|
@@ -4758,12 +4777,12 @@
|
|
|
4758
4777
|
{ type: forms.NgControl }
|
|
4759
4778
|
]; };
|
|
4760
4779
|
MonetarioModelDirective.propDecorators = {
|
|
4761
|
-
|
|
4780
|
+
keepMask: [{ type: i0.Input }],
|
|
4781
|
+
mclModelChange: [{ type: i0.Output }],
|
|
4762
4782
|
symbol: [{ type: i0.Input }],
|
|
4763
4783
|
thousandDivider: [{ type: i0.Input }],
|
|
4764
4784
|
fractionalDivider: [{ type: i0.Input }],
|
|
4765
|
-
|
|
4766
|
-
mclModelChange: [{ type: i0.Output }],
|
|
4785
|
+
mascara: [{ type: i0.Input }],
|
|
4767
4786
|
maskValue: [{ type: i0.Input, args: ['mclModel',] }],
|
|
4768
4787
|
onInput: [{ type: i0.HostListener, args: ['input', ['$event'],] }]
|
|
4769
4788
|
};
|