@seniorsistemas/angular-components 17.9.2 → 17.9.4
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/seniorsistemas-angular-components.umd.js +202 -43
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/dynamic-form/components/fields/currency/currency-field.component.d.ts +3 -1
- package/components/dynamic-form/configurations/fields/currency-field.d.ts +1 -0
- package/components/tooltip/tooltip.directive.d.ts +1 -2
- package/esm2015/components/dynamic-form/components/fields/currency/currency-field.component.js +7 -4
- package/esm2015/components/dynamic-form/configurations/fields/currency-field.js +2 -1
- package/esm2015/components/dynamic-form/configurations/fields/decimal-field.js +2 -3
- package/esm2015/components/navigation-button/navigation-button.component.js +5 -1
- package/esm2015/components/tooltip/tooltip.directive.js +7 -14
- package/esm2015/utils/currency/currency.service.js +162 -2
- package/esm5/components/dynamic-form/components/fields/currency/currency-field.component.js +7 -4
- package/esm5/components/dynamic-form/configurations/fields/currency-field.js +2 -1
- package/esm5/components/dynamic-form/configurations/fields/decimal-field.js +2 -3
- package/esm5/components/navigation-button/navigation-button.component.js +5 -1
- package/esm5/components/tooltip/tooltip.directive.js +7 -14
- package/esm5/utils/currency/currency.service.js +162 -2
- package/fesm2015/seniorsistemas-angular-components.js +200 -41
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +202 -43
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
- package/utils/currency/currency.service.d.ts +634 -0
|
@@ -495,14 +495,13 @@ var TooltipDirective = /** @class */ (function () {
|
|
|
495
495
|
TooltipDirective.prototype.updateTooltipVisibilityWhenFocusOnInput = function () {
|
|
496
496
|
var _this = this;
|
|
497
497
|
if (this.focusedInputRef) {
|
|
498
|
-
var
|
|
499
|
-
|
|
500
|
-
this.renderer.listen(inputFocus, 'focus', function () {
|
|
498
|
+
var icon_1 = this.getIconFromFocusedInput();
|
|
499
|
+
this.renderer.listen(this.focusedInputRef, 'focus', function () {
|
|
501
500
|
if (icon_1 && _this.isMatchingTooltip(icon_1)) {
|
|
502
501
|
_this.createTootipByFocus(icon_1);
|
|
503
502
|
}
|
|
504
503
|
});
|
|
505
|
-
this.renderer.listen(
|
|
504
|
+
this.renderer.listen(this.focusedInputRef, 'blur', function () {
|
|
506
505
|
if (icon_1 && _this.isMatchingTooltip(icon_1)) {
|
|
507
506
|
_this.removeTooltip(icon_1);
|
|
508
507
|
_this.destroy();
|
|
@@ -512,16 +511,10 @@ var TooltipDirective = /** @class */ (function () {
|
|
|
512
511
|
};
|
|
513
512
|
/**
|
|
514
513
|
* Obtém o elemento do ícone associado ao label do input em focus.
|
|
515
|
-
* @
|
|
516
|
-
* @returns O ícone do input em focus ou null.
|
|
514
|
+
* @returns O ícone do input em focus.
|
|
517
515
|
*/
|
|
518
|
-
TooltipDirective.prototype.getIconFromFocusedInput = function (
|
|
519
|
-
|
|
520
|
-
if (label) {
|
|
521
|
-
var icon = label.nextElementSibling;
|
|
522
|
-
return (icon === null || icon === void 0 ? void 0 : icon.classList.contains('info-sign__icon')) ? icon : null;
|
|
523
|
-
}
|
|
524
|
-
return null;
|
|
516
|
+
TooltipDirective.prototype.getIconFromFocusedInput = function () {
|
|
517
|
+
return this.elementRef.nativeElement;
|
|
525
518
|
};
|
|
526
519
|
/**
|
|
527
520
|
* Verifica se o ícone tem o tooltip correspondente ao atual.
|
|
@@ -4872,11 +4865,10 @@ var NumberField = /** @class */ (function (_super) {
|
|
|
4872
4865
|
var DecimalField = /** @class */ (function (_super) {
|
|
4873
4866
|
__extends(DecimalField, _super);
|
|
4874
4867
|
function DecimalField(config) {
|
|
4875
|
-
var _a;
|
|
4876
4868
|
var _this = _super.call(this, config) || this;
|
|
4877
4869
|
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
4878
4870
|
_this.alignTo = config.alignTo || NumberAlignmentOption.RIGHT;
|
|
4879
|
-
_this.scale = typeof config.scale === "function" ? config.scale() :
|
|
4871
|
+
_this.scale = typeof config.scale === "function" ? config.scale() : config.scale;
|
|
4880
4872
|
return _this;
|
|
4881
4873
|
}
|
|
4882
4874
|
return DecimalField;
|
|
@@ -4889,6 +4881,7 @@ var CurrencyField = /** @class */ (function (_super) {
|
|
|
4889
4881
|
__extends(CurrencyField, _super);
|
|
4890
4882
|
function CurrencyField(config) {
|
|
4891
4883
|
var _this = _super.call(this, config) || this;
|
|
4884
|
+
_this.currency = config['currency'];
|
|
4892
4885
|
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
4893
4886
|
return _this;
|
|
4894
4887
|
}
|
|
@@ -9792,14 +9785,200 @@ var BignumberFieldComponent = /** @class */ (function (_super) {
|
|
|
9792
9785
|
return BignumberFieldComponent;
|
|
9793
9786
|
}(BaseFieldComponent));
|
|
9794
9787
|
|
|
9788
|
+
var CurrencyService = /** @class */ (function () {
|
|
9789
|
+
function CurrencyService(localeService) {
|
|
9790
|
+
this.localeService = localeService;
|
|
9791
|
+
this.currencies = {
|
|
9792
|
+
KHR: { precision: 12, scale: 2 },
|
|
9793
|
+
SSP: { precision: 12, scale: 2 },
|
|
9794
|
+
XCD: { precision: 12, scale: 2 },
|
|
9795
|
+
EGP: { precision: 12, scale: 2 },
|
|
9796
|
+
KWD: { precision: 12, scale: 3 },
|
|
9797
|
+
YER: { precision: 12, scale: 2 },
|
|
9798
|
+
HUF: { precision: 12, scale: 2 },
|
|
9799
|
+
MXN: { precision: 12, scale: 2 },
|
|
9800
|
+
MYR: { precision: 12, scale: 2 },
|
|
9801
|
+
ZWL: { precision: 12, scale: 2 },
|
|
9802
|
+
MUR: { precision: 12, scale: 2 },
|
|
9803
|
+
DKK: { precision: 12, scale: 2 },
|
|
9804
|
+
NOK: { precision: 12, scale: 2 },
|
|
9805
|
+
DJF: { precision: 12, scale: 0 },
|
|
9806
|
+
CRC: { precision: 12, scale: 2 },
|
|
9807
|
+
BND: { precision: 12, scale: 2 },
|
|
9808
|
+
NAD: { precision: 12, scale: 2 },
|
|
9809
|
+
MKD: { precision: 12, scale: 2 },
|
|
9810
|
+
CDF: { precision: 12, scale: 2 },
|
|
9811
|
+
GNF: { precision: 12, scale: 0 },
|
|
9812
|
+
EUR: { precision: 12, scale: 2 },
|
|
9813
|
+
OMR: { precision: 12, scale: 3 },
|
|
9814
|
+
CLP: { precision: 12, scale: 0 },
|
|
9815
|
+
BSD: { precision: 12, scale: 2 },
|
|
9816
|
+
TOP: { precision: 12, scale: 2 },
|
|
9817
|
+
IRR: { precision: 12, scale: 2 },
|
|
9818
|
+
BGN: { precision: 12, scale: 2 },
|
|
9819
|
+
BZD: { precision: 12, scale: 2 },
|
|
9820
|
+
CNY: { precision: 12, scale: 2 },
|
|
9821
|
+
FJD: { precision: 12, scale: 2 },
|
|
9822
|
+
SRD: { precision: 12, scale: 2 },
|
|
9823
|
+
SOS: { precision: 12, scale: 2 },
|
|
9824
|
+
GYD: { precision: 12, scale: 2 },
|
|
9825
|
+
VUV: { precision: 12, scale: 0 },
|
|
9826
|
+
MWK: { precision: 12, scale: 2 },
|
|
9827
|
+
MRU: { precision: 12, scale: 2 },
|
|
9828
|
+
LSL: { precision: 12, scale: 2 },
|
|
9829
|
+
ERN: { precision: 12, scale: 2 },
|
|
9830
|
+
BMD: { precision: 12, scale: 2 },
|
|
9831
|
+
WST: { precision: 12, scale: 2 },
|
|
9832
|
+
LRD: { precision: 12, scale: 2 },
|
|
9833
|
+
GMD: { precision: 12, scale: 2 },
|
|
9834
|
+
ARS: { precision: 12, scale: 2 },
|
|
9835
|
+
ZAR: { precision: 12, scale: 2 },
|
|
9836
|
+
RSD: { precision: 12, scale: 2 },
|
|
9837
|
+
MDL: { precision: 12, scale: 2 },
|
|
9838
|
+
USD: { precision: 12, scale: 2 },
|
|
9839
|
+
QAR: { precision: 12, scale: 2 },
|
|
9840
|
+
HRK: { precision: 12, scale: 2 },
|
|
9841
|
+
GIP: { precision: 12, scale: 2 },
|
|
9842
|
+
NPR: { precision: 12, scale: 2 },
|
|
9843
|
+
"002": { precision: 9, scale: 4 },
|
|
9844
|
+
PLN: { precision: 12, scale: 2 },
|
|
9845
|
+
MAD: { precision: 12, scale: 2 },
|
|
9846
|
+
BAM: { precision: 12, scale: 2 },
|
|
9847
|
+
BTN: { precision: 12, scale: 2 },
|
|
9848
|
+
BBD: { precision: 12, scale: 2 },
|
|
9849
|
+
SHP: { precision: 12, scale: 2 },
|
|
9850
|
+
LKR: { precision: 12, scale: 2 },
|
|
9851
|
+
KPW: { precision: 12, scale: 2 },
|
|
9852
|
+
LAK: { precision: 12, scale: 2 },
|
|
9853
|
+
SZL: { precision: 12, scale: 2 },
|
|
9854
|
+
PHP: { precision: 12, scale: 2 },
|
|
9855
|
+
RWF: { precision: 12, scale: 0 },
|
|
9856
|
+
ISK: { precision: 12, scale: 0 },
|
|
9857
|
+
XOF: { precision: 12, scale: 0 },
|
|
9858
|
+
AUD: { precision: 12, scale: 2 },
|
|
9859
|
+
NGN: { precision: 12, scale: 2 },
|
|
9860
|
+
KGS: { precision: 12, scale: 2 },
|
|
9861
|
+
KYD: { precision: 12, scale: 2 },
|
|
9862
|
+
PGK: { precision: 12, scale: 2 },
|
|
9863
|
+
DZD: { precision: 12, scale: 2 },
|
|
9864
|
+
XAF: { precision: 12, scale: 0 },
|
|
9865
|
+
PEN: { precision: 12, scale: 2 },
|
|
9866
|
+
JPY: { precision: 12, scale: 0 },
|
|
9867
|
+
SBD: { precision: 12, scale: 2 },
|
|
9868
|
+
UGX: { precision: 12, scale: 0 },
|
|
9869
|
+
AMD: { precision: 12, scale: 2 },
|
|
9870
|
+
AED: { precision: 12, scale: 2 },
|
|
9871
|
+
ALL: { precision: 12, scale: 2 },
|
|
9872
|
+
XPF: { precision: 12, scale: 0 },
|
|
9873
|
+
AFN: { precision: 12, scale: 2 },
|
|
9874
|
+
RON: { precision: 12, scale: 2 },
|
|
9875
|
+
TND: { precision: 12, scale: 3 },
|
|
9876
|
+
NZD: { precision: 12, scale: 2 },
|
|
9877
|
+
JOD: { precision: 12, scale: 3 },
|
|
9878
|
+
VND: { precision: 12, scale: 0 },
|
|
9879
|
+
ETB: { precision: 12, scale: 2 },
|
|
9880
|
+
PYG: { precision: 12, scale: 0 },
|
|
9881
|
+
JMD: { precision: 12, scale: 2 },
|
|
9882
|
+
KES: { precision: 12, scale: 2 },
|
|
9883
|
+
IDR: { precision: 12, scale: 2 },
|
|
9884
|
+
HKD: { precision: 12, scale: 2 },
|
|
9885
|
+
BDT: { precision: 12, scale: 2 },
|
|
9886
|
+
GBP: { precision: 12, scale: 2 },
|
|
9887
|
+
AOA: { precision: 12, scale: 2 },
|
|
9888
|
+
PKR: { precision: 12, scale: 2 },
|
|
9889
|
+
TRY: { precision: 12, scale: 2 },
|
|
9890
|
+
SLL: { precision: 12, scale: 2 },
|
|
9891
|
+
CVE: { precision: 12, scale: 2 },
|
|
9892
|
+
LYD: { precision: 12, scale: 3 },
|
|
9893
|
+
ILS: { precision: 12, scale: 2 },
|
|
9894
|
+
UZS: { precision: 12, scale: 2 },
|
|
9895
|
+
CHF: { precision: 12, scale: 2 },
|
|
9896
|
+
SVC: { precision: 12, scale: 2 },
|
|
9897
|
+
BRL: { precision: 12, scale: 2 },
|
|
9898
|
+
GHS: { precision: 12, scale: 2 },
|
|
9899
|
+
CUP: { precision: 12, scale: 2 },
|
|
9900
|
+
FKP: { precision: 12, scale: 2 },
|
|
9901
|
+
NIO: { precision: 12, scale: 2 },
|
|
9902
|
+
GEL: { precision: 12, scale: 2 },
|
|
9903
|
+
TTD: { precision: 12, scale: 2 },
|
|
9904
|
+
AAA: { precision: 1, scale: 1 },
|
|
9905
|
+
COP: { precision: 12, scale: 2 },
|
|
9906
|
+
MGA: { precision: 12, scale: 2 },
|
|
9907
|
+
INR: { precision: 12, scale: 2 },
|
|
9908
|
+
KRW: { precision: 12, scale: 0 },
|
|
9909
|
+
HNL: { precision: 12, scale: 2 },
|
|
9910
|
+
MMK: { precision: 12, scale: 2 },
|
|
9911
|
+
TZS: { precision: 12, scale: 2 },
|
|
9912
|
+
THB: { precision: 12, scale: 2 },
|
|
9913
|
+
TMT: { precision: 12, scale: 2 },
|
|
9914
|
+
SAR: { precision: 12, scale: 2 },
|
|
9915
|
+
UYU: { precision: 12, scale: 2 },
|
|
9916
|
+
BIF: { precision: 12, scale: 0 },
|
|
9917
|
+
MVR: { precision: 12, scale: 2 },
|
|
9918
|
+
RUB: { precision: 12, scale: 2 },
|
|
9919
|
+
GTQ: { precision: 12, scale: 2 },
|
|
9920
|
+
SCR: { precision: 12, scale: 2 },
|
|
9921
|
+
IQD: { precision: 12, scale: 3 },
|
|
9922
|
+
UAH: { precision: 12, scale: 2 },
|
|
9923
|
+
BYN: { precision: 12, scale: 2 },
|
|
9924
|
+
VES: { precision: 12, scale: 2 },
|
|
9925
|
+
BOB: { precision: 12, scale: 2 },
|
|
9926
|
+
SGD: { precision: 12, scale: 2 },
|
|
9927
|
+
ZMW: { precision: 12, scale: 2 },
|
|
9928
|
+
CZK: { precision: 12, scale: 2 },
|
|
9929
|
+
TJS: { precision: 12, scale: 2 },
|
|
9930
|
+
DOP: { precision: 12, scale: 2 },
|
|
9931
|
+
AZN: { precision: 12, scale: 2 },
|
|
9932
|
+
PAB: { precision: 12, scale: 2 },
|
|
9933
|
+
STN: { precision: 12, scale: 2 },
|
|
9934
|
+
SDG: { precision: 12, scale: 2 },
|
|
9935
|
+
BWP: { precision: 12, scale: 2 },
|
|
9936
|
+
BHD: { precision: 12, scale: 3 },
|
|
9937
|
+
CAD: { precision: 12, scale: 2 },
|
|
9938
|
+
MNT: { precision: 12, scale: 2 },
|
|
9939
|
+
MOP: { precision: 12, scale: 2 },
|
|
9940
|
+
HTG: { precision: 12, scale: 2 },
|
|
9941
|
+
KZT: { precision: 12, scale: 2 },
|
|
9942
|
+
LBP: { precision: 12, scale: 2 },
|
|
9943
|
+
SYP: { precision: 12, scale: 2 },
|
|
9944
|
+
TWD: { precision: 12, scale: 2 },
|
|
9945
|
+
MZN: { precision: 12, scale: 2 },
|
|
9946
|
+
ANG: { precision: 12, scale: 2 },
|
|
9947
|
+
SEK: { precision: 12, scale: 2 },
|
|
9948
|
+
KMF: { precision: 12, scale: 0 },
|
|
9949
|
+
AWG: { precision: 12, scale: 2 },
|
|
9950
|
+
};
|
|
9951
|
+
}
|
|
9952
|
+
CurrencyService.prototype.getCurrencySymbol = function (_a) {
|
|
9953
|
+
var currency = _a.currency;
|
|
9954
|
+
var _b, _c;
|
|
9955
|
+
var numberFormat = new Intl.NumberFormat(this.localeService.getLocaleOptions().locale, {
|
|
9956
|
+
style: "currency",
|
|
9957
|
+
currency: currency !== null && currency !== void 0 ? currency : "BRL",
|
|
9958
|
+
currencyDisplay: "narrowSymbol",
|
|
9959
|
+
maximumFractionDigits: 5,
|
|
9960
|
+
});
|
|
9961
|
+
return (_c = (_b = numberFormat.formatToParts(1).find(function (x) { return x.type === "currency"; })) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : "";
|
|
9962
|
+
};
|
|
9963
|
+
CurrencyService.ctorParameters = function () { return [
|
|
9964
|
+
{ type: LocaleService }
|
|
9965
|
+
]; };
|
|
9966
|
+
CurrencyService.ɵprov = ɵɵdefineInjectable({ factory: function CurrencyService_Factory() { return new CurrencyService(ɵɵinject(LocaleService)); }, token: CurrencyService, providedIn: "root" });
|
|
9967
|
+
CurrencyService = __decorate([
|
|
9968
|
+
Injectable({ providedIn: "root" })
|
|
9969
|
+
], CurrencyService);
|
|
9970
|
+
return CurrencyService;
|
|
9971
|
+
}());
|
|
9972
|
+
|
|
9795
9973
|
/**
|
|
9796
9974
|
* @deprecated Should use bignumber instead
|
|
9797
9975
|
*/
|
|
9798
9976
|
var CurrencyFieldComponent = /** @class */ (function (_super) {
|
|
9799
9977
|
__extends(CurrencyFieldComponent, _super);
|
|
9800
|
-
function CurrencyFieldComponent(localeService) {
|
|
9978
|
+
function CurrencyFieldComponent(localeService, currencyService) {
|
|
9801
9979
|
var _this = _super.call(this) || this;
|
|
9802
9980
|
_this.localeService = localeService;
|
|
9981
|
+
_this.currencyService = currencyService;
|
|
9803
9982
|
return _this;
|
|
9804
9983
|
}
|
|
9805
9984
|
CurrencyFieldComponent.prototype.ngOnInit = function () {
|
|
@@ -9834,7 +10013,8 @@ var CurrencyFieldComponent = /** @class */ (function (_super) {
|
|
|
9834
10013
|
});
|
|
9835
10014
|
};
|
|
9836
10015
|
CurrencyFieldComponent.ctorParameters = function () { return [
|
|
9837
|
-
{ type: LocaleService }
|
|
10016
|
+
{ type: LocaleService },
|
|
10017
|
+
{ type: CurrencyService }
|
|
9838
10018
|
]; };
|
|
9839
10019
|
__decorate([
|
|
9840
10020
|
Input()
|
|
@@ -9844,7 +10024,7 @@ var CurrencyFieldComponent = /** @class */ (function (_super) {
|
|
|
9844
10024
|
], CurrencyFieldComponent.prototype, "formControl", void 0);
|
|
9845
10025
|
CurrencyFieldComponent = __decorate([
|
|
9846
10026
|
Component({
|
|
9847
|
-
template: "<div class=\"ui-inputgroup\">\n <span\n *ngIf=\"field.numberLocaleOptions
|
|
10027
|
+
template: "<div class=\"ui-inputgroup\">\n <span\n *ngIf=\"field.currency || field.numberLocaleOptions?.currencySymbol\"\n class=\"ui-inputgroup-addon\"\n >\n {{\n field.currency\n ? currencyService.getCurrencySymbol({\n currency: field.currency()\n })\n : field.numberLocaleOptions.currencySymbol\n }}\n </span>\n\n <input\n *ngIf=\"!field.mask\"\n type=\"text\"\n [id]=\"field.id || field.name\"\n [name]=\"field.name\"\n [formControl]=\"formControl\"\n sNumberInput\n [precision]=\"\n field.precision\n ? isFunction(field.precision)\n ? trigger(field.precision)\n : field.precision\n : field.currency && field.currency()\n ? currencyService.currencies[field.currency()].precision\n : 15\n \"\n [scale]=\"\n field.scale\n ? isFunction(field.scale)\n ? trigger(field.scale)\n : field.scale\n : field.currency && field.currency()\n ? currencyService.currencies[field.currency()].scale\n : 0\n \"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [alignTo]=\"field.alignTo\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"field.onFocus ? field.onFocus($event) : null\"\n />\n\n <p-inputMask\n *ngIf=\"field.mask\"\n type=\"text\"\n [inputId]=\"field.id || field.name\"\n [name]=\"field.name\"\n [formControl]=\"formControl\"\n [mask]=\"field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onComplete)=\"field.onComplete ? field.onComplete($event) : null\"\n (onInput)=\"field.onInput ? field.onInput($event) : null\"\n ></p-inputMask>\n</div>\n"
|
|
9848
10028
|
})
|
|
9849
10029
|
], CurrencyFieldComponent);
|
|
9850
10030
|
return CurrencyFieldComponent;
|
|
@@ -14904,6 +15084,10 @@ var NavigationButtonComponent = /** @class */ (function () {
|
|
|
14904
15084
|
this._value = this.defaultValue;
|
|
14905
15085
|
var index = this.steps.findIndex(function (step) { return step.value === _this._value; });
|
|
14906
15086
|
this.currentIndex = index !== -1 ? index : 0;
|
|
15087
|
+
this.stepChanged.emit({
|
|
15088
|
+
previous: undefined,
|
|
15089
|
+
current: this.steps[this.currentIndex],
|
|
15090
|
+
});
|
|
14907
15091
|
this.changeDetectorRef.detectChanges();
|
|
14908
15092
|
}
|
|
14909
15093
|
};
|
|
@@ -17984,31 +18168,6 @@ var WorkspaceSwitchModule = /** @class */ (function () {
|
|
|
17984
18168
|
return WorkspaceSwitchModule;
|
|
17985
18169
|
}());
|
|
17986
18170
|
|
|
17987
|
-
var CurrencyService = /** @class */ (function () {
|
|
17988
|
-
function CurrencyService(localeService) {
|
|
17989
|
-
this.localeService = localeService;
|
|
17990
|
-
}
|
|
17991
|
-
CurrencyService.prototype.getCurrencySymbol = function (_a) {
|
|
17992
|
-
var currency = _a.currency;
|
|
17993
|
-
var _b, _c;
|
|
17994
|
-
var numberFormat = new Intl.NumberFormat(this.localeService.getLocaleOptions().locale, {
|
|
17995
|
-
style: "currency",
|
|
17996
|
-
currency: currency !== null && currency !== void 0 ? currency : "BRL",
|
|
17997
|
-
currencyDisplay: 'narrowSymbol',
|
|
17998
|
-
maximumFractionDigits: 5,
|
|
17999
|
-
});
|
|
18000
|
-
return (_c = (_b = numberFormat.formatToParts(1).find(function (x) { return x.type === "currency"; })) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : "";
|
|
18001
|
-
};
|
|
18002
|
-
CurrencyService.ctorParameters = function () { return [
|
|
18003
|
-
{ type: LocaleService }
|
|
18004
|
-
]; };
|
|
18005
|
-
CurrencyService.ɵprov = ɵɵdefineInjectable({ factory: function CurrencyService_Factory() { return new CurrencyService(ɵɵinject(LocaleService)); }, token: CurrencyService, providedIn: "root" });
|
|
18006
|
-
CurrencyService = __decorate([
|
|
18007
|
-
Injectable({ providedIn: "root" })
|
|
18008
|
-
], CurrencyService);
|
|
18009
|
-
return CurrencyService;
|
|
18010
|
-
}());
|
|
18011
|
-
|
|
18012
18171
|
var fallback = {
|
|
18013
18172
|
"platform.angular_components.drag_your_photo_or": "Arraste sua foto ou",
|
|
18014
18173
|
"platform.angular_components.select_a_file": "selecione um arquivo",
|