@seniorsistemas/angular-components 17.16.8 → 17.16.10
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 +1191 -1193
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/dynamic-form/configurations/fields/number-field.d.ts +3 -0
- package/esm2015/components/custom-fields/custom-fields.component.js +1 -1
- package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +1 -1
- package/esm2015/components/dynamic-form/configurations/fields/bignumber-field.js +5 -6
- package/esm2015/components/dynamic-form/configurations/fields/currency-field.js +2 -4
- package/esm2015/components/dynamic-form/configurations/fields/decimal-field.js +2 -4
- package/esm2015/components/dynamic-form/configurations/fields/number-field.js +2 -4
- package/esm2015/components/locale/locale.service.js +2 -1
- package/esm2015/components/locale/services/numeric.service.js +2 -2
- package/esm5/components/custom-fields/custom-fields.component.js +1 -1
- package/esm5/components/dynamic-form/components/lookup/lookup.component.js +1 -1
- package/esm5/components/dynamic-form/configurations/fields/bignumber-field.js +5 -6
- package/esm5/components/dynamic-form/configurations/fields/currency-field.js +2 -4
- package/esm5/components/dynamic-form/configurations/fields/decimal-field.js +2 -4
- package/esm5/components/dynamic-form/configurations/fields/number-field.js +2 -4
- package/esm5/components/locale/locale.service.js +2 -1
- package/esm5/components/locale/services/numeric.service.js +2 -2
- package/fesm2015/seniorsistemas-angular-components.js +920 -922
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +1192 -1194
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __values, __assign, __extends, __spread, __awaiter, __generator, __param, __rest, __read } from 'tslib';
|
|
2
|
-
import { EventEmitter, Input, Output, Component, ContentChildren, ViewChild, HostListener, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, Renderer2, Directive, KeyValueDiffers, HostBinding, ChangeDetectorRef, TemplateRef, InjectionToken, Inject,
|
|
2
|
+
import { EventEmitter, Input, Output, Component, ContentChildren, ViewChild, HostListener, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, Renderer2, Directive, KeyValueDiffers, HostBinding, ChangeDetectorRef, TemplateRef, InjectionToken, Inject, ViewEncapsulation, ViewContainerRef, Pipe, ɵɵinject, ContentChild, Optional, ViewChildren } from '@angular/core';
|
|
3
3
|
import { trigger, transition, style as style$7, animate, state, group, query, animateChild } from '@angular/animations';
|
|
4
4
|
import { Subject, of, from, ReplaySubject, throwError, fromEvent, forkJoin, pipe } from 'rxjs';
|
|
5
5
|
import { takeUntil, tap, map, switchMap, catchError, first, filter, take, delay, debounceTime, repeat, finalize } from 'rxjs/operators';
|
|
@@ -1076,6 +1076,7 @@ var LocaleService = /** @class */ (function () {
|
|
|
1076
1076
|
var _a;
|
|
1077
1077
|
var numberFormat = new Intl.NumberFormat(this.locale, {
|
|
1078
1078
|
style: "decimal",
|
|
1079
|
+
useGrouping: true,
|
|
1079
1080
|
minimumFractionDigits: 5,
|
|
1080
1081
|
maximumFractionDigits: 5,
|
|
1081
1082
|
});
|
|
@@ -5525,889 +5526,324 @@ var AutocompleteField = /** @class */ (function (_super) {
|
|
|
5525
5526
|
return AutocompleteField;
|
|
5526
5527
|
}(Field));
|
|
5527
5528
|
|
|
5528
|
-
var
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
};
|
|
5549
|
-
LocalizedBignumberPipe.ctorParameters = function () { return [
|
|
5550
|
-
{ type: LocaleService }
|
|
5551
|
-
]; };
|
|
5552
|
-
LocalizedBignumberPipe = __decorate([
|
|
5553
|
-
Pipe({
|
|
5554
|
-
name: "localizedBignumber",
|
|
5555
|
-
})
|
|
5556
|
-
], LocalizedBignumberPipe);
|
|
5557
|
-
return LocalizedBignumberPipe;
|
|
5558
|
-
}());
|
|
5559
|
-
|
|
5560
|
-
var LocalizedBignumberImpurePipe = /** @class */ (function (_super) {
|
|
5561
|
-
__extends(LocalizedBignumberImpurePipe, _super);
|
|
5562
|
-
function LocalizedBignumberImpurePipe() {
|
|
5563
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
5529
|
+
var BignumberField = /** @class */ (function (_super) {
|
|
5530
|
+
__extends(BignumberField, _super);
|
|
5531
|
+
function BignumberField(config) {
|
|
5532
|
+
var _a, _b, _c;
|
|
5533
|
+
var _this = _super.call(this, config) || this;
|
|
5534
|
+
_this.allowNegative = (_a = config.allowNegative) !== null && _a !== void 0 ? _a : true;
|
|
5535
|
+
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
5536
|
+
_this.browserAutocomplete = config.browserAutocomplete;
|
|
5537
|
+
_this.precision = config.precision;
|
|
5538
|
+
_this.scale = (_b = config.scale) !== null && _b !== void 0 ? _b : 2;
|
|
5539
|
+
_this.alignTo = _this.scale ? AlignmentOptions.RIGHT : AlignmentOptions.LEFT;
|
|
5540
|
+
_this.mask = config.mask;
|
|
5541
|
+
_this.leftAddon = config.leftAddon;
|
|
5542
|
+
_this.rightAddon = config.rightAddon;
|
|
5543
|
+
_this.onBlur = config.onBlur;
|
|
5544
|
+
_this.onFocus = config.onFocus;
|
|
5545
|
+
_this.onComplete = config.onComplete;
|
|
5546
|
+
_this.onInput = config.onInput;
|
|
5547
|
+
_this.autoClear = (_c = config.autoClear) !== null && _c !== void 0 ? _c : true;
|
|
5548
|
+
return _this;
|
|
5564
5549
|
}
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
};
|
|
5568
|
-
LocalizedBignumberImpurePipe = __decorate([
|
|
5569
|
-
Pipe({
|
|
5570
|
-
name: "localizedBignumberImpure",
|
|
5571
|
-
pure: false,
|
|
5572
|
-
})
|
|
5573
|
-
], LocalizedBignumberImpurePipe);
|
|
5574
|
-
return LocalizedBignumberImpurePipe;
|
|
5575
|
-
}(LocalizedBignumberPipe));
|
|
5550
|
+
return BignumberField;
|
|
5551
|
+
}(Field));
|
|
5576
5552
|
|
|
5577
|
-
var
|
|
5578
|
-
__extends(
|
|
5579
|
-
function
|
|
5580
|
-
if (config === void 0) { config = {}; }
|
|
5553
|
+
var BlobField = /** @class */ (function (_super) {
|
|
5554
|
+
__extends(BlobField, _super);
|
|
5555
|
+
function BlobField(config) {
|
|
5581
5556
|
var _this = _super.call(this, config) || this;
|
|
5582
|
-
_this.
|
|
5557
|
+
_this.accept = config.accept;
|
|
5558
|
+
_this.files = config.files || [];
|
|
5559
|
+
_this.chooseLabel = config.chooseLabel;
|
|
5560
|
+
_this.removeLabel = config.removeLabel;
|
|
5561
|
+
_this.cancelLabel = config.cancelLabel;
|
|
5562
|
+
_this.successTooltip = config.successTooltip;
|
|
5563
|
+
_this.multiple = config.multiple;
|
|
5564
|
+
_this.onUploadFile = config.onUploadFile;
|
|
5565
|
+
_this.onRemoveFile = config.onRemoveFile;
|
|
5566
|
+
_this.onCancelUpload = config.onCancelUpload;
|
|
5567
|
+
_this.onDownloadFile = config.onDownloadFile;
|
|
5568
|
+
_this.showFileUploadDate = config.showFileUploadDate;
|
|
5583
5569
|
return _this;
|
|
5584
5570
|
}
|
|
5585
|
-
return
|
|
5586
|
-
}(
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
this.
|
|
5571
|
+
return BlobField;
|
|
5572
|
+
}(Field));
|
|
5573
|
+
|
|
5574
|
+
var BooleanOptionsLabel = /** @class */ (function () {
|
|
5575
|
+
function BooleanOptionsLabel(config) {
|
|
5576
|
+
this.true = config.true;
|
|
5577
|
+
this.false = config.false;
|
|
5578
|
+
this.empty = config.empty;
|
|
5579
|
+
this.clear = config.clear;
|
|
5593
5580
|
}
|
|
5594
|
-
|
|
5595
|
-
if (!options) {
|
|
5596
|
-
options = new LocalizedCurrencyPipeOptions();
|
|
5597
|
-
}
|
|
5598
|
-
return value !== undefined && value !== null ? this.applyMask(value, options) : of(value);
|
|
5599
|
-
};
|
|
5600
|
-
LocalizedCurrencyPipe.prototype.applyMask = function (value, options) {
|
|
5601
|
-
return this.localeService.get().pipe(map(function (localeConfig) {
|
|
5602
|
-
var config = __assign(__assign({}, localeConfig.number), options);
|
|
5603
|
-
var scale = config.scale, currencySymbol = config.currencySymbol, thousandsSeparator = config.thousandsSeparator, decimalSeparator = config.decimalSeparator;
|
|
5604
|
-
var rawValue = Number(value).toFixed(scale);
|
|
5605
|
-
var onlyNumbers = rawValue.replace(/[^0-9]/g, "");
|
|
5606
|
-
var integerPart = onlyNumbers
|
|
5607
|
-
.slice(0, onlyNumbers.length - scale)
|
|
5608
|
-
.replace(/^0*/g, "")
|
|
5609
|
-
.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparator) || "0";
|
|
5610
|
-
var decimalPart = onlyNumbers.slice(onlyNumbers.length - scale);
|
|
5611
|
-
var newValue = scale ? integerPart + decimalSeparator + decimalPart : integerPart;
|
|
5612
|
-
var isZero = !Number(onlyNumbers);
|
|
5613
|
-
var operator = rawValue.includes("-") && !isZero ? "-" : "";
|
|
5614
|
-
return "" + operator + currencySymbol + newValue;
|
|
5615
|
-
}));
|
|
5616
|
-
};
|
|
5617
|
-
LocalizedCurrencyPipe.ctorParameters = function () { return [
|
|
5618
|
-
{ type: LocaleService }
|
|
5619
|
-
]; };
|
|
5620
|
-
LocalizedCurrencyPipe = __decorate([
|
|
5621
|
-
Pipe({
|
|
5622
|
-
name: "localizedCurrency",
|
|
5623
|
-
})
|
|
5624
|
-
], LocalizedCurrencyPipe);
|
|
5625
|
-
return LocalizedCurrencyPipe;
|
|
5581
|
+
return BooleanOptionsLabel;
|
|
5626
5582
|
}());
|
|
5583
|
+
var BooleanField = /** @class */ (function (_super) {
|
|
5584
|
+
__extends(BooleanField, _super);
|
|
5585
|
+
function BooleanField(config) {
|
|
5586
|
+
var _this = _super.call(this, config) || this;
|
|
5587
|
+
_this.verticalAlignment = config.verticalAlignment;
|
|
5588
|
+
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
5589
|
+
_this.representedBy = "radio";
|
|
5590
|
+
_this.onBlur = config.onBlur;
|
|
5591
|
+
_this.onFocus = config.onFocus;
|
|
5592
|
+
_this.onClick = config.onClick;
|
|
5593
|
+
return _this;
|
|
5594
|
+
}
|
|
5595
|
+
return BooleanField;
|
|
5596
|
+
}(Field));
|
|
5627
5597
|
|
|
5628
|
-
/**
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
var
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5598
|
+
var BooleanSwitchField = /** @class */ (function (_super) {
|
|
5599
|
+
__extends(BooleanSwitchField, _super);
|
|
5600
|
+
function BooleanSwitchField(config) {
|
|
5601
|
+
var _this = _super.call(this, config) || this;
|
|
5602
|
+
_this.onChange = config.onChange;
|
|
5603
|
+
if (config.optionsLabel) {
|
|
5604
|
+
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
5605
|
+
}
|
|
5606
|
+
_this.representedBy = "switch";
|
|
5607
|
+
return _this;
|
|
5635
5608
|
}
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
return _super.prototype.transform.call(this, value, options);
|
|
5639
|
-
};
|
|
5640
|
-
LocalizedCurrencyImpurePipe = __decorate([
|
|
5641
|
-
Pipe({
|
|
5642
|
-
name: "localizedCurrencyImpure",
|
|
5643
|
-
pure: false,
|
|
5644
|
-
})
|
|
5645
|
-
], LocalizedCurrencyImpurePipe);
|
|
5646
|
-
return LocalizedCurrencyImpurePipe;
|
|
5647
|
-
}(LocalizedCurrencyPipe));
|
|
5609
|
+
return BooleanSwitchField;
|
|
5610
|
+
}(Field));
|
|
5648
5611
|
|
|
5649
|
-
var
|
|
5650
|
-
|
|
5651
|
-
function
|
|
5652
|
-
|
|
5612
|
+
var CalendarField = /** @class */ (function (_super) {
|
|
5613
|
+
__extends(CalendarField, _super);
|
|
5614
|
+
function CalendarField(config) {
|
|
5615
|
+
var _this = _super.call(this, config) || this;
|
|
5616
|
+
_this.view = config.view || "date";
|
|
5617
|
+
_this.minDate = config.minDate;
|
|
5618
|
+
_this.maxDate = config.maxDate;
|
|
5619
|
+
_this.defaultDate = config.defaultDate;
|
|
5620
|
+
_this.appendTo = config.appendTo;
|
|
5621
|
+
_this.showOnFocus = typeof config.showOnFocus === "boolean" ? config.showOnFocus : true;
|
|
5622
|
+
_this.calendarLocaleOptions = config.calendarLocaleOptions;
|
|
5623
|
+
_this.onBlur = config.onBlur;
|
|
5624
|
+
_this.onFocus = config.onFocus;
|
|
5625
|
+
_this.onSelect = config.onSelect;
|
|
5626
|
+
_this.onInput = config.onInput;
|
|
5627
|
+
_this.onClose = config.onClose;
|
|
5628
|
+
_this.onTodayClick = config.onTodayClick;
|
|
5629
|
+
_this.onClearClick = config.onClearClick;
|
|
5630
|
+
_this.onMonthChange = config.onMonthChange;
|
|
5631
|
+
_this.onYearChange = config.onYearChange;
|
|
5632
|
+
_this.selectionMode = config.selectionMode || "single";
|
|
5633
|
+
_this.rangeSeparator = config.rangeSeparator || "-";
|
|
5634
|
+
_this.showSeconds = config.showSeconds;
|
|
5635
|
+
// Tornando true o padrão para showSeconds.
|
|
5636
|
+
if (_this.showSeconds === null || _this.showSeconds === undefined) {
|
|
5637
|
+
switch (_this.type) {
|
|
5638
|
+
case FieldType.DateTime:
|
|
5639
|
+
case FieldType.LocalDateTime:
|
|
5640
|
+
case FieldType.Time:
|
|
5641
|
+
_this.showSeconds = true;
|
|
5642
|
+
break;
|
|
5643
|
+
}
|
|
5644
|
+
}
|
|
5645
|
+
return _this;
|
|
5653
5646
|
}
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
return this.localeService.get().pipe(map(function () { return (value ? moment$1(value).format(format) : value); }));
|
|
5657
|
-
};
|
|
5658
|
-
LocalizedDatePipe.ctorParameters = function () { return [
|
|
5659
|
-
{ type: LocaleService }
|
|
5660
|
-
]; };
|
|
5661
|
-
LocalizedDatePipe = __decorate([
|
|
5662
|
-
Pipe({
|
|
5663
|
-
name: "localizedDate",
|
|
5664
|
-
})
|
|
5665
|
-
], LocalizedDatePipe);
|
|
5666
|
-
return LocalizedDatePipe;
|
|
5667
|
-
}());
|
|
5647
|
+
return CalendarField;
|
|
5648
|
+
}(Field));
|
|
5668
5649
|
|
|
5669
|
-
var
|
|
5670
|
-
__extends(
|
|
5671
|
-
function
|
|
5672
|
-
|
|
5650
|
+
var CheckboxField = /** @class */ (function (_super) {
|
|
5651
|
+
__extends(CheckboxField, _super);
|
|
5652
|
+
function CheckboxField(config) {
|
|
5653
|
+
var _this = _super.call(this, config) || this;
|
|
5654
|
+
_this.data = config.data;
|
|
5655
|
+
return _this;
|
|
5673
5656
|
}
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
name: "localizedDateImpure",
|
|
5677
|
-
pure: false,
|
|
5678
|
-
})
|
|
5679
|
-
], LocalizedDateImpurePipe);
|
|
5680
|
-
return LocalizedDateImpurePipe;
|
|
5681
|
-
}(LocalizedDatePipe));
|
|
5657
|
+
return CheckboxField;
|
|
5658
|
+
}(Field));
|
|
5682
5659
|
|
|
5683
|
-
/**
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
var
|
|
5687
|
-
|
|
5688
|
-
|
|
5660
|
+
var ChipsField = /** @class */ (function (_super) {
|
|
5661
|
+
__extends(ChipsField, _super);
|
|
5662
|
+
function ChipsField(config) {
|
|
5663
|
+
var _this = _super.call(this, config) || this;
|
|
5664
|
+
_this.showCopyButton = false;
|
|
5665
|
+
_this.keyFilter = config.keyFilter;
|
|
5666
|
+
_this.showCopyButton = config.showCopyButton;
|
|
5667
|
+
_this.separator = config.separator;
|
|
5668
|
+
_this.onAdd = config.onAdd;
|
|
5669
|
+
_this.onRemove = config.onRemove;
|
|
5670
|
+
_this.onChipClick = config.onChipClick;
|
|
5671
|
+
_this.onFocus = config.onFocus;
|
|
5672
|
+
_this.onBlur = config.onBlur;
|
|
5673
|
+
_this.onCopy = config.onCopy;
|
|
5674
|
+
return _this;
|
|
5689
5675
|
}
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
var numericValue = Number(value);
|
|
5693
|
-
if (!value && isNaN(numericValue))
|
|
5694
|
-
return;
|
|
5695
|
-
return new Intl.NumberFormat(locale, {
|
|
5696
|
-
minimumFractionDigits: minimumFractionDigits || 0,
|
|
5697
|
-
}).format(Number(value));
|
|
5698
|
-
}));
|
|
5699
|
-
};
|
|
5700
|
-
LocalizedNumberPipe.ctorParameters = function () { return [
|
|
5701
|
-
{ type: LocaleService }
|
|
5702
|
-
]; };
|
|
5703
|
-
LocalizedNumberPipe = __decorate([
|
|
5704
|
-
Pipe({ name: "localizedNumber" })
|
|
5705
|
-
], LocalizedNumberPipe);
|
|
5706
|
-
return LocalizedNumberPipe;
|
|
5707
|
-
}());
|
|
5676
|
+
return ChipsField;
|
|
5677
|
+
}(Field));
|
|
5708
5678
|
|
|
5709
|
-
var
|
|
5710
|
-
|
|
5711
|
-
function
|
|
5712
|
-
|
|
5679
|
+
var CountryPhonePickerField = /** @class */ (function (_super) {
|
|
5680
|
+
__extends(CountryPhonePickerField, _super);
|
|
5681
|
+
function CountryPhonePickerField(config) {
|
|
5682
|
+
var _this = _super.call(this, config) || this;
|
|
5683
|
+
_this.countries = config.countries;
|
|
5684
|
+
_this.ordination = config.ordination;
|
|
5685
|
+
_this.onSelected = config.onSelected;
|
|
5686
|
+
_this.onFocusLost = config.onFocusLost;
|
|
5687
|
+
return _this;
|
|
5713
5688
|
}
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5689
|
+
return CountryPhonePickerField;
|
|
5690
|
+
}(Field));
|
|
5691
|
+
|
|
5692
|
+
/**
|
|
5693
|
+
* @deprecated Should use 'AlignmentOptions' from @seniorsistemas/ng2-currency-mask instead
|
|
5694
|
+
*/
|
|
5695
|
+
var NumberAlignmentOption;
|
|
5696
|
+
(function (NumberAlignmentOption) {
|
|
5697
|
+
NumberAlignmentOption["RIGHT"] = "right";
|
|
5698
|
+
NumberAlignmentOption["LEFT"] = "left";
|
|
5699
|
+
})(NumberAlignmentOption || (NumberAlignmentOption = {}));
|
|
5700
|
+
/**
|
|
5701
|
+
* @deprecated Should use BigNumberInput directive instead
|
|
5702
|
+
*/
|
|
5703
|
+
var NumberInputDirective = /** @class */ (function (_super) {
|
|
5704
|
+
__extends(NumberInputDirective, _super);
|
|
5705
|
+
function NumberInputDirective(_elementRef, _keyValueDiffers, localeService) {
|
|
5706
|
+
var _this = _super.call(this, null, _elementRef, _keyValueDiffers) || this;
|
|
5707
|
+
_this.localeService = localeService;
|
|
5708
|
+
_this.precision = 15;
|
|
5709
|
+
_this.scale = 0;
|
|
5710
|
+
_this.alignTo = NumberAlignmentOption.LEFT;
|
|
5711
|
+
_this.allowNegative = true;
|
|
5712
|
+
_this.regex = /\d/;
|
|
5713
|
+
_this.onLocaleService();
|
|
5714
|
+
return _this;
|
|
5715
|
+
}
|
|
5716
|
+
NumberInputDirective_1 = NumberInputDirective;
|
|
5717
|
+
NumberInputDirective.prototype.ngOnInit = function () {
|
|
5718
|
+
this.updateVariables();
|
|
5719
|
+
_super.prototype.ngOnInit.call(this);
|
|
5717
5720
|
};
|
|
5718
|
-
|
|
5721
|
+
NumberInputDirective.prototype.ngOnChanges = function (changes) {
|
|
5722
|
+
var placeholderChange = changes.placeholder && changes.placeholder.currentValue;
|
|
5723
|
+
if (!placeholderChange && this.scale)
|
|
5724
|
+
this.placeholder = "0" + this.decimalSeparator + "".padEnd(this.scale, "0");
|
|
5725
|
+
if (changes.scale ||
|
|
5726
|
+
changes.decimalSeparator ||
|
|
5727
|
+
changes.thousandsSeparator ||
|
|
5728
|
+
changes.alignTo ||
|
|
5729
|
+
changes.precision ||
|
|
5730
|
+
changes.allowNegative) {
|
|
5731
|
+
this.updateVariables();
|
|
5732
|
+
}
|
|
5733
|
+
};
|
|
5734
|
+
/**
|
|
5735
|
+
* Update the options values according to the directive input values.
|
|
5736
|
+
*/
|
|
5737
|
+
NumberInputDirective.prototype.updateVariables = function () {
|
|
5738
|
+
this.options = {
|
|
5739
|
+
align: this.alignTo,
|
|
5740
|
+
decimal: this.decimalSeparator,
|
|
5741
|
+
thousands: this.thousandsSeparator,
|
|
5742
|
+
precision: this.scale || 0,
|
|
5743
|
+
prefix: "",
|
|
5744
|
+
suffix: "",
|
|
5745
|
+
allowNegative: this.allowNegative,
|
|
5746
|
+
};
|
|
5747
|
+
this.calculateMaxLength();
|
|
5748
|
+
};
|
|
5749
|
+
/**
|
|
5750
|
+
* Responsible to calculate the field maximum length considering the separators.
|
|
5751
|
+
*/
|
|
5752
|
+
NumberInputDirective.prototype.calculateMaxLength = function () {
|
|
5753
|
+
var decSepLength = this.decimalSeparator.length;
|
|
5754
|
+
var thoSepLength = this.thousandsSeparator.length;
|
|
5755
|
+
var maxLength = this.precision + (this.scale ? decSepLength : 0);
|
|
5756
|
+
maxLength += Math.ceil((this.precision - (this.scale ? this.scale : 0)) / 3 - 1) * thoSepLength;
|
|
5757
|
+
this.maxLength = maxLength;
|
|
5758
|
+
};
|
|
5759
|
+
/**
|
|
5760
|
+
* Prevents the default CurrencyMask behavior when typed a incorrect value.
|
|
5761
|
+
* By default the CurrencyMask inputs the mask value to the component value when typed a incorrect value.
|
|
5762
|
+
*/
|
|
5763
|
+
NumberInputDirective.prototype.handleKeypress = function (event) {
|
|
5764
|
+
var negativeOperator = "-";
|
|
5765
|
+
var key = event.key;
|
|
5766
|
+
if (this.thousandsSeparator.includes(key) ||
|
|
5767
|
+
this.decimalSeparator.includes(key) ||
|
|
5768
|
+
negativeOperator.includes(key) ||
|
|
5769
|
+
this.regex.test(key) ||
|
|
5770
|
+
"Enter".toUpperCase() === key.toUpperCase())
|
|
5771
|
+
_super.prototype.handleKeypress.call(this, event);
|
|
5772
|
+
else
|
|
5773
|
+
event.preventDefault();
|
|
5774
|
+
};
|
|
5775
|
+
NumberInputDirective.prototype.onLocaleService = function () {
|
|
5776
|
+
var _this = this;
|
|
5777
|
+
this.localeService
|
|
5778
|
+
.getLocale()
|
|
5779
|
+
.pipe(first())
|
|
5780
|
+
.subscribe(function () {
|
|
5781
|
+
var _a, _b;
|
|
5782
|
+
_this.decimalSeparator = (_a = _this.decimalSeparator) !== null && _a !== void 0 ? _a : _this.localeService.getDecimalSeparator();
|
|
5783
|
+
_this.thousandsSeparator = (_b = _this.thousandsSeparator) !== null && _b !== void 0 ? _b : _this.localeService.getGroupingSeparator();
|
|
5784
|
+
});
|
|
5785
|
+
};
|
|
5786
|
+
var NumberInputDirective_1;
|
|
5787
|
+
NumberInputDirective.ctorParameters = function () { return [
|
|
5788
|
+
{ type: ElementRef },
|
|
5789
|
+
{ type: KeyValueDiffers },
|
|
5719
5790
|
{ type: LocaleService }
|
|
5720
5791
|
]; };
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5792
|
+
__decorate([
|
|
5793
|
+
Input()
|
|
5794
|
+
], NumberInputDirective.prototype, "precision", void 0);
|
|
5795
|
+
__decorate([
|
|
5796
|
+
Input()
|
|
5797
|
+
], NumberInputDirective.prototype, "scale", void 0);
|
|
5798
|
+
__decorate([
|
|
5799
|
+
Input()
|
|
5800
|
+
], NumberInputDirective.prototype, "decimalSeparator", void 0);
|
|
5801
|
+
__decorate([
|
|
5802
|
+
Input()
|
|
5803
|
+
], NumberInputDirective.prototype, "thousandsSeparator", void 0);
|
|
5804
|
+
__decorate([
|
|
5805
|
+
Input()
|
|
5806
|
+
], NumberInputDirective.prototype, "alignTo", void 0);
|
|
5807
|
+
__decorate([
|
|
5808
|
+
Input()
|
|
5809
|
+
], NumberInputDirective.prototype, "allowNegative", void 0);
|
|
5810
|
+
__decorate([
|
|
5811
|
+
Input(),
|
|
5812
|
+
HostBinding("attr.placeholder")
|
|
5813
|
+
], NumberInputDirective.prototype, "placeholder", void 0);
|
|
5814
|
+
__decorate([
|
|
5815
|
+
HostBinding("attr.maxLength")
|
|
5816
|
+
], NumberInputDirective.prototype, "maxLength", void 0);
|
|
5817
|
+
NumberInputDirective = NumberInputDirective_1 = __decorate([
|
|
5818
|
+
Directive({
|
|
5819
|
+
selector: "input[sNumberInput]",
|
|
5820
|
+
providers: [
|
|
5821
|
+
{
|
|
5822
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5823
|
+
useExisting: forwardRef(function () { return NumberInputDirective_1; }),
|
|
5824
|
+
multi: true,
|
|
5825
|
+
},
|
|
5826
|
+
],
|
|
5724
5827
|
})
|
|
5725
|
-
],
|
|
5726
|
-
return
|
|
5727
|
-
}());
|
|
5828
|
+
], NumberInputDirective);
|
|
5829
|
+
return NumberInputDirective;
|
|
5830
|
+
}(CurrencyMaskDirective$1));
|
|
5728
5831
|
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5832
|
+
/**
|
|
5833
|
+
* @deprecated Should use 'BignumberInputModule' instead
|
|
5834
|
+
*/
|
|
5835
|
+
var NumberInputModule = /** @class */ (function () {
|
|
5836
|
+
function NumberInputModule() {
|
|
5733
5837
|
}
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5838
|
+
NumberInputModule = __decorate([
|
|
5839
|
+
NgModule({
|
|
5840
|
+
imports: [CommonModule],
|
|
5841
|
+
declarations: [NumberInputDirective],
|
|
5842
|
+
exports: [NumberInputDirective],
|
|
5738
5843
|
})
|
|
5739
|
-
],
|
|
5740
|
-
return
|
|
5741
|
-
}(
|
|
5742
|
-
|
|
5743
|
-
var CurrencyService = /** @class */ (function () {
|
|
5744
|
-
function CurrencyService(localeService) {
|
|
5745
|
-
this.localeService = localeService;
|
|
5746
|
-
this.currencies = {
|
|
5747
|
-
KHR: { precision: 12, scale: 2 },
|
|
5748
|
-
SSP: { precision: 12, scale: 2 },
|
|
5749
|
-
XCD: { precision: 12, scale: 2 },
|
|
5750
|
-
EGP: { precision: 12, scale: 2 },
|
|
5751
|
-
KWD: { precision: 12, scale: 3 },
|
|
5752
|
-
YER: { precision: 12, scale: 2 },
|
|
5753
|
-
HUF: { precision: 12, scale: 2 },
|
|
5754
|
-
MXN: { precision: 12, scale: 2 },
|
|
5755
|
-
MYR: { precision: 12, scale: 2 },
|
|
5756
|
-
ZWL: { precision: 12, scale: 2 },
|
|
5757
|
-
MUR: { precision: 12, scale: 2 },
|
|
5758
|
-
DKK: { precision: 12, scale: 2 },
|
|
5759
|
-
NOK: { precision: 12, scale: 2 },
|
|
5760
|
-
DJF: { precision: 12, scale: 0 },
|
|
5761
|
-
CRC: { precision: 12, scale: 2 },
|
|
5762
|
-
BND: { precision: 12, scale: 2 },
|
|
5763
|
-
NAD: { precision: 12, scale: 2 },
|
|
5764
|
-
MKD: { precision: 12, scale: 2 },
|
|
5765
|
-
CDF: { precision: 12, scale: 2 },
|
|
5766
|
-
GNF: { precision: 12, scale: 0 },
|
|
5767
|
-
EUR: { precision: 12, scale: 2 },
|
|
5768
|
-
OMR: { precision: 12, scale: 3 },
|
|
5769
|
-
CLP: { precision: 12, scale: 0 },
|
|
5770
|
-
BSD: { precision: 12, scale: 2 },
|
|
5771
|
-
TOP: { precision: 12, scale: 2 },
|
|
5772
|
-
IRR: { precision: 12, scale: 2 },
|
|
5773
|
-
BGN: { precision: 12, scale: 2 },
|
|
5774
|
-
BZD: { precision: 12, scale: 2 },
|
|
5775
|
-
CNY: { precision: 12, scale: 2 },
|
|
5776
|
-
FJD: { precision: 12, scale: 2 },
|
|
5777
|
-
SRD: { precision: 12, scale: 2 },
|
|
5778
|
-
SOS: { precision: 12, scale: 2 },
|
|
5779
|
-
GYD: { precision: 12, scale: 2 },
|
|
5780
|
-
VUV: { precision: 12, scale: 0 },
|
|
5781
|
-
MWK: { precision: 12, scale: 2 },
|
|
5782
|
-
MRU: { precision: 12, scale: 2 },
|
|
5783
|
-
LSL: { precision: 12, scale: 2 },
|
|
5784
|
-
ERN: { precision: 12, scale: 2 },
|
|
5785
|
-
BMD: { precision: 12, scale: 2 },
|
|
5786
|
-
WST: { precision: 12, scale: 2 },
|
|
5787
|
-
LRD: { precision: 12, scale: 2 },
|
|
5788
|
-
GMD: { precision: 12, scale: 2 },
|
|
5789
|
-
ARS: { precision: 12, scale: 2 },
|
|
5790
|
-
ZAR: { precision: 12, scale: 2 },
|
|
5791
|
-
RSD: { precision: 12, scale: 2 },
|
|
5792
|
-
MDL: { precision: 12, scale: 2 },
|
|
5793
|
-
USD: { precision: 12, scale: 2 },
|
|
5794
|
-
QAR: { precision: 12, scale: 2 },
|
|
5795
|
-
HRK: { precision: 12, scale: 2 },
|
|
5796
|
-
GIP: { precision: 12, scale: 2 },
|
|
5797
|
-
NPR: { precision: 12, scale: 2 },
|
|
5798
|
-
"002": { precision: 9, scale: 4 },
|
|
5799
|
-
PLN: { precision: 12, scale: 2 },
|
|
5800
|
-
MAD: { precision: 12, scale: 2 },
|
|
5801
|
-
BAM: { precision: 12, scale: 2 },
|
|
5802
|
-
BTN: { precision: 12, scale: 2 },
|
|
5803
|
-
BBD: { precision: 12, scale: 2 },
|
|
5804
|
-
SHP: { precision: 12, scale: 2 },
|
|
5805
|
-
LKR: { precision: 12, scale: 2 },
|
|
5806
|
-
KPW: { precision: 12, scale: 2 },
|
|
5807
|
-
LAK: { precision: 12, scale: 2 },
|
|
5808
|
-
SZL: { precision: 12, scale: 2 },
|
|
5809
|
-
PHP: { precision: 12, scale: 2 },
|
|
5810
|
-
RWF: { precision: 12, scale: 0 },
|
|
5811
|
-
ISK: { precision: 12, scale: 0 },
|
|
5812
|
-
XOF: { precision: 12, scale: 0 },
|
|
5813
|
-
AUD: { precision: 12, scale: 2 },
|
|
5814
|
-
NGN: { precision: 12, scale: 2 },
|
|
5815
|
-
KGS: { precision: 12, scale: 2 },
|
|
5816
|
-
KYD: { precision: 12, scale: 2 },
|
|
5817
|
-
PGK: { precision: 12, scale: 2 },
|
|
5818
|
-
DZD: { precision: 12, scale: 2 },
|
|
5819
|
-
XAF: { precision: 12, scale: 0 },
|
|
5820
|
-
PEN: { precision: 12, scale: 2 },
|
|
5821
|
-
JPY: { precision: 12, scale: 0 },
|
|
5822
|
-
SBD: { precision: 12, scale: 2 },
|
|
5823
|
-
UGX: { precision: 12, scale: 0 },
|
|
5824
|
-
AMD: { precision: 12, scale: 2 },
|
|
5825
|
-
AED: { precision: 12, scale: 2 },
|
|
5826
|
-
ALL: { precision: 12, scale: 2 },
|
|
5827
|
-
XPF: { precision: 12, scale: 0 },
|
|
5828
|
-
AFN: { precision: 12, scale: 2 },
|
|
5829
|
-
RON: { precision: 12, scale: 2 },
|
|
5830
|
-
TND: { precision: 12, scale: 3 },
|
|
5831
|
-
NZD: { precision: 12, scale: 2 },
|
|
5832
|
-
JOD: { precision: 12, scale: 3 },
|
|
5833
|
-
VND: { precision: 12, scale: 0 },
|
|
5834
|
-
ETB: { precision: 12, scale: 2 },
|
|
5835
|
-
PYG: { precision: 12, scale: 0 },
|
|
5836
|
-
JMD: { precision: 12, scale: 2 },
|
|
5837
|
-
KES: { precision: 12, scale: 2 },
|
|
5838
|
-
IDR: { precision: 12, scale: 2 },
|
|
5839
|
-
HKD: { precision: 12, scale: 2 },
|
|
5840
|
-
BDT: { precision: 12, scale: 2 },
|
|
5841
|
-
GBP: { precision: 12, scale: 2 },
|
|
5842
|
-
AOA: { precision: 12, scale: 2 },
|
|
5843
|
-
PKR: { precision: 12, scale: 2 },
|
|
5844
|
-
TRY: { precision: 12, scale: 2 },
|
|
5845
|
-
SLL: { precision: 12, scale: 2 },
|
|
5846
|
-
CVE: { precision: 12, scale: 2 },
|
|
5847
|
-
LYD: { precision: 12, scale: 3 },
|
|
5848
|
-
ILS: { precision: 12, scale: 2 },
|
|
5849
|
-
UZS: { precision: 12, scale: 2 },
|
|
5850
|
-
CHF: { precision: 12, scale: 2 },
|
|
5851
|
-
SVC: { precision: 12, scale: 2 },
|
|
5852
|
-
BRL: { precision: 12, scale: 2 },
|
|
5853
|
-
GHS: { precision: 12, scale: 2 },
|
|
5854
|
-
CUP: { precision: 12, scale: 2 },
|
|
5855
|
-
FKP: { precision: 12, scale: 2 },
|
|
5856
|
-
NIO: { precision: 12, scale: 2 },
|
|
5857
|
-
GEL: { precision: 12, scale: 2 },
|
|
5858
|
-
TTD: { precision: 12, scale: 2 },
|
|
5859
|
-
AAA: { precision: 1, scale: 1 },
|
|
5860
|
-
COP: { precision: 12, scale: 2 },
|
|
5861
|
-
MGA: { precision: 12, scale: 2 },
|
|
5862
|
-
INR: { precision: 12, scale: 2 },
|
|
5863
|
-
KRW: { precision: 12, scale: 0 },
|
|
5864
|
-
HNL: { precision: 12, scale: 2 },
|
|
5865
|
-
MMK: { precision: 12, scale: 2 },
|
|
5866
|
-
TZS: { precision: 12, scale: 2 },
|
|
5867
|
-
THB: { precision: 12, scale: 2 },
|
|
5868
|
-
TMT: { precision: 12, scale: 2 },
|
|
5869
|
-
SAR: { precision: 12, scale: 2 },
|
|
5870
|
-
UYU: { precision: 12, scale: 2 },
|
|
5871
|
-
BIF: { precision: 12, scale: 0 },
|
|
5872
|
-
MVR: { precision: 12, scale: 2 },
|
|
5873
|
-
RUB: { precision: 12, scale: 2 },
|
|
5874
|
-
GTQ: { precision: 12, scale: 2 },
|
|
5875
|
-
SCR: { precision: 12, scale: 2 },
|
|
5876
|
-
IQD: { precision: 12, scale: 3 },
|
|
5877
|
-
UAH: { precision: 12, scale: 2 },
|
|
5878
|
-
BYN: { precision: 12, scale: 2 },
|
|
5879
|
-
VES: { precision: 12, scale: 2 },
|
|
5880
|
-
BOB: { precision: 12, scale: 2 },
|
|
5881
|
-
SGD: { precision: 12, scale: 2 },
|
|
5882
|
-
ZMW: { precision: 12, scale: 2 },
|
|
5883
|
-
CZK: { precision: 12, scale: 2 },
|
|
5884
|
-
TJS: { precision: 12, scale: 2 },
|
|
5885
|
-
DOP: { precision: 12, scale: 2 },
|
|
5886
|
-
AZN: { precision: 12, scale: 2 },
|
|
5887
|
-
PAB: { precision: 12, scale: 2 },
|
|
5888
|
-
STN: { precision: 12, scale: 2 },
|
|
5889
|
-
SDG: { precision: 12, scale: 2 },
|
|
5890
|
-
BWP: { precision: 12, scale: 2 },
|
|
5891
|
-
BHD: { precision: 12, scale: 3 },
|
|
5892
|
-
CAD: { precision: 12, scale: 2 },
|
|
5893
|
-
MNT: { precision: 12, scale: 2 },
|
|
5894
|
-
MOP: { precision: 12, scale: 2 },
|
|
5895
|
-
HTG: { precision: 12, scale: 2 },
|
|
5896
|
-
KZT: { precision: 12, scale: 2 },
|
|
5897
|
-
LBP: { precision: 12, scale: 2 },
|
|
5898
|
-
SYP: { precision: 12, scale: 2 },
|
|
5899
|
-
TWD: { precision: 12, scale: 2 },
|
|
5900
|
-
MZN: { precision: 12, scale: 2 },
|
|
5901
|
-
ANG: { precision: 12, scale: 2 },
|
|
5902
|
-
SEK: { precision: 12, scale: 2 },
|
|
5903
|
-
KMF: { precision: 12, scale: 0 },
|
|
5904
|
-
AWG: { precision: 12, scale: 2 },
|
|
5905
|
-
};
|
|
5906
|
-
}
|
|
5907
|
-
CurrencyService.prototype.getCurrencySymbol = function (_a) {
|
|
5908
|
-
var currency = _a.currency;
|
|
5909
|
-
var _b, _c;
|
|
5910
|
-
var numberFormat = new Intl.NumberFormat(this.localeService.getLocaleOptions().locale, {
|
|
5911
|
-
style: "currency",
|
|
5912
|
-
currency: currency !== null && currency !== void 0 ? currency : "BRL",
|
|
5913
|
-
currencyDisplay: "narrowSymbol",
|
|
5914
|
-
maximumFractionDigits: 5,
|
|
5915
|
-
});
|
|
5916
|
-
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 : "";
|
|
5917
|
-
};
|
|
5918
|
-
CurrencyService.ctorParameters = function () { return [
|
|
5919
|
-
{ type: LocaleService }
|
|
5920
|
-
]; };
|
|
5921
|
-
CurrencyService.ɵprov = ɵɵdefineInjectable({ factory: function CurrencyService_Factory() { return new CurrencyService(ɵɵinject(LocaleService)); }, token: CurrencyService, providedIn: "root" });
|
|
5922
|
-
CurrencyService = __decorate([
|
|
5923
|
-
Injectable({ providedIn: "root" })
|
|
5924
|
-
], CurrencyService);
|
|
5925
|
-
return CurrencyService;
|
|
5926
|
-
}());
|
|
5927
|
-
|
|
5928
|
-
var isNullOrUndefined = function (value) { return value === null || value === undefined; };
|
|
5929
|
-
|
|
5930
|
-
var NumericService = /** @class */ (function () {
|
|
5931
|
-
function NumericService(localeService, currencyService) {
|
|
5932
|
-
this.localeService = localeService;
|
|
5933
|
-
this.currencyService = currencyService;
|
|
5934
|
-
}
|
|
5935
|
-
/**
|
|
5936
|
-
* Wrapper around Intl.NumberFormat that returns the localized value using the user's locale by default(platform's preferential language).
|
|
5937
|
-
*
|
|
5938
|
-
* This method should only be used after the localeService has been initialized by the host application, either by a resolver or a manual call.
|
|
5939
|
-
*
|
|
5940
|
-
* Can be overwritten by the provided Intl.NumberFormatOptions.
|
|
5941
|
-
*
|
|
5942
|
-
* Documentation is available at {@link https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat Intl.NumberFormatOptions}.
|
|
5943
|
-
*
|
|
5944
|
-
* @param {number | string | BigNumber} value The value to be formatted.
|
|
5945
|
-
* @param options Locale and numberFormatOptions that overwrites the default Intl.NumberFormatOptions.
|
|
5946
|
-
* @return `string` The formatted value.
|
|
5947
|
-
*/
|
|
5948
|
-
NumericService.prototype.instant = function (value, options) {
|
|
5949
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
5950
|
-
if (isNullOrUndefined(value))
|
|
5951
|
-
return null;
|
|
5952
|
-
options = __assign(__assign({}, options), { locale: (_c = (_a = options === null || options === void 0 ? void 0 : options.locale) !== null && _a !== void 0 ? _a : (_b = this.localeService.getLocaleOptions()) === null || _b === void 0 ? void 0 : _b.locale) !== null && _c !== void 0 ? _c : "pt-BR", numberFormatOptions: __assign(__assign({}, options === null || options === void 0 ? void 0 : options.numberFormatOptions), { currency: ((_d = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _d === void 0 ? void 0 : _d.style) === "currency" ? ((_f = (_e = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _e === void 0 ? void 0 : _e.currency) !== null && _f !== void 0 ? _f : "BRL") : undefined, currencyDisplay: ((_g = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _g === void 0 ? void 0 : _g.style) === "currency"
|
|
5953
|
-
? ((_j = (_h = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _h === void 0 ? void 0 : _h.currencyDisplay) !== null && _j !== void 0 ? _j : "narrowSymbol")
|
|
5954
|
-
: undefined, minimumFractionDigits: (_l = (_k = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _k === void 0 ? void 0 : _k.minimumFractionDigits) !== null && _l !== void 0 ? _l : this.getCurrencyMinimumFractionDigits((_m = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _m === void 0 ? void 0 : _m.currency) }) });
|
|
5955
|
-
options.numberFormatOptions["roundingMode"] = "trunc";
|
|
5956
|
-
// From https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
|
|
5957
|
-
return new Intl.NumberFormat(options.locale, options.numberFormatOptions).format(this.getType(value) === "number" || this.getType(value) === "string" ? value : value.toString());
|
|
5958
|
-
};
|
|
5959
|
-
NumericService.prototype.getCurrencyMinimumFractionDigits = function (currency) {
|
|
5960
|
-
var _a;
|
|
5961
|
-
if (!currency)
|
|
5962
|
-
return null;
|
|
5963
|
-
return (_a = this.currencyService.currencies[currency.toUpperCase()]) === null || _a === void 0 ? void 0 : _a.scale;
|
|
5964
|
-
};
|
|
5965
|
-
NumericService.prototype.getType = function (value) {
|
|
5966
|
-
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
|
|
5967
|
-
if (value === null) {
|
|
5968
|
-
return "null";
|
|
5969
|
-
}
|
|
5970
|
-
var baseType = typeof value;
|
|
5971
|
-
// Primitive types
|
|
5972
|
-
if (baseType !== "object" && baseType !== "function") {
|
|
5973
|
-
return baseType;
|
|
5974
|
-
}
|
|
5975
|
-
// Symbol.toStringTag often specifies the "display name" of the
|
|
5976
|
-
// object's class. It's used in Object.prototype.toString().
|
|
5977
|
-
var tag = value[Symbol.toStringTag];
|
|
5978
|
-
if (typeof tag === "string") {
|
|
5979
|
-
return tag;
|
|
5980
|
-
}
|
|
5981
|
-
// If it's a function whose source code starts with the "class" keyword
|
|
5982
|
-
if (baseType === "function" && Function.prototype.toString.call(value).startsWith("class")) {
|
|
5983
|
-
return "class";
|
|
5984
|
-
}
|
|
5985
|
-
// The name of the constructor; for example `Array`, `GeneratorFunction`,
|
|
5986
|
-
// `Number`, `String`, `Boolean` or `MyCustomClass`
|
|
5987
|
-
var className = value.constructor.name;
|
|
5988
|
-
if (typeof className === "string" && className !== "") {
|
|
5989
|
-
return className;
|
|
5990
|
-
}
|
|
5991
|
-
// At this point there's no robust way to get the type of value,
|
|
5992
|
-
// so we use the base implementation.
|
|
5993
|
-
return baseType;
|
|
5994
|
-
};
|
|
5995
|
-
NumericService.ctorParameters = function () { return [
|
|
5996
|
-
{ type: LocaleService },
|
|
5997
|
-
{ type: CurrencyService }
|
|
5998
|
-
]; };
|
|
5999
|
-
NumericService.ɵprov = ɵɵdefineInjectable({ factory: function NumericService_Factory() { return new NumericService(ɵɵinject(LocaleService), ɵɵinject(CurrencyService)); }, token: NumericService, providedIn: "root" });
|
|
6000
|
-
NumericService = __decorate([
|
|
6001
|
-
Injectable({
|
|
6002
|
-
providedIn: "root",
|
|
6003
|
-
})
|
|
6004
|
-
], NumericService);
|
|
6005
|
-
return NumericService;
|
|
6006
|
-
}());
|
|
6007
|
-
|
|
6008
|
-
var NumericPipe = /** @class */ (function () {
|
|
6009
|
-
function NumericPipe(numericService, localeService) {
|
|
6010
|
-
this.numericService = numericService;
|
|
6011
|
-
this.localeService = localeService;
|
|
6012
|
-
}
|
|
6013
|
-
NumericPipe.prototype.transform = function (value, options) {
|
|
6014
|
-
var _this = this;
|
|
6015
|
-
return (options === null || options === void 0 ? void 0 : options.locale) ? of(this.numericService.instant(value, options))
|
|
6016
|
-
: this.localeService.getLocale().pipe(map(function (locale) {
|
|
6017
|
-
return _this.numericService.instant(value, {
|
|
6018
|
-
locale: locale,
|
|
6019
|
-
numberFormatOptions: options === null || options === void 0 ? void 0 : options.numberFormatOptions,
|
|
6020
|
-
});
|
|
6021
|
-
}));
|
|
6022
|
-
};
|
|
6023
|
-
NumericPipe.ctorParameters = function () { return [
|
|
6024
|
-
{ type: NumericService },
|
|
6025
|
-
{ type: LocaleService }
|
|
6026
|
-
]; };
|
|
6027
|
-
NumericPipe = __decorate([
|
|
6028
|
-
Pipe({ name: "numeric" })
|
|
6029
|
-
], NumericPipe);
|
|
6030
|
-
return NumericPipe;
|
|
6031
|
-
}());
|
|
6032
|
-
|
|
6033
|
-
var LocaleModule = /** @class */ (function () {
|
|
6034
|
-
function LocaleModule() {
|
|
6035
|
-
}
|
|
6036
|
-
LocaleModule_1 = LocaleModule;
|
|
6037
|
-
LocaleModule.forRoot = function () {
|
|
6038
|
-
return {
|
|
6039
|
-
ngModule: LocaleModule_1,
|
|
6040
|
-
providers: [
|
|
6041
|
-
LocaleService,
|
|
6042
|
-
LocalizedCurrencyPipe,
|
|
6043
|
-
LocalizedDatePipe,
|
|
6044
|
-
LocalizedTimePipe,
|
|
6045
|
-
LocalizedNumberPipe,
|
|
6046
|
-
LocalizedCurrencyImpurePipe,
|
|
6047
|
-
LocalizedDateImpurePipe,
|
|
6048
|
-
LocalizedTimeImpurePipe,
|
|
6049
|
-
LocalizedBignumberPipe,
|
|
6050
|
-
LocalizedBignumberImpurePipe,
|
|
6051
|
-
NumericPipe
|
|
6052
|
-
],
|
|
6053
|
-
};
|
|
6054
|
-
};
|
|
6055
|
-
LocaleModule.forChild = function () {
|
|
6056
|
-
return {
|
|
6057
|
-
ngModule: LocaleModule_1,
|
|
6058
|
-
};
|
|
6059
|
-
};
|
|
6060
|
-
var LocaleModule_1;
|
|
6061
|
-
LocaleModule = LocaleModule_1 = __decorate([
|
|
6062
|
-
NgModule({
|
|
6063
|
-
imports: [CommonModule],
|
|
6064
|
-
exports: [
|
|
6065
|
-
LocalizedCurrencyPipe,
|
|
6066
|
-
LocalizedDatePipe,
|
|
6067
|
-
LocalizedTimePipe,
|
|
6068
|
-
LocalizedNumberPipe,
|
|
6069
|
-
LocalizedCurrencyImpurePipe,
|
|
6070
|
-
LocalizedDateImpurePipe,
|
|
6071
|
-
LocalizedTimeImpurePipe,
|
|
6072
|
-
LocalizedBignumberPipe,
|
|
6073
|
-
LocalizedBignumberImpurePipe,
|
|
6074
|
-
NumericPipe
|
|
6075
|
-
],
|
|
6076
|
-
declarations: [
|
|
6077
|
-
LocalizedCurrencyPipe,
|
|
6078
|
-
LocalizedDatePipe,
|
|
6079
|
-
LocalizedTimePipe,
|
|
6080
|
-
LocalizedNumberPipe,
|
|
6081
|
-
LocalizedCurrencyImpurePipe,
|
|
6082
|
-
LocalizedDateImpurePipe,
|
|
6083
|
-
LocalizedTimeImpurePipe,
|
|
6084
|
-
LocalizedBignumberPipe,
|
|
6085
|
-
LocalizedBignumberImpurePipe,
|
|
6086
|
-
NumericPipe
|
|
6087
|
-
],
|
|
6088
|
-
})
|
|
6089
|
-
], LocaleModule);
|
|
6090
|
-
return LocaleModule;
|
|
6091
|
-
}());
|
|
6092
|
-
|
|
6093
|
-
var BignumberField = /** @class */ (function (_super) {
|
|
6094
|
-
__extends(BignumberField, _super);
|
|
6095
|
-
function BignumberField(config) {
|
|
6096
|
-
var _a, _b, _c, _d;
|
|
6097
|
-
var _this = _super.call(this, config) || this;
|
|
6098
|
-
_this.allowNegative = (_a = config.allowNegative) !== null && _a !== void 0 ? _a : true;
|
|
6099
|
-
_this.numberLocaleOptions = (_b = config.numberLocaleOptions) !== null && _b !== void 0 ? _b : new NumberLocaleOptions();
|
|
6100
|
-
_this.browserAutocomplete = config.browserAutocomplete;
|
|
6101
|
-
_this.precision = config.precision;
|
|
6102
|
-
_this.scale = (_c = config.scale) !== null && _c !== void 0 ? _c : 2;
|
|
6103
|
-
_this.alignTo = _this.scale ? AlignmentOptions.RIGHT : AlignmentOptions.LEFT;
|
|
6104
|
-
_this.mask = config.mask;
|
|
6105
|
-
_this.leftAddon = config.leftAddon;
|
|
6106
|
-
_this.rightAddon = config.rightAddon;
|
|
6107
|
-
_this.onBlur = config.onBlur;
|
|
6108
|
-
_this.onFocus = config.onFocus;
|
|
6109
|
-
_this.onComplete = config.onComplete;
|
|
6110
|
-
_this.onInput = config.onInput;
|
|
6111
|
-
_this.autoClear = (_d = config.autoClear) !== null && _d !== void 0 ? _d : true;
|
|
6112
|
-
return _this;
|
|
6113
|
-
}
|
|
6114
|
-
return BignumberField;
|
|
6115
|
-
}(Field));
|
|
6116
|
-
|
|
6117
|
-
var BlobField = /** @class */ (function (_super) {
|
|
6118
|
-
__extends(BlobField, _super);
|
|
6119
|
-
function BlobField(config) {
|
|
6120
|
-
var _this = _super.call(this, config) || this;
|
|
6121
|
-
_this.accept = config.accept;
|
|
6122
|
-
_this.files = config.files || [];
|
|
6123
|
-
_this.chooseLabel = config.chooseLabel;
|
|
6124
|
-
_this.removeLabel = config.removeLabel;
|
|
6125
|
-
_this.cancelLabel = config.cancelLabel;
|
|
6126
|
-
_this.successTooltip = config.successTooltip;
|
|
6127
|
-
_this.multiple = config.multiple;
|
|
6128
|
-
_this.onUploadFile = config.onUploadFile;
|
|
6129
|
-
_this.onRemoveFile = config.onRemoveFile;
|
|
6130
|
-
_this.onCancelUpload = config.onCancelUpload;
|
|
6131
|
-
_this.onDownloadFile = config.onDownloadFile;
|
|
6132
|
-
_this.showFileUploadDate = config.showFileUploadDate;
|
|
6133
|
-
return _this;
|
|
6134
|
-
}
|
|
6135
|
-
return BlobField;
|
|
6136
|
-
}(Field));
|
|
6137
|
-
|
|
6138
|
-
var BooleanOptionsLabel = /** @class */ (function () {
|
|
6139
|
-
function BooleanOptionsLabel(config) {
|
|
6140
|
-
this.true = config.true;
|
|
6141
|
-
this.false = config.false;
|
|
6142
|
-
this.empty = config.empty;
|
|
6143
|
-
this.clear = config.clear;
|
|
6144
|
-
}
|
|
6145
|
-
return BooleanOptionsLabel;
|
|
6146
|
-
}());
|
|
6147
|
-
var BooleanField = /** @class */ (function (_super) {
|
|
6148
|
-
__extends(BooleanField, _super);
|
|
6149
|
-
function BooleanField(config) {
|
|
6150
|
-
var _this = _super.call(this, config) || this;
|
|
6151
|
-
_this.verticalAlignment = config.verticalAlignment;
|
|
6152
|
-
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
6153
|
-
_this.representedBy = "radio";
|
|
6154
|
-
_this.onBlur = config.onBlur;
|
|
6155
|
-
_this.onFocus = config.onFocus;
|
|
6156
|
-
_this.onClick = config.onClick;
|
|
6157
|
-
return _this;
|
|
6158
|
-
}
|
|
6159
|
-
return BooleanField;
|
|
6160
|
-
}(Field));
|
|
6161
|
-
|
|
6162
|
-
var BooleanSwitchField = /** @class */ (function (_super) {
|
|
6163
|
-
__extends(BooleanSwitchField, _super);
|
|
6164
|
-
function BooleanSwitchField(config) {
|
|
6165
|
-
var _this = _super.call(this, config) || this;
|
|
6166
|
-
_this.onChange = config.onChange;
|
|
6167
|
-
if (config.optionsLabel) {
|
|
6168
|
-
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
6169
|
-
}
|
|
6170
|
-
_this.representedBy = "switch";
|
|
6171
|
-
return _this;
|
|
6172
|
-
}
|
|
6173
|
-
return BooleanSwitchField;
|
|
6174
|
-
}(Field));
|
|
6175
|
-
|
|
6176
|
-
var CalendarField = /** @class */ (function (_super) {
|
|
6177
|
-
__extends(CalendarField, _super);
|
|
6178
|
-
function CalendarField(config) {
|
|
6179
|
-
var _this = _super.call(this, config) || this;
|
|
6180
|
-
_this.view = config.view || "date";
|
|
6181
|
-
_this.minDate = config.minDate;
|
|
6182
|
-
_this.maxDate = config.maxDate;
|
|
6183
|
-
_this.defaultDate = config.defaultDate;
|
|
6184
|
-
_this.appendTo = config.appendTo;
|
|
6185
|
-
_this.showOnFocus = typeof config.showOnFocus === "boolean" ? config.showOnFocus : true;
|
|
6186
|
-
_this.calendarLocaleOptions = config.calendarLocaleOptions;
|
|
6187
|
-
_this.onBlur = config.onBlur;
|
|
6188
|
-
_this.onFocus = config.onFocus;
|
|
6189
|
-
_this.onSelect = config.onSelect;
|
|
6190
|
-
_this.onInput = config.onInput;
|
|
6191
|
-
_this.onClose = config.onClose;
|
|
6192
|
-
_this.onTodayClick = config.onTodayClick;
|
|
6193
|
-
_this.onClearClick = config.onClearClick;
|
|
6194
|
-
_this.onMonthChange = config.onMonthChange;
|
|
6195
|
-
_this.onYearChange = config.onYearChange;
|
|
6196
|
-
_this.selectionMode = config.selectionMode || "single";
|
|
6197
|
-
_this.rangeSeparator = config.rangeSeparator || "-";
|
|
6198
|
-
_this.showSeconds = config.showSeconds;
|
|
6199
|
-
// Tornando true o padrão para showSeconds.
|
|
6200
|
-
if (_this.showSeconds === null || _this.showSeconds === undefined) {
|
|
6201
|
-
switch (_this.type) {
|
|
6202
|
-
case FieldType.DateTime:
|
|
6203
|
-
case FieldType.LocalDateTime:
|
|
6204
|
-
case FieldType.Time:
|
|
6205
|
-
_this.showSeconds = true;
|
|
6206
|
-
break;
|
|
6207
|
-
}
|
|
6208
|
-
}
|
|
6209
|
-
return _this;
|
|
6210
|
-
}
|
|
6211
|
-
return CalendarField;
|
|
6212
|
-
}(Field));
|
|
6213
|
-
|
|
6214
|
-
var CheckboxField = /** @class */ (function (_super) {
|
|
6215
|
-
__extends(CheckboxField, _super);
|
|
6216
|
-
function CheckboxField(config) {
|
|
6217
|
-
var _this = _super.call(this, config) || this;
|
|
6218
|
-
_this.data = config.data;
|
|
6219
|
-
return _this;
|
|
6220
|
-
}
|
|
6221
|
-
return CheckboxField;
|
|
6222
|
-
}(Field));
|
|
6223
|
-
|
|
6224
|
-
var ChipsField = /** @class */ (function (_super) {
|
|
6225
|
-
__extends(ChipsField, _super);
|
|
6226
|
-
function ChipsField(config) {
|
|
6227
|
-
var _this = _super.call(this, config) || this;
|
|
6228
|
-
_this.showCopyButton = false;
|
|
6229
|
-
_this.keyFilter = config.keyFilter;
|
|
6230
|
-
_this.showCopyButton = config.showCopyButton;
|
|
6231
|
-
_this.separator = config.separator;
|
|
6232
|
-
_this.onAdd = config.onAdd;
|
|
6233
|
-
_this.onRemove = config.onRemove;
|
|
6234
|
-
_this.onChipClick = config.onChipClick;
|
|
6235
|
-
_this.onFocus = config.onFocus;
|
|
6236
|
-
_this.onBlur = config.onBlur;
|
|
6237
|
-
_this.onCopy = config.onCopy;
|
|
6238
|
-
return _this;
|
|
6239
|
-
}
|
|
6240
|
-
return ChipsField;
|
|
6241
|
-
}(Field));
|
|
6242
|
-
|
|
6243
|
-
var CountryPhonePickerField = /** @class */ (function (_super) {
|
|
6244
|
-
__extends(CountryPhonePickerField, _super);
|
|
6245
|
-
function CountryPhonePickerField(config) {
|
|
6246
|
-
var _this = _super.call(this, config) || this;
|
|
6247
|
-
_this.countries = config.countries;
|
|
6248
|
-
_this.ordination = config.ordination;
|
|
6249
|
-
_this.onSelected = config.onSelected;
|
|
6250
|
-
_this.onFocusLost = config.onFocusLost;
|
|
6251
|
-
return _this;
|
|
6252
|
-
}
|
|
6253
|
-
return CountryPhonePickerField;
|
|
6254
|
-
}(Field));
|
|
6255
|
-
|
|
6256
|
-
/**
|
|
6257
|
-
* @deprecated Should use 'AlignmentOptions' from @seniorsistemas/ng2-currency-mask instead
|
|
6258
|
-
*/
|
|
6259
|
-
var NumberAlignmentOption;
|
|
6260
|
-
(function (NumberAlignmentOption) {
|
|
6261
|
-
NumberAlignmentOption["RIGHT"] = "right";
|
|
6262
|
-
NumberAlignmentOption["LEFT"] = "left";
|
|
6263
|
-
})(NumberAlignmentOption || (NumberAlignmentOption = {}));
|
|
6264
|
-
/**
|
|
6265
|
-
* @deprecated Should use BigNumberInput directive instead
|
|
6266
|
-
*/
|
|
6267
|
-
var NumberInputDirective = /** @class */ (function (_super) {
|
|
6268
|
-
__extends(NumberInputDirective, _super);
|
|
6269
|
-
function NumberInputDirective(_elementRef, _keyValueDiffers, localeService) {
|
|
6270
|
-
var _this = _super.call(this, null, _elementRef, _keyValueDiffers) || this;
|
|
6271
|
-
_this.localeService = localeService;
|
|
6272
|
-
_this.precision = 15;
|
|
6273
|
-
_this.scale = 0;
|
|
6274
|
-
_this.alignTo = NumberAlignmentOption.LEFT;
|
|
6275
|
-
_this.allowNegative = true;
|
|
6276
|
-
_this.regex = /\d/;
|
|
6277
|
-
_this.onLocaleService();
|
|
6278
|
-
return _this;
|
|
6279
|
-
}
|
|
6280
|
-
NumberInputDirective_1 = NumberInputDirective;
|
|
6281
|
-
NumberInputDirective.prototype.ngOnInit = function () {
|
|
6282
|
-
this.updateVariables();
|
|
6283
|
-
_super.prototype.ngOnInit.call(this);
|
|
6284
|
-
};
|
|
6285
|
-
NumberInputDirective.prototype.ngOnChanges = function (changes) {
|
|
6286
|
-
var placeholderChange = changes.placeholder && changes.placeholder.currentValue;
|
|
6287
|
-
if (!placeholderChange && this.scale)
|
|
6288
|
-
this.placeholder = "0" + this.decimalSeparator + "".padEnd(this.scale, "0");
|
|
6289
|
-
if (changes.scale ||
|
|
6290
|
-
changes.decimalSeparator ||
|
|
6291
|
-
changes.thousandsSeparator ||
|
|
6292
|
-
changes.alignTo ||
|
|
6293
|
-
changes.precision ||
|
|
6294
|
-
changes.allowNegative) {
|
|
6295
|
-
this.updateVariables();
|
|
6296
|
-
}
|
|
6297
|
-
};
|
|
6298
|
-
/**
|
|
6299
|
-
* Update the options values according to the directive input values.
|
|
6300
|
-
*/
|
|
6301
|
-
NumberInputDirective.prototype.updateVariables = function () {
|
|
6302
|
-
this.options = {
|
|
6303
|
-
align: this.alignTo,
|
|
6304
|
-
decimal: this.decimalSeparator,
|
|
6305
|
-
thousands: this.thousandsSeparator,
|
|
6306
|
-
precision: this.scale || 0,
|
|
6307
|
-
prefix: "",
|
|
6308
|
-
suffix: "",
|
|
6309
|
-
allowNegative: this.allowNegative,
|
|
6310
|
-
};
|
|
6311
|
-
this.calculateMaxLength();
|
|
6312
|
-
};
|
|
6313
|
-
/**
|
|
6314
|
-
* Responsible to calculate the field maximum length considering the separators.
|
|
6315
|
-
*/
|
|
6316
|
-
NumberInputDirective.prototype.calculateMaxLength = function () {
|
|
6317
|
-
var decSepLength = this.decimalSeparator.length;
|
|
6318
|
-
var thoSepLength = this.thousandsSeparator.length;
|
|
6319
|
-
var maxLength = this.precision + (this.scale ? decSepLength : 0);
|
|
6320
|
-
maxLength += Math.ceil((this.precision - (this.scale ? this.scale : 0)) / 3 - 1) * thoSepLength;
|
|
6321
|
-
this.maxLength = maxLength;
|
|
6322
|
-
};
|
|
6323
|
-
/**
|
|
6324
|
-
* Prevents the default CurrencyMask behavior when typed a incorrect value.
|
|
6325
|
-
* By default the CurrencyMask inputs the mask value to the component value when typed a incorrect value.
|
|
6326
|
-
*/
|
|
6327
|
-
NumberInputDirective.prototype.handleKeypress = function (event) {
|
|
6328
|
-
var negativeOperator = "-";
|
|
6329
|
-
var key = event.key;
|
|
6330
|
-
if (this.thousandsSeparator.includes(key) ||
|
|
6331
|
-
this.decimalSeparator.includes(key) ||
|
|
6332
|
-
negativeOperator.includes(key) ||
|
|
6333
|
-
this.regex.test(key) ||
|
|
6334
|
-
"Enter".toUpperCase() === key.toUpperCase())
|
|
6335
|
-
_super.prototype.handleKeypress.call(this, event);
|
|
6336
|
-
else
|
|
6337
|
-
event.preventDefault();
|
|
6338
|
-
};
|
|
6339
|
-
NumberInputDirective.prototype.onLocaleService = function () {
|
|
6340
|
-
var _this = this;
|
|
6341
|
-
this.localeService
|
|
6342
|
-
.getLocale()
|
|
6343
|
-
.pipe(first())
|
|
6344
|
-
.subscribe(function () {
|
|
6345
|
-
var _a, _b;
|
|
6346
|
-
_this.decimalSeparator = (_a = _this.decimalSeparator) !== null && _a !== void 0 ? _a : _this.localeService.getDecimalSeparator();
|
|
6347
|
-
_this.thousandsSeparator = (_b = _this.thousandsSeparator) !== null && _b !== void 0 ? _b : _this.localeService.getGroupingSeparator();
|
|
6348
|
-
});
|
|
6349
|
-
};
|
|
6350
|
-
var NumberInputDirective_1;
|
|
6351
|
-
NumberInputDirective.ctorParameters = function () { return [
|
|
6352
|
-
{ type: ElementRef },
|
|
6353
|
-
{ type: KeyValueDiffers },
|
|
6354
|
-
{ type: LocaleService }
|
|
6355
|
-
]; };
|
|
6356
|
-
__decorate([
|
|
6357
|
-
Input()
|
|
6358
|
-
], NumberInputDirective.prototype, "precision", void 0);
|
|
6359
|
-
__decorate([
|
|
6360
|
-
Input()
|
|
6361
|
-
], NumberInputDirective.prototype, "scale", void 0);
|
|
6362
|
-
__decorate([
|
|
6363
|
-
Input()
|
|
6364
|
-
], NumberInputDirective.prototype, "decimalSeparator", void 0);
|
|
6365
|
-
__decorate([
|
|
6366
|
-
Input()
|
|
6367
|
-
], NumberInputDirective.prototype, "thousandsSeparator", void 0);
|
|
6368
|
-
__decorate([
|
|
6369
|
-
Input()
|
|
6370
|
-
], NumberInputDirective.prototype, "alignTo", void 0);
|
|
6371
|
-
__decorate([
|
|
6372
|
-
Input()
|
|
6373
|
-
], NumberInputDirective.prototype, "allowNegative", void 0);
|
|
6374
|
-
__decorate([
|
|
6375
|
-
Input(),
|
|
6376
|
-
HostBinding("attr.placeholder")
|
|
6377
|
-
], NumberInputDirective.prototype, "placeholder", void 0);
|
|
6378
|
-
__decorate([
|
|
6379
|
-
HostBinding("attr.maxLength")
|
|
6380
|
-
], NumberInputDirective.prototype, "maxLength", void 0);
|
|
6381
|
-
NumberInputDirective = NumberInputDirective_1 = __decorate([
|
|
6382
|
-
Directive({
|
|
6383
|
-
selector: "input[sNumberInput]",
|
|
6384
|
-
providers: [
|
|
6385
|
-
{
|
|
6386
|
-
provide: NG_VALUE_ACCESSOR,
|
|
6387
|
-
useExisting: forwardRef(function () { return NumberInputDirective_1; }),
|
|
6388
|
-
multi: true,
|
|
6389
|
-
},
|
|
6390
|
-
],
|
|
6391
|
-
})
|
|
6392
|
-
], NumberInputDirective);
|
|
6393
|
-
return NumberInputDirective;
|
|
6394
|
-
}(CurrencyMaskDirective$1));
|
|
6395
|
-
|
|
6396
|
-
/**
|
|
6397
|
-
* @deprecated Should use 'BignumberInputModule' instead
|
|
6398
|
-
*/
|
|
6399
|
-
var NumberInputModule = /** @class */ (function () {
|
|
6400
|
-
function NumberInputModule() {
|
|
6401
|
-
}
|
|
6402
|
-
NumberInputModule = __decorate([
|
|
6403
|
-
NgModule({
|
|
6404
|
-
imports: [CommonModule],
|
|
6405
|
-
declarations: [NumberInputDirective],
|
|
6406
|
-
exports: [NumberInputDirective],
|
|
6407
|
-
})
|
|
6408
|
-
], NumberInputModule);
|
|
6409
|
-
return NumberInputModule;
|
|
6410
|
-
}());
|
|
5844
|
+
], NumberInputModule);
|
|
5845
|
+
return NumberInputModule;
|
|
5846
|
+
}());
|
|
6411
5847
|
|
|
6412
5848
|
/**
|
|
6413
5849
|
* @deprecated Should use BignumberField instead
|
|
@@ -6415,9 +5851,8 @@ var NumberInputModule = /** @class */ (function () {
|
|
|
6415
5851
|
var NumberField = /** @class */ (function (_super) {
|
|
6416
5852
|
__extends(NumberField, _super);
|
|
6417
5853
|
function NumberField(config) {
|
|
6418
|
-
var _a;
|
|
6419
5854
|
var _this = _super.call(this, config) || this;
|
|
6420
|
-
_this.numberLocaleOptions =
|
|
5855
|
+
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
6421
5856
|
_this.browserAutocomplete = config.browserAutocomplete;
|
|
6422
5857
|
_this.precision = config.precision;
|
|
6423
5858
|
_this.scale = config.scale;
|
|
@@ -6440,9 +5875,8 @@ var NumberField = /** @class */ (function (_super) {
|
|
|
6440
5875
|
var DecimalField = /** @class */ (function (_super) {
|
|
6441
5876
|
__extends(DecimalField, _super);
|
|
6442
5877
|
function DecimalField(config) {
|
|
6443
|
-
var _a;
|
|
6444
5878
|
var _this = _super.call(this, config) || this;
|
|
6445
|
-
_this.numberLocaleOptions =
|
|
5879
|
+
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
6446
5880
|
_this.alignTo = config.alignTo || NumberAlignmentOption.RIGHT;
|
|
6447
5881
|
_this.scale = typeof config.scale === "function" ? config.scale() : config.scale;
|
|
6448
5882
|
return _this;
|
|
@@ -6456,10 +5890,9 @@ var DecimalField = /** @class */ (function (_super) {
|
|
|
6456
5890
|
var CurrencyField = /** @class */ (function (_super) {
|
|
6457
5891
|
__extends(CurrencyField, _super);
|
|
6458
5892
|
function CurrencyField(config) {
|
|
6459
|
-
var _a;
|
|
6460
5893
|
var _this = _super.call(this, config) || this;
|
|
6461
5894
|
_this.currency = config['currency'];
|
|
6462
|
-
_this.numberLocaleOptions =
|
|
5895
|
+
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
6463
5896
|
return _this;
|
|
6464
5897
|
}
|
|
6465
5898
|
return CurrencyField;
|
|
@@ -7325,7 +6758,7 @@ var LookupComponent = /** @class */ (function () {
|
|
|
7325
6758
|
transition("* <=> *", animate("{{transitionParams}}")),
|
|
7326
6759
|
]),
|
|
7327
6760
|
],
|
|
7328
|
-
styles: ["s-lookup.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-lookup .ui-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}s-lookup .inputgroup p-autocomplete+button,s-lookup p-autocomplete .ui-autocomplete-dropdown.ui-button{background-color:#fff;border-color:#ccc;border-width:1px 1px 1px 0;color:#333;min-height:34px;height:auto!important;min-width:auto;width:34px!important;overflow:hidden;border-top-left-radius:0;border-bottom-left-radius:0}s-lookup .inputgroup,s-lookup p-autocomplete span.ui-autocomplete-multiple{display:-ms-flexbox;display:flex}s-lookup .inputgroup p-autocomplete{display:inline-block}s-lookup .inputgroup p-autocomplete
|
|
6761
|
+
styles: ["s-lookup.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-lookup .ui-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}s-lookup .inputgroup p-autocomplete+button,s-lookup p-autocomplete .ui-autocomplete-dropdown.ui-button{background-color:#fff;border-color:#ccc;border-width:1px 1px 1px 0;color:#333;min-height:34px;height:auto!important;min-width:auto;width:34px!important;overflow:hidden;border-top-left-radius:0;border-bottom-left-radius:0}s-lookup .inputgroup,s-lookup p-autocomplete span.ui-autocomplete-multiple{display:-ms-flexbox;display:flex}s-lookup .inputgroup p-autocomplete{display:inline-block}s-lookup .inputgroup p-autocomplete .ui-autocomplete-input{width:100%}s-lookup .inputgroup p-autocomplete+button:enabled:hover,s-lookup .inputgroup p-autocomplete+button:focus{background-color:#e6e6e6;border-color:#ccc}s-lookup .inputgroup p-autocomplete .ui-widget .ui-inputtext{border-right-width:1px;border-right-style:solid}s-lookup .ui-autocomplete-input-token,s-lookup .ui-autocomplete-input-token input{width:100%}s-lookup .ui-autocomplete .ui-autocomplete-token{max-width:100%}s-lookup .ui-autocomplete .ui-autocomplete-token-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body .s-lookup-modal.ui-dialog .ui-dialog-content{padding:0;margin-bottom:0;max-height:none}s-lookup .ui-table-scrollable-body{min-width:100%}.s-lookup-modal{height:80%!important;max-width:100%!important;max-height:inherit!important;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}.s-lookup-modal .ui-dialog-content{height:auto!important;-ms-flex:1;flex:1;overflow:auto}.s-lookup-modal .ui-dialog-footer,.s-lookup-modal .ui-dialog-header{-ms-flex-negative:0;flex-shrink:0;border-radius:0 0 4px 4px}.s-lookup-modal .s-lookup-modal-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%}.s-lookup-modal .s-lookup-modal-container .filter{position:relative;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;width:85%;background-color:rgba(229,234,234,.5);height:100%;padding:.571rem}.s-lookup-modal .s-lookup-modal-container .filter form{width:100%;height:100%}.s-lookup-modal .s-lookup-modal-container .filter form .form-content{height:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.s-lookup-modal .s-lookup-modal-container .filter form .form-content .filter-title{padding-left:.5rem}.s-lookup-modal .s-lookup-modal-container .filter form .form-content .form-fields{overflow-y:auto}.s-lookup-modal .s-lookup-modal-container .filter-toggle{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;width:34px;border-radius:0 4px 4px 0}.s-lookup-modal .s-lookup-modal-container .filter-toggle button{-ms-flex-align:center;align-items:center;position:relative;background-color:rgba(229,234,234,.5);height:34px;width:100%;border:1px solid #e5eaea;outline:0;border-left:none;border-radius:0 4px 4px 0;cursor:pointer;text-decoration:none;text-transform:none;padding:7px;transition:background-color .2s ease-out,color .2s ease-out,border-color .2s ease-out}.s-lookup-modal .s-lookup-modal-container .filter-toggle button:focus,.s-lookup-modal .s-lookup-modal-container .filter-toggle button:hover{background-color:rgba(201,211,211,.5);border-color:#c9d3d3}.s-lookup-modal .s-lookup-modal-container .filter-toggle--start-border-mask{height:15px;border-left:1px solid #e5eaea}.s-lookup-modal .s-lookup-modal-container .filter-toggle--end-border-mask{height:calc(100% - 49px);border-left:1px solid #e5eaea}.s-lookup-modal .s-lookup-modal-container .content{-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:auto;flex-basis:auto;overflow-x:auto;padding:.5rem}.s-lookup-modal .s-lookup-modal-container .content.empty-content{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-lookup-modal .s-lookup-modal-container .content .s-loading-state-container,.s-lookup-modal .s-lookup-modal-container .content .s-loading-state-container .contents{height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table{position:relative;height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table{height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table .ui-table-scrollable-wrapper{height:calc(100% - 60px)}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table .ui-table-scrollable-wrapper .ui-table-scrollable-view{height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table .ui-table-scrollable-wrapper .ui-table-scrollable-view .ui-table-scrollable-body{position:relative;height:calc(100% - 60px)}@media (max-width:767px){.s-lookup-modal{border:none!important;top:0!important;left:0!important;width:100%!important;height:100%!important}}@media (min-width:768px){.s-lookup-modal{width:80%!important}.s-lookup-modal .s-lookup-modal-container .filter{width:40%}}@media (min-width:1200px){.s-lookup-modal{width:60%!important}.s-lookup-modal .s-lookup-modal-container .filter{width:30%}}"]
|
|
7329
6762
|
})
|
|
7330
6763
|
], LookupComponent);
|
|
7331
6764
|
return LookupComponent;
|
|
@@ -7875,6 +7308,8 @@ var convertToMomentDateFormat = function (format) {
|
|
|
7875
7308
|
.replace(/\byy\b/, "YYYY"); // year (four digits)
|
|
7876
7309
|
};
|
|
7877
7310
|
|
|
7311
|
+
var isNullOrUndefined = function (value) { return value === null || value === undefined; };
|
|
7312
|
+
|
|
7878
7313
|
var ValidateErrors;
|
|
7879
7314
|
(function (ValidateErrors) {
|
|
7880
7315
|
ValidateErrors["MAX_FILE_SIZE"] = "MAX_FILE_SIZE";
|
|
@@ -7895,7 +7330,7 @@ var ALL_PERMISSIONS = [
|
|
|
7895
7330
|
FileUploadPermissions.Remove,
|
|
7896
7331
|
];
|
|
7897
7332
|
|
|
7898
|
-
var moment$
|
|
7333
|
+
var moment$1 = moment_;
|
|
7899
7334
|
var FileUploadComponent = /** @class */ (function () {
|
|
7900
7335
|
function FileUploadComponent(sanitizer, fileUploadService, translate) {
|
|
7901
7336
|
this.sanitizer = sanitizer;
|
|
@@ -8077,11 +7512,11 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
8077
7512
|
.then(function (metadata) { return _this.setModifiedDate(metadata); });
|
|
8078
7513
|
};
|
|
8079
7514
|
FileUploadComponent.prototype.setModifiedDate = function (metadata) {
|
|
8080
|
-
var hour = moment$
|
|
8081
|
-
var minutes = moment$
|
|
8082
|
-
var day = moment$
|
|
8083
|
-
var month = moment$
|
|
8084
|
-
var fullYear = moment$
|
|
7515
|
+
var hour = moment$1(metadata.modified).format("HH");
|
|
7516
|
+
var minutes = moment$1(metadata.modified).format("mm");
|
|
7517
|
+
var day = moment$1(metadata.modified).format("DD");
|
|
7518
|
+
var month = moment$1(metadata.modified).format("MM");
|
|
7519
|
+
var fullYear = moment$1(metadata.modified).format("YYYY");
|
|
8085
7520
|
this.modifiedDate = this.translate.instant("platform.angular_components.date_modified_custom_blob", { hour: hour, minutes: minutes, day: day, month: month, fullYear: fullYear });
|
|
8086
7521
|
};
|
|
8087
7522
|
var FileUploadComponent_1;
|
|
@@ -8176,414 +7611,977 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
8176
7611
|
Output()
|
|
8177
7612
|
], FileUploadComponent.prototype, "validateErrors", void 0);
|
|
8178
7613
|
__decorate([
|
|
8179
|
-
HostListener("window:resize")
|
|
8180
|
-
], FileUploadComponent.prototype, "onResize", null);
|
|
8181
|
-
FileUploadComponent = FileUploadComponent_1 = __decorate([
|
|
8182
|
-
Component({
|
|
8183
|
-
selector: "s-file-upload",
|
|
8184
|
-
template: "<div\n [id]=\"id\"\n class=\"s-fileupload\">\n <div class=\"s-fileupload-choose\">\n <input\n #inputUpload\n [id]=\"id+'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)\"> \n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (onClick)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled || fileLimit === files?.length\"\n [auxiliary]=\"false\">\n </s-button>\n </div>\n\n <section\n *ngIf=\"files.length\" \n [id]=\"id + 'fileupload-list'\"\n class=\"s-fileupload-list\"\n role=\"grid\">\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\">\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\">\n <ng-container *ngTemplateOutlet=\"permissions.includes(READ_PERMISSION) && file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }\">\n </ng-container>\n <span *ngIf=\"modifiedDate\" class=\"s-fileupload-list-file-name-date\">{{ modifiedDate }}</span>\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\">\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{ 'width': '250px', 'background-color': '#d8d8d8', 'border-radius': '0px', 'height': '14px'}\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </p-progressBar>\n <span\n *ngIf=\"file.isUploading && isSmallDevice\" \n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </span>\n <span\n *ngIf=\"!file.isUploading && !file.error && file.progress === 100\"\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n [pTooltip]=\"successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n <span\n *ngIf=\"file.error?.message\" \n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\">\n <a\n *ngIf=\"file.isUploading\"\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\">\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"permissions.includes(REMOVE_PERMISSION) && !file.isUploading && !(disabled || !!formGroup?.disabled)\"\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\">\n {{ removeLabel || 'platform.angular_components.remove' | translate }}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">{{file.name}}\n </a>\n <a\n style=\"display: none;\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">\n {{file.name}}\n </span>\n</ng-template>\n",
|
|
8185
|
-
styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.s-fileupload input[type=file]{display:none}.s-fileupload-list{border:1px solid #ccc}.s-fileupload-list-file:not(:first-child){border-top:1px solid #ccc}.s-fileupload-list .s-fileupload-list-file{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-item-align:center;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name .s-fileupload-list-file-name-date{font-size:.75rem;color:#999}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name>a{cursor:pointer;text-decoration:none}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-fileupload-list .s-fileupload-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-check{color:#0c9348;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-times{color:#c13018;font-size:12px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin-top:15px;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;width:100%}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action{text-decoration:none;color:#428bca}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :focus,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :visited,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action:hover{text-decoration:none}@media (min-width:768px){.s-fileupload-list .s-fileupload-list-file{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;-ms-flex-positive:2;flex-grow:2}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{margin:0 15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin:0;width:auto}}"]
|
|
7614
|
+
HostListener("window:resize")
|
|
7615
|
+
], FileUploadComponent.prototype, "onResize", null);
|
|
7616
|
+
FileUploadComponent = FileUploadComponent_1 = __decorate([
|
|
7617
|
+
Component({
|
|
7618
|
+
selector: "s-file-upload",
|
|
7619
|
+
template: "<div\n [id]=\"id\"\n class=\"s-fileupload\">\n <div class=\"s-fileupload-choose\">\n <input\n #inputUpload\n [id]=\"id+'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)\"> \n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (onClick)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled || fileLimit === files?.length\"\n [auxiliary]=\"false\">\n </s-button>\n </div>\n\n <section\n *ngIf=\"files.length\" \n [id]=\"id + 'fileupload-list'\"\n class=\"s-fileupload-list\"\n role=\"grid\">\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\">\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\">\n <ng-container *ngTemplateOutlet=\"permissions.includes(READ_PERMISSION) && file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }\">\n </ng-container>\n <span *ngIf=\"modifiedDate\" class=\"s-fileupload-list-file-name-date\">{{ modifiedDate }}</span>\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\">\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{ 'width': '250px', 'background-color': '#d8d8d8', 'border-radius': '0px', 'height': '14px'}\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </p-progressBar>\n <span\n *ngIf=\"file.isUploading && isSmallDevice\" \n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </span>\n <span\n *ngIf=\"!file.isUploading && !file.error && file.progress === 100\"\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n [pTooltip]=\"successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n <span\n *ngIf=\"file.error?.message\" \n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\">\n <a\n *ngIf=\"file.isUploading\"\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\">\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"permissions.includes(REMOVE_PERMISSION) && !file.isUploading && !(disabled || !!formGroup?.disabled)\"\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\">\n {{ removeLabel || 'platform.angular_components.remove' | translate }}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">{{file.name}}\n </a>\n <a\n style=\"display: none;\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">\n {{file.name}}\n </span>\n</ng-template>\n",
|
|
7620
|
+
styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.s-fileupload input[type=file]{display:none}.s-fileupload-list{border:1px solid #ccc}.s-fileupload-list-file:not(:first-child){border-top:1px solid #ccc}.s-fileupload-list .s-fileupload-list-file{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-item-align:center;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name .s-fileupload-list-file-name-date{font-size:.75rem;color:#999}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name>a{cursor:pointer;text-decoration:none}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-fileupload-list .s-fileupload-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-check{color:#0c9348;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-times{color:#c13018;font-size:12px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin-top:15px;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;width:100%}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action{text-decoration:none;color:#428bca}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :focus,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :visited,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action:hover{text-decoration:none}@media (min-width:768px){.s-fileupload-list .s-fileupload-list-file{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;-ms-flex-positive:2;flex-grow:2}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{margin:0 15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin:0;width:auto}}"]
|
|
7621
|
+
})
|
|
7622
|
+
], FileUploadComponent);
|
|
7623
|
+
return FileUploadComponent;
|
|
7624
|
+
}());
|
|
7625
|
+
|
|
7626
|
+
var FileUploadModule = /** @class */ (function () {
|
|
7627
|
+
function FileUploadModule() {
|
|
7628
|
+
}
|
|
7629
|
+
FileUploadModule = __decorate([
|
|
7630
|
+
NgModule({
|
|
7631
|
+
declarations: [FileUploadComponent],
|
|
7632
|
+
imports: [
|
|
7633
|
+
CommonModule,
|
|
7634
|
+
ButtonModule,
|
|
7635
|
+
TooltipModule$1,
|
|
7636
|
+
ProgressBarModule$1,
|
|
7637
|
+
TranslateModule,
|
|
7638
|
+
],
|
|
7639
|
+
providers: [FileUploadService],
|
|
7640
|
+
exports: [FileUploadComponent],
|
|
7641
|
+
})
|
|
7642
|
+
], FileUploadModule);
|
|
7643
|
+
return FileUploadModule;
|
|
7644
|
+
}());
|
|
7645
|
+
|
|
7646
|
+
var InfoSignComponent = /** @class */ (function () {
|
|
7647
|
+
function InfoSignComponent() {
|
|
7648
|
+
}
|
|
7649
|
+
InfoSignComponent = __decorate([
|
|
7650
|
+
Component({
|
|
7651
|
+
selector: "s-info-sign-component",
|
|
7652
|
+
template: "<span class=\"info-sign\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i\n class=\"info-sign__icon fa fa-info-circle\"\n aria-hidden=\"true\"\n [sTooltip]=\"tooltip\"\n [escape]=\"false\"\n tooltipPosition=\"top\"\n [displayTime]=\"displayTime\"\n mobileBehavior=\"tap\"\n showDelay=\"0\"\n [focusedInputRef]=\"focusedInputRef\">\n </i>\n</span>\n",
|
|
7653
|
+
styles: [".info-sign{-ms-flex-align:baseline;align-items:baseline;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start}.info-sign .info-sign__icon{padding:0 12px}"]
|
|
7654
|
+
})
|
|
7655
|
+
], InfoSignComponent);
|
|
7656
|
+
return InfoSignComponent;
|
|
7657
|
+
}());
|
|
7658
|
+
|
|
7659
|
+
var InfoSignDirective = /** @class */ (function () {
|
|
7660
|
+
function InfoSignDirective(templateRef, viewContainer, componentFactoryResolver) {
|
|
7661
|
+
this.templateRef = templateRef;
|
|
7662
|
+
this.viewContainer = viewContainer;
|
|
7663
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
7664
|
+
this.displayTime = 5000;
|
|
7665
|
+
}
|
|
7666
|
+
InfoSignDirective.prototype.ngOnChanges = function () {
|
|
7667
|
+
this.createInfoSign();
|
|
7668
|
+
};
|
|
7669
|
+
InfoSignDirective.prototype.ngOnInit = function () {
|
|
7670
|
+
this.createInfoSign();
|
|
7671
|
+
};
|
|
7672
|
+
InfoSignDirective.prototype.ngOnDestroy = function () {
|
|
7673
|
+
if (this.componentRef) {
|
|
7674
|
+
this.componentRef.destroy();
|
|
7675
|
+
}
|
|
7676
|
+
};
|
|
7677
|
+
InfoSignDirective.prototype.createInfoSign = function () {
|
|
7678
|
+
if (!this.componentRef && this.sInfoSign) {
|
|
7679
|
+
this.viewContainer.clear();
|
|
7680
|
+
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(InfoSignComponent);
|
|
7681
|
+
this.componentRef = this.viewContainer.createComponent(componentFactory);
|
|
7682
|
+
this.componentRef.instance.templateRef = this.templateRef;
|
|
7683
|
+
this.componentRef.instance.tooltip = this.sInfoSign;
|
|
7684
|
+
this.componentRef.instance.displayTime = this.displayTime;
|
|
7685
|
+
this.componentRef.instance.focusedInputRef = this.focusedInputRef;
|
|
7686
|
+
}
|
|
7687
|
+
else if (this.componentRef && this.sInfoSign) {
|
|
7688
|
+
this.componentRef.instance.tooltip = this.sInfoSign;
|
|
7689
|
+
}
|
|
7690
|
+
else {
|
|
7691
|
+
this.viewContainer.clear();
|
|
7692
|
+
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
7693
|
+
}
|
|
7694
|
+
};
|
|
7695
|
+
InfoSignDirective.ctorParameters = function () { return [
|
|
7696
|
+
{ type: TemplateRef },
|
|
7697
|
+
{ type: ViewContainerRef },
|
|
7698
|
+
{ type: ComponentFactoryResolver }
|
|
7699
|
+
]; };
|
|
7700
|
+
__decorate([
|
|
7701
|
+
Input()
|
|
7702
|
+
], InfoSignDirective.prototype, "sInfoSign", void 0);
|
|
7703
|
+
__decorate([
|
|
7704
|
+
Input('sInfoSignDisplayTime')
|
|
7705
|
+
], InfoSignDirective.prototype, "displayTime", void 0);
|
|
7706
|
+
__decorate([
|
|
7707
|
+
Input('sInfoSignFocusedInputRef')
|
|
7708
|
+
], InfoSignDirective.prototype, "focusedInputRef", void 0);
|
|
7709
|
+
InfoSignDirective = __decorate([
|
|
7710
|
+
Directive({
|
|
7711
|
+
selector: "[sInfoSign]"
|
|
7712
|
+
})
|
|
7713
|
+
], InfoSignDirective);
|
|
7714
|
+
return InfoSignDirective;
|
|
7715
|
+
}());
|
|
7716
|
+
|
|
7717
|
+
var InfoSignModule = /** @class */ (function () {
|
|
7718
|
+
function InfoSignModule() {
|
|
7719
|
+
}
|
|
7720
|
+
InfoSignModule = __decorate([
|
|
7721
|
+
NgModule({
|
|
7722
|
+
imports: [
|
|
7723
|
+
TooltipModule,
|
|
7724
|
+
CommonModule,
|
|
7725
|
+
],
|
|
7726
|
+
declarations: [
|
|
7727
|
+
InfoSignDirective,
|
|
7728
|
+
InfoSignComponent,
|
|
7729
|
+
],
|
|
7730
|
+
exports: [InfoSignDirective],
|
|
7731
|
+
entryComponents: [InfoSignComponent],
|
|
7732
|
+
})
|
|
7733
|
+
], InfoSignModule);
|
|
7734
|
+
return InfoSignModule;
|
|
7735
|
+
}());
|
|
7736
|
+
|
|
7737
|
+
var IAssistIconComponent = /** @class */ (function () {
|
|
7738
|
+
function IAssistIconComponent() {
|
|
7739
|
+
}
|
|
7740
|
+
IAssistIconComponent = __decorate([
|
|
7741
|
+
Component({
|
|
7742
|
+
template: "<svg style=\"width: 100%; height: 100%;\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\" fill=\"#0FA389\"/>\n <path d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\" fill=\"#0FA389\"/>\n <path d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\" fill=\"#F3F3F5\"/>\n <path d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\" fill=\"#0C847B\"/>\n <path d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\" fill=\"#0C847B\"/>\n</svg>"
|
|
7743
|
+
})
|
|
7744
|
+
], IAssistIconComponent);
|
|
7745
|
+
return IAssistIconComponent;
|
|
7746
|
+
}());
|
|
7747
|
+
|
|
7748
|
+
var SeniorIconComponent = /** @class */ (function () {
|
|
7749
|
+
function SeniorIconComponent() {
|
|
7750
|
+
}
|
|
7751
|
+
SeniorIconComponent = __decorate([
|
|
7752
|
+
Component({
|
|
7753
|
+
template: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 348 613\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g filter=\"url(#filter0_d_2841_2040)\">\n <path d=\"M174.719 518.932L258.161 439.782C264.546 433.762 269.614 426.603 273.072 418.719C276.53 410.834 278.31 402.378 278.31 393.838C278.31 385.298 276.53 376.843 273.072 368.958C269.614 361.073 264.546 353.915 258.161 347.895L174.719 269.199C168.45 263.304 163.474 256.289 160.077 248.56C156.681 240.83 154.933 232.539 154.933 224.165C154.933 215.792 156.681 207.501 160.077 199.771C163.474 192.042 168.45 185.027 174.719 179.132L303.718 301.496C329.517 326.089 344 359.371 344 394.066C344 428.76 329.517 462.043 303.718 486.635L174.719 609C168.45 603.105 163.474 596.09 160.077 588.36C156.681 580.631 154.933 572.34 154.933 563.966C154.933 555.592 156.681 547.301 160.077 539.572C163.474 531.842 168.45 524.828 174.719 518.932ZM173.76 94.0677L90.3189 173.218C83.9334 179.238 78.8659 186.397 75.408 194.281C71.95 202.166 70.1698 210.622 70.1698 219.162C70.1698 227.702 71.95 236.157 75.408 244.042C78.8659 251.927 83.9334 259.085 90.3189 265.105L173.76 344.256C180.03 350.151 185.006 357.166 188.402 364.895C191.798 372.625 193.547 380.916 193.547 389.289C193.547 397.663 191.798 405.954 188.402 413.684C185.006 421.413 180.03 428.428 173.76 434.323L44.2823 311.504C18.4832 286.911 4 253.629 4 218.934C4 184.24 18.4832 150.957 44.2823 126.365L173.76 4C186.213 16.0129 193.192 32.1861 193.192 49.0338C193.192 65.8815 186.213 82.0547 173.76 94.0677Z\" fill=\"white\" />\n </g>\n <defs>\n <filter id=\"filter0_d_2841_2040\" x=\"0\" y=\"0\" width=\"348\" height=\"613\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\" >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\" />\n <feOffset />\n <feGaussianBlur stdDeviation=\"2\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix type=\"matrix\" values=\"0 0 0 0 0.418936 0 0 0 0 1 0 0 0 0 0.930272 0 0 0 0.35 0\" />\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_2841_2040\" />\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_2841_2040\" result=\"shape\" />\n </filter>\n </defs>\n</svg>\n"
|
|
7754
|
+
})
|
|
7755
|
+
], SeniorIconComponent);
|
|
7756
|
+
return SeniorIconComponent;
|
|
7757
|
+
}());
|
|
7758
|
+
|
|
7759
|
+
var SVGFactoryIcons;
|
|
7760
|
+
(function (SVGFactoryIcons) {
|
|
7761
|
+
SVGFactoryIcons["IAssist"] = "iassist";
|
|
7762
|
+
SVGFactoryIcons["Senior"] = "senior";
|
|
7763
|
+
})(SVGFactoryIcons || (SVGFactoryIcons = {}));
|
|
7764
|
+
|
|
7765
|
+
var SVGFactoryDirective = /** @class */ (function () {
|
|
7766
|
+
function SVGFactoryDirective(viewContainerRef, componentFactoryResolver, cdr) {
|
|
7767
|
+
this.viewContainerRef = viewContainerRef;
|
|
7768
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
7769
|
+
this.cdr = cdr;
|
|
7770
|
+
this._iconClass = this._getIconClass(SVGFactoryIcons.Senior);
|
|
7771
|
+
}
|
|
7772
|
+
Object.defineProperty(SVGFactoryDirective.prototype, "sSVGFactory", {
|
|
7773
|
+
set: function (icon) {
|
|
7774
|
+
this._iconClass = this._getIconClass(icon);
|
|
7775
|
+
},
|
|
7776
|
+
enumerable: true,
|
|
7777
|
+
configurable: true
|
|
7778
|
+
});
|
|
7779
|
+
SVGFactoryDirective.prototype.ngAfterViewInit = function () {
|
|
7780
|
+
this._createComponent();
|
|
7781
|
+
};
|
|
7782
|
+
SVGFactoryDirective.prototype._createComponent = function () {
|
|
7783
|
+
var factory = this.componentFactoryResolver.resolveComponentFactory(this._iconClass);
|
|
7784
|
+
this.viewContainerRef.clear();
|
|
7785
|
+
this.viewContainerRef.createComponent(factory);
|
|
7786
|
+
this.cdr.detectChanges();
|
|
7787
|
+
};
|
|
7788
|
+
SVGFactoryDirective.prototype._getIconClass = function (icon) {
|
|
7789
|
+
switch (icon) {
|
|
7790
|
+
case SVGFactoryIcons.IAssist:
|
|
7791
|
+
return IAssistIconComponent;
|
|
7792
|
+
case SVGFactoryIcons.Senior:
|
|
7793
|
+
default:
|
|
7794
|
+
return SeniorIconComponent;
|
|
7795
|
+
}
|
|
7796
|
+
};
|
|
7797
|
+
SVGFactoryDirective.ctorParameters = function () { return [
|
|
7798
|
+
{ type: ViewContainerRef },
|
|
7799
|
+
{ type: ComponentFactoryResolver },
|
|
7800
|
+
{ type: ChangeDetectorRef }
|
|
7801
|
+
]; };
|
|
7802
|
+
__decorate([
|
|
7803
|
+
Input("sSVGFactory")
|
|
7804
|
+
], SVGFactoryDirective.prototype, "sSVGFactory", null);
|
|
7805
|
+
SVGFactoryDirective = __decorate([
|
|
7806
|
+
Directive({
|
|
7807
|
+
selector: "[sSVGFactory]",
|
|
8186
7808
|
})
|
|
8187
|
-
],
|
|
8188
|
-
return
|
|
7809
|
+
], SVGFactoryDirective);
|
|
7810
|
+
return SVGFactoryDirective;
|
|
8189
7811
|
}());
|
|
8190
7812
|
|
|
8191
|
-
var
|
|
8192
|
-
function
|
|
7813
|
+
var SVGFactoryModule = /** @class */ (function () {
|
|
7814
|
+
function SVGFactoryModule() {
|
|
8193
7815
|
}
|
|
8194
|
-
|
|
7816
|
+
SVGFactoryModule = __decorate([
|
|
8195
7817
|
NgModule({
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
ProgressBarModule$1,
|
|
8202
|
-
TranslateModule,
|
|
7818
|
+
imports: [CommonModule],
|
|
7819
|
+
declarations: [
|
|
7820
|
+
SVGFactoryDirective,
|
|
7821
|
+
IAssistIconComponent,
|
|
7822
|
+
SeniorIconComponent,
|
|
8203
7823
|
],
|
|
8204
|
-
|
|
8205
|
-
exports: [FileUploadComponent],
|
|
7824
|
+
exports: [SVGFactoryDirective],
|
|
8206
7825
|
})
|
|
8207
|
-
],
|
|
8208
|
-
return
|
|
7826
|
+
], SVGFactoryModule);
|
|
7827
|
+
return SVGFactoryModule;
|
|
8209
7828
|
}());
|
|
8210
7829
|
|
|
8211
|
-
var
|
|
8212
|
-
function
|
|
7830
|
+
var DotsIndicatorComponent = /** @class */ (function () {
|
|
7831
|
+
function DotsIndicatorComponent() {
|
|
8213
7832
|
}
|
|
8214
|
-
|
|
7833
|
+
DotsIndicatorComponent = __decorate([
|
|
8215
7834
|
Component({
|
|
8216
|
-
selector: "s-
|
|
8217
|
-
template: "<
|
|
8218
|
-
styles: [".
|
|
7835
|
+
selector: "s-dots-indicator",
|
|
7836
|
+
template: "<div class=\"dots-indicator\">\n <div class=\"bounce bounce--1\"></div>\n <div class=\"bounce bounce--2\"></div>\n <div class=\"bounce bounce--3\"></div>\n</div>\n",
|
|
7837
|
+
styles: [".dots-indicator .bounce{animation:1.2s ease-out infinite bounce;background-color:#333;border-radius:100%;display:inline-block;height:10px;width:10px}.dots-indicator .bounce+.bounce{margin-left:15px}.dots-indicator .bounce.bounce--1{animation-delay:0s}.dots-indicator .bounce.bounce--2{animation-delay:.1s}.dots-indicator .bounce.bounce--3{animation-delay:.2s}@keyframes bounce{100%,80%{transform:scale(1)}90%{transform:scale(1.8)}}"]
|
|
8219
7838
|
})
|
|
8220
|
-
],
|
|
8221
|
-
return
|
|
7839
|
+
], DotsIndicatorComponent);
|
|
7840
|
+
return DotsIndicatorComponent;
|
|
8222
7841
|
}());
|
|
8223
7842
|
|
|
8224
|
-
var
|
|
8225
|
-
function
|
|
8226
|
-
this.templateRef = templateRef;
|
|
8227
|
-
this.viewContainer = viewContainer;
|
|
8228
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
8229
|
-
this.displayTime = 5000;
|
|
7843
|
+
var LoadingIndicatorComponent = /** @class */ (function () {
|
|
7844
|
+
function LoadingIndicatorComponent() {
|
|
8230
7845
|
}
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
7846
|
+
LoadingIndicatorComponent = __decorate([
|
|
7847
|
+
Component({
|
|
7848
|
+
selector: "s-logo-indicator",
|
|
7849
|
+
template: "<div class=\"logo-indicator\">\n <span *sSVGFactory=\"'senior'\"></span>\n</div>\n",
|
|
7850
|
+
styles: [".logo-indicator{animation:1s infinite pulsar,1s infinite scale;background-color:#00c89a;border-radius:50%;box-shadow:0 0 0 #00c89ab3;height:64px;padding:calc(64px * .16);position:relative;width:64px}@keyframes pulsar{0%{box-shadow:0 0 0 0 #00c89ab3}70%{box-shadow:0 0 0 40px #00c89a00}100%{box-shadow:0 0 0 0 #00c89a00}}@keyframes scale{0%,100%{transform:scale(1)}50%{transform:scale(1.3)}}"]
|
|
7851
|
+
})
|
|
7852
|
+
], LoadingIndicatorComponent);
|
|
7853
|
+
return LoadingIndicatorComponent;
|
|
7854
|
+
}());
|
|
7855
|
+
|
|
7856
|
+
var LoadingStateIndicators;
|
|
7857
|
+
(function (LoadingStateIndicators) {
|
|
7858
|
+
LoadingStateIndicators["Dots"] = "dots";
|
|
7859
|
+
LoadingStateIndicators["Logo"] = "logo";
|
|
7860
|
+
})(LoadingStateIndicators || (LoadingStateIndicators = {}));
|
|
7861
|
+
|
|
7862
|
+
var LoadingStateComponent = /** @class */ (function () {
|
|
7863
|
+
function LoadingStateComponent() {
|
|
7864
|
+
this.indicator = LoadingStateIndicators.Dots;
|
|
7865
|
+
this.id = "s-loading-state-" + LoadingStateComponent_1.nextId++;
|
|
7866
|
+
this.BLOCK_TIMEOUT_VALUE = 300;
|
|
7867
|
+
this.UNBLOCK_TIMEOUT_VALUE = 200;
|
|
7868
|
+
}
|
|
7869
|
+
LoadingStateComponent_1 = LoadingStateComponent;
|
|
7870
|
+
Object.defineProperty(LoadingStateComponent.prototype, "loading", {
|
|
7871
|
+
get: function () {
|
|
7872
|
+
return this._loading;
|
|
7873
|
+
},
|
|
7874
|
+
set: function (loading) {
|
|
7875
|
+
this._loading = loading;
|
|
7876
|
+
loading ? this.block() : this.unblock();
|
|
7877
|
+
},
|
|
7878
|
+
enumerable: true,
|
|
7879
|
+
configurable: true
|
|
7880
|
+
});
|
|
7881
|
+
LoadingStateComponent.prototype.block = function () {
|
|
7882
|
+
var _this = this;
|
|
7883
|
+
if (this.unblockTimeoutId) {
|
|
7884
|
+
clearTimeout(this.unblockTimeoutId);
|
|
7885
|
+
this.unblockTimeoutId = undefined;
|
|
7886
|
+
}
|
|
7887
|
+
if (!this.blockTimeoutId) {
|
|
7888
|
+
this.blockTimeoutId = setTimeout(function () {
|
|
7889
|
+
_this.blocking = true;
|
|
7890
|
+
_this.blockTimeoutId = undefined;
|
|
7891
|
+
}, this.BLOCK_TIMEOUT_VALUE);
|
|
8240
7892
|
}
|
|
8241
7893
|
};
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
this.
|
|
8247
|
-
this.componentRef.instance.templateRef = this.templateRef;
|
|
8248
|
-
this.componentRef.instance.tooltip = this.sInfoSign;
|
|
8249
|
-
this.componentRef.instance.displayTime = this.displayTime;
|
|
8250
|
-
this.componentRef.instance.focusedInputRef = this.focusedInputRef;
|
|
7894
|
+
LoadingStateComponent.prototype.unblock = function () {
|
|
7895
|
+
var _this = this;
|
|
7896
|
+
if (this.blockTimeoutId) {
|
|
7897
|
+
clearTimeout(this.blockTimeoutId);
|
|
7898
|
+
this.blockTimeoutId = undefined;
|
|
8251
7899
|
}
|
|
8252
|
-
|
|
8253
|
-
this.
|
|
7900
|
+
if (!this.unblockTimeoutId) {
|
|
7901
|
+
this.unblockTimeoutId = setTimeout(function () {
|
|
7902
|
+
_this.blocking = false;
|
|
7903
|
+
_this.unblockTimeoutId = undefined;
|
|
7904
|
+
}, this.UNBLOCK_TIMEOUT_VALUE);
|
|
8254
7905
|
}
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
7906
|
+
};
|
|
7907
|
+
LoadingStateComponent.prototype.ngOnDestroy = function () {
|
|
7908
|
+
if (this.blockTimeoutId) {
|
|
7909
|
+
clearTimeout(this.blockTimeoutId);
|
|
7910
|
+
}
|
|
7911
|
+
if (this.unblockTimeoutId) {
|
|
7912
|
+
clearTimeout(this.unblockTimeoutId);
|
|
8258
7913
|
}
|
|
8259
7914
|
};
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
{ type: ViewContainerRef },
|
|
8263
|
-
{ type: ComponentFactoryResolver }
|
|
8264
|
-
]; };
|
|
7915
|
+
var LoadingStateComponent_1;
|
|
7916
|
+
LoadingStateComponent.nextId = 0;
|
|
8265
7917
|
__decorate([
|
|
8266
7918
|
Input()
|
|
8267
|
-
],
|
|
7919
|
+
], LoadingStateComponent.prototype, "indicator", void 0);
|
|
8268
7920
|
__decorate([
|
|
8269
|
-
Input(
|
|
8270
|
-
],
|
|
7921
|
+
Input()
|
|
7922
|
+
], LoadingStateComponent.prototype, "id", void 0);
|
|
8271
7923
|
__decorate([
|
|
8272
|
-
Input(
|
|
8273
|
-
],
|
|
8274
|
-
|
|
7924
|
+
Input()
|
|
7925
|
+
], LoadingStateComponent.prototype, "blockWindow", void 0);
|
|
7926
|
+
__decorate([
|
|
7927
|
+
Input()
|
|
7928
|
+
], LoadingStateComponent.prototype, "loading", null);
|
|
7929
|
+
LoadingStateComponent = LoadingStateComponent_1 = __decorate([
|
|
7930
|
+
Component({
|
|
7931
|
+
selector: "s-loading-state",
|
|
7932
|
+
template: "<div\n [id]=\"id\"\n class=\"s-loading-state-container\"\n [ngClass]=\"{\n 'loading': loading,\n 'blocking': blocking,\n 'fullscreen': blockWindow\n }\">\n <div\n [id]=\"id + '-loader'\"\n class=\"loader\">\n <div\n [id]=\"id + '-spinner'\"\n class=\"spinner\">\n <ng-container [ngSwitch]=\"indicator\">\n <s-logo-indicator *ngSwitchCase=\"'logo'\"></s-logo-indicator>\n <s-dots-indicator *ngSwitchCase=\"'dots'\"></s-dots-indicator>\n </ng-container>\n </div>\n <div\n [id]=\"id + '-overlay'\"\n class=\"overlay\">\n </div>\n </div>\n <div\n [id]=\"id + '-contents'\"\n class=\"contents\">\n <ng-container *ngTemplateOutlet=\"contents || originalContent\"></ng-container>\n <ng-template #originalContent>\n <ng-content></ng-content>\n </ng-template>\n </div>\n</div>",
|
|
7933
|
+
styles: [".s-loading-state-container{position:relative}.s-loading-state-container .loader{opacity:0;position:absolute;transition:opacity .2s ease-out,display .2s ease-out;visibility:hidden;inset:1px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.s-loading-state-container .loader .overlay{background-color:#fff;height:100%;opacity:.8;transition:opacity .2s ease-out,display .2s ease-out;width:100%}.s-loading-state-container .loader .spinner{display:-ms-flexbox;display:flex;position:absolute;z-index:2}.s-loading-state-container.blocking>.loader,.s-loading-state-container.loading>.loader{visibility:visible}.s-loading-state-container.blocking>.loader,.s-loading-state-container.blocking>.loader>.overlay,.s-loading-state-container.loading>.loader,.s-loading-state-container.loading>.loader>.overlay{cursor:wait;z-index:1}.s-loading-state-container.blocking>.contents,.s-loading-state-container.loading>.contents{z-index:0!important}.s-loading-state-container.blocking.loading>.loader{opacity:1}.s-loading-state-container.fullscreen>.loader{left:0;position:fixed;top:0;z-index:1005}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.loader{opacity:0;visibility:hidden}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.contents{z-index:0!important}"]
|
|
7934
|
+
})
|
|
7935
|
+
], LoadingStateComponent);
|
|
7936
|
+
return LoadingStateComponent;
|
|
7937
|
+
}());
|
|
7938
|
+
|
|
7939
|
+
var LoadingStateDirective = /** @class */ (function () {
|
|
7940
|
+
function LoadingStateDirective(target, template, componentFactoryResolver, cdr) {
|
|
7941
|
+
this.target = target;
|
|
7942
|
+
this.template = template;
|
|
7943
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
7944
|
+
this.cdr = cdr;
|
|
7945
|
+
this._loading = false;
|
|
7946
|
+
this.indicator = LoadingStateIndicators.Dots;
|
|
7947
|
+
}
|
|
7948
|
+
Object.defineProperty(LoadingStateDirective.prototype, "sLoadingState", {
|
|
7949
|
+
set: function (value) {
|
|
7950
|
+
if (typeof value === "boolean") {
|
|
7951
|
+
this._loading = value;
|
|
7952
|
+
this.indicator = LoadingStateIndicators.Dots;
|
|
7953
|
+
}
|
|
7954
|
+
else if (typeof value === "object") {
|
|
7955
|
+
this._loading = value.loading;
|
|
7956
|
+
this.indicator = value.indicator || LoadingStateIndicators.Dots;
|
|
7957
|
+
}
|
|
7958
|
+
if (this.loaderComponent) {
|
|
7959
|
+
this.loaderComponent.instance.loading = this._loading;
|
|
7960
|
+
this.loaderComponent.instance.indicator = this.indicator;
|
|
7961
|
+
}
|
|
7962
|
+
},
|
|
7963
|
+
enumerable: true,
|
|
7964
|
+
configurable: true
|
|
7965
|
+
});
|
|
7966
|
+
LoadingStateDirective.prototype.ngAfterViewInit = function () {
|
|
7967
|
+
this.createComponent();
|
|
7968
|
+
};
|
|
7969
|
+
LoadingStateDirective.prototype.createComponent = function () {
|
|
7970
|
+
var factory = this.componentFactoryResolver.resolveComponentFactory(LoadingStateComponent);
|
|
7971
|
+
this.loaderComponent = this.target.createComponent(factory);
|
|
7972
|
+
this.loaderComponent.instance.contents = this.template;
|
|
7973
|
+
this.loaderComponent.instance.loading = this._loading;
|
|
7974
|
+
this.loaderComponent.instance.indicator = this.indicator;
|
|
7975
|
+
this.cdr.detectChanges();
|
|
7976
|
+
};
|
|
7977
|
+
LoadingStateDirective.prototype.ngOnDestroy = function () {
|
|
7978
|
+
if (this.loaderComponent) {
|
|
7979
|
+
this.loaderComponent.destroy();
|
|
7980
|
+
}
|
|
7981
|
+
};
|
|
7982
|
+
LoadingStateDirective.ctorParameters = function () { return [
|
|
7983
|
+
{ type: ViewContainerRef },
|
|
7984
|
+
{ type: TemplateRef },
|
|
7985
|
+
{ type: ComponentFactoryResolver },
|
|
7986
|
+
{ type: ChangeDetectorRef }
|
|
7987
|
+
]; };
|
|
7988
|
+
__decorate([
|
|
7989
|
+
Input("sLoadingState")
|
|
7990
|
+
], LoadingStateDirective.prototype, "sLoadingState", null);
|
|
7991
|
+
LoadingStateDirective = __decorate([
|
|
8275
7992
|
Directive({
|
|
8276
|
-
selector: "[
|
|
7993
|
+
selector: "[sLoadingState]",
|
|
8277
7994
|
})
|
|
8278
|
-
],
|
|
8279
|
-
return
|
|
7995
|
+
], LoadingStateDirective);
|
|
7996
|
+
return LoadingStateDirective;
|
|
8280
7997
|
}());
|
|
8281
7998
|
|
|
8282
|
-
var
|
|
8283
|
-
function
|
|
7999
|
+
var LoadingStateModule = /** @class */ (function () {
|
|
8000
|
+
function LoadingStateModule() {
|
|
8284
8001
|
}
|
|
8285
|
-
|
|
8002
|
+
LoadingStateModule = __decorate([
|
|
8286
8003
|
NgModule({
|
|
8287
8004
|
imports: [
|
|
8288
|
-
TooltipModule,
|
|
8289
8005
|
CommonModule,
|
|
8006
|
+
SVGFactoryModule,
|
|
8290
8007
|
],
|
|
8291
8008
|
declarations: [
|
|
8292
|
-
|
|
8293
|
-
|
|
8009
|
+
LoadingStateComponent,
|
|
8010
|
+
LoadingStateDirective,
|
|
8011
|
+
DotsIndicatorComponent,
|
|
8012
|
+
LoadingIndicatorComponent,
|
|
8294
8013
|
],
|
|
8295
|
-
exports: [
|
|
8296
|
-
|
|
8014
|
+
exports: [
|
|
8015
|
+
LoadingStateComponent,
|
|
8016
|
+
LoadingStateDirective,
|
|
8017
|
+
],
|
|
8018
|
+
entryComponents: [LoadingStateComponent],
|
|
8297
8019
|
})
|
|
8298
|
-
],
|
|
8299
|
-
return
|
|
8020
|
+
], LoadingStateModule);
|
|
8021
|
+
return LoadingStateModule;
|
|
8300
8022
|
}());
|
|
8301
8023
|
|
|
8302
|
-
var
|
|
8303
|
-
function
|
|
8024
|
+
var LocalizedBignumberPipe = /** @class */ (function () {
|
|
8025
|
+
function LocalizedBignumberPipe(localeService) {
|
|
8026
|
+
this.localeService = localeService;
|
|
8304
8027
|
}
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8028
|
+
LocalizedBignumberPipe.prototype.transform = function (value, options) {
|
|
8029
|
+
return value !== undefined && value !== null ? this.applyMask(value, options) : of(value);
|
|
8030
|
+
};
|
|
8031
|
+
LocalizedBignumberPipe.prototype.applyMask = function (value, options) {
|
|
8032
|
+
return this.localeService.get().pipe(map(function (localeConfig) {
|
|
8033
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
8034
|
+
var configs = {
|
|
8035
|
+
prefix: (_c = (_a = options === null || options === void 0 ? void 0 : options.prefix) !== null && _a !== void 0 ? _a : (_b = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _b === void 0 ? void 0 : _b.currencySymbol) !== null && _c !== void 0 ? _c : "R$",
|
|
8036
|
+
thousandsSeparator: (_f = (_d = options === null || options === void 0 ? void 0 : options.thousandsSeparator) !== null && _d !== void 0 ? _d : (_e = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _e === void 0 ? void 0 : _e.thousandsSeparator) !== null && _f !== void 0 ? _f : ".",
|
|
8037
|
+
decimalSeparator: (_j = (_g = options === null || options === void 0 ? void 0 : options.decimalSeparator) !== null && _g !== void 0 ? _g : (_h = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _h === void 0 ? void 0 : _h.decimalSeparator) !== null && _j !== void 0 ? _j : ",",
|
|
8038
|
+
scale: (_k = options === null || options === void 0 ? void 0 : options.scale) !== null && _k !== void 0 ? _k : 2,
|
|
8039
|
+
allowNegative: (_l = options === null || options === void 0 ? void 0 : options.allowNegative) !== null && _l !== void 0 ? _l : true
|
|
8040
|
+
};
|
|
8041
|
+
var isNumber = !(new BigNumber(value).isNaN());
|
|
8042
|
+
return applyMask(value, configs, isNumber);
|
|
8043
|
+
}));
|
|
8044
|
+
};
|
|
8045
|
+
LocalizedBignumberPipe.ctorParameters = function () { return [
|
|
8046
|
+
{ type: LocaleService }
|
|
8047
|
+
]; };
|
|
8048
|
+
LocalizedBignumberPipe = __decorate([
|
|
8049
|
+
Pipe({
|
|
8050
|
+
name: "localizedBignumber",
|
|
8308
8051
|
})
|
|
8309
|
-
],
|
|
8310
|
-
return
|
|
8052
|
+
], LocalizedBignumberPipe);
|
|
8053
|
+
return LocalizedBignumberPipe;
|
|
8311
8054
|
}());
|
|
8312
8055
|
|
|
8313
|
-
var
|
|
8314
|
-
|
|
8056
|
+
var LocalizedBignumberImpurePipe = /** @class */ (function (_super) {
|
|
8057
|
+
__extends(LocalizedBignumberImpurePipe, _super);
|
|
8058
|
+
function LocalizedBignumberImpurePipe() {
|
|
8059
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
8315
8060
|
}
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8061
|
+
LocalizedBignumberImpurePipe.prototype.transform = function (value, options) {
|
|
8062
|
+
return _super.prototype.transform.call(this, value, options);
|
|
8063
|
+
};
|
|
8064
|
+
LocalizedBignumberImpurePipe = __decorate([
|
|
8065
|
+
Pipe({
|
|
8066
|
+
name: "localizedBignumberImpure",
|
|
8067
|
+
pure: false,
|
|
8319
8068
|
})
|
|
8320
|
-
],
|
|
8321
|
-
return
|
|
8322
|
-
}());
|
|
8323
|
-
|
|
8324
|
-
var SVGFactoryIcons;
|
|
8325
|
-
(function (SVGFactoryIcons) {
|
|
8326
|
-
SVGFactoryIcons["IAssist"] = "iassist";
|
|
8327
|
-
SVGFactoryIcons["Senior"] = "senior";
|
|
8328
|
-
})(SVGFactoryIcons || (SVGFactoryIcons = {}));
|
|
8069
|
+
], LocalizedBignumberImpurePipe);
|
|
8070
|
+
return LocalizedBignumberImpurePipe;
|
|
8071
|
+
}(LocalizedBignumberPipe));
|
|
8329
8072
|
|
|
8330
|
-
var
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8073
|
+
var LocalizedCurrencyPipeOptions = /** @class */ (function (_super) {
|
|
8074
|
+
__extends(LocalizedCurrencyPipeOptions, _super);
|
|
8075
|
+
function LocalizedCurrencyPipeOptions(config) {
|
|
8076
|
+
if (config === void 0) { config = {}; }
|
|
8077
|
+
var _this = _super.call(this, config) || this;
|
|
8078
|
+
_this.scale = 2;
|
|
8079
|
+
return _this;
|
|
8336
8080
|
}
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
this.viewContainerRef.clear();
|
|
8350
|
-
this.viewContainerRef.createComponent(factory);
|
|
8351
|
-
this.cdr.detectChanges();
|
|
8352
|
-
};
|
|
8353
|
-
SVGFactoryDirective.prototype._getIconClass = function (icon) {
|
|
8354
|
-
switch (icon) {
|
|
8355
|
-
case SVGFactoryIcons.IAssist:
|
|
8356
|
-
return IAssistIconComponent;
|
|
8357
|
-
case SVGFactoryIcons.Senior:
|
|
8358
|
-
default:
|
|
8359
|
-
return SeniorIconComponent;
|
|
8081
|
+
return LocalizedCurrencyPipeOptions;
|
|
8082
|
+
}(NumberLocaleOptions));
|
|
8083
|
+
/**
|
|
8084
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
8085
|
+
*/
|
|
8086
|
+
var LocalizedCurrencyPipe = /** @class */ (function () {
|
|
8087
|
+
function LocalizedCurrencyPipe(localeService) {
|
|
8088
|
+
this.localeService = localeService;
|
|
8089
|
+
}
|
|
8090
|
+
LocalizedCurrencyPipe.prototype.transform = function (value, options) {
|
|
8091
|
+
if (!options) {
|
|
8092
|
+
options = new LocalizedCurrencyPipeOptions();
|
|
8360
8093
|
}
|
|
8094
|
+
return value !== undefined && value !== null ? this.applyMask(value, options) : of(value);
|
|
8361
8095
|
};
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8096
|
+
LocalizedCurrencyPipe.prototype.applyMask = function (value, options) {
|
|
8097
|
+
return this.localeService.get().pipe(map(function (localeConfig) {
|
|
8098
|
+
var config = __assign(__assign({}, localeConfig.number), options);
|
|
8099
|
+
var scale = config.scale, currencySymbol = config.currencySymbol, thousandsSeparator = config.thousandsSeparator, decimalSeparator = config.decimalSeparator;
|
|
8100
|
+
var rawValue = Number(value).toFixed(scale);
|
|
8101
|
+
var onlyNumbers = rawValue.replace(/[^0-9]/g, "");
|
|
8102
|
+
var integerPart = onlyNumbers
|
|
8103
|
+
.slice(0, onlyNumbers.length - scale)
|
|
8104
|
+
.replace(/^0*/g, "")
|
|
8105
|
+
.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparator) || "0";
|
|
8106
|
+
var decimalPart = onlyNumbers.slice(onlyNumbers.length - scale);
|
|
8107
|
+
var newValue = scale ? integerPart + decimalSeparator + decimalPart : integerPart;
|
|
8108
|
+
var isZero = !Number(onlyNumbers);
|
|
8109
|
+
var operator = rawValue.includes("-") && !isZero ? "-" : "";
|
|
8110
|
+
return "" + operator + currencySymbol + newValue;
|
|
8111
|
+
}));
|
|
8112
|
+
};
|
|
8113
|
+
LocalizedCurrencyPipe.ctorParameters = function () { return [
|
|
8114
|
+
{ type: LocaleService }
|
|
8366
8115
|
]; };
|
|
8367
|
-
__decorate([
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
SVGFactoryDirective = __decorate([
|
|
8371
|
-
Directive({
|
|
8372
|
-
selector: "[sSVGFactory]",
|
|
8116
|
+
LocalizedCurrencyPipe = __decorate([
|
|
8117
|
+
Pipe({
|
|
8118
|
+
name: "localizedCurrency",
|
|
8373
8119
|
})
|
|
8374
|
-
],
|
|
8375
|
-
return
|
|
8120
|
+
], LocalizedCurrencyPipe);
|
|
8121
|
+
return LocalizedCurrencyPipe;
|
|
8376
8122
|
}());
|
|
8377
8123
|
|
|
8378
|
-
|
|
8379
|
-
|
|
8124
|
+
/**
|
|
8125
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
8126
|
+
*/
|
|
8127
|
+
var LocalizedCurrencyImpurePipe = /** @class */ (function (_super) {
|
|
8128
|
+
__extends(LocalizedCurrencyImpurePipe, _super);
|
|
8129
|
+
function LocalizedCurrencyImpurePipe() {
|
|
8130
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
8380
8131
|
}
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
exports: [SVGFactoryDirective],
|
|
8132
|
+
LocalizedCurrencyImpurePipe.prototype.transform = function (value, options) {
|
|
8133
|
+
if (options === void 0) { options = new LocalizedCurrencyPipeOptions(); }
|
|
8134
|
+
return _super.prototype.transform.call(this, value, options);
|
|
8135
|
+
};
|
|
8136
|
+
LocalizedCurrencyImpurePipe = __decorate([
|
|
8137
|
+
Pipe({
|
|
8138
|
+
name: "localizedCurrencyImpure",
|
|
8139
|
+
pure: false,
|
|
8390
8140
|
})
|
|
8391
|
-
],
|
|
8392
|
-
return
|
|
8141
|
+
], LocalizedCurrencyImpurePipe);
|
|
8142
|
+
return LocalizedCurrencyImpurePipe;
|
|
8143
|
+
}(LocalizedCurrencyPipe));
|
|
8144
|
+
|
|
8145
|
+
var moment$2 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
8146
|
+
var LocalizedDatePipe = /** @class */ (function () {
|
|
8147
|
+
function LocalizedDatePipe(localeService) {
|
|
8148
|
+
this.localeService = localeService;
|
|
8149
|
+
}
|
|
8150
|
+
LocalizedDatePipe.prototype.transform = function (value, format) {
|
|
8151
|
+
if (format === void 0) { format = "L LTS"; }
|
|
8152
|
+
return this.localeService.get().pipe(map(function () { return (value ? moment$2(value).format(format) : value); }));
|
|
8153
|
+
};
|
|
8154
|
+
LocalizedDatePipe.ctorParameters = function () { return [
|
|
8155
|
+
{ type: LocaleService }
|
|
8156
|
+
]; };
|
|
8157
|
+
LocalizedDatePipe = __decorate([
|
|
8158
|
+
Pipe({
|
|
8159
|
+
name: "localizedDate",
|
|
8160
|
+
})
|
|
8161
|
+
], LocalizedDatePipe);
|
|
8162
|
+
return LocalizedDatePipe;
|
|
8393
8163
|
}());
|
|
8394
8164
|
|
|
8395
|
-
var
|
|
8396
|
-
|
|
8165
|
+
var LocalizedDateImpurePipe = /** @class */ (function (_super) {
|
|
8166
|
+
__extends(LocalizedDateImpurePipe, _super);
|
|
8167
|
+
function LocalizedDateImpurePipe() {
|
|
8168
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
8397
8169
|
}
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
styles: [".dots-indicator .bounce{animation:1.2s ease-out infinite bounce;background-color:#333;border-radius:100%;display:inline-block;height:10px;width:10px}.dots-indicator .bounce+.bounce{margin-left:15px}.dots-indicator .bounce.bounce--1{animation-delay:0s}.dots-indicator .bounce.bounce--2{animation-delay:.1s}.dots-indicator .bounce.bounce--3{animation-delay:.2s}@keyframes bounce{100%,80%{transform:scale(1)}90%{transform:scale(1.8)}}"]
|
|
8170
|
+
LocalizedDateImpurePipe = __decorate([
|
|
8171
|
+
Pipe({
|
|
8172
|
+
name: "localizedDateImpure",
|
|
8173
|
+
pure: false,
|
|
8403
8174
|
})
|
|
8404
|
-
],
|
|
8405
|
-
return
|
|
8175
|
+
], LocalizedDateImpurePipe);
|
|
8176
|
+
return LocalizedDateImpurePipe;
|
|
8177
|
+
}(LocalizedDatePipe));
|
|
8178
|
+
|
|
8179
|
+
/**
|
|
8180
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
8181
|
+
*/
|
|
8182
|
+
var LocalizedNumberPipe = /** @class */ (function () {
|
|
8183
|
+
function LocalizedNumberPipe(localeService) {
|
|
8184
|
+
this.localeService = localeService;
|
|
8185
|
+
}
|
|
8186
|
+
LocalizedNumberPipe.prototype.transform = function (value, minimumFractionDigits) {
|
|
8187
|
+
return from(this.localeService.getLocale()).pipe(map(function (locale) {
|
|
8188
|
+
var numericValue = Number(value);
|
|
8189
|
+
if (!value && isNaN(numericValue))
|
|
8190
|
+
return;
|
|
8191
|
+
return new Intl.NumberFormat(locale, {
|
|
8192
|
+
minimumFractionDigits: minimumFractionDigits || 0,
|
|
8193
|
+
}).format(Number(value));
|
|
8194
|
+
}));
|
|
8195
|
+
};
|
|
8196
|
+
LocalizedNumberPipe.ctorParameters = function () { return [
|
|
8197
|
+
{ type: LocaleService }
|
|
8198
|
+
]; };
|
|
8199
|
+
LocalizedNumberPipe = __decorate([
|
|
8200
|
+
Pipe({ name: "localizedNumber" })
|
|
8201
|
+
], LocalizedNumberPipe);
|
|
8202
|
+
return LocalizedNumberPipe;
|
|
8406
8203
|
}());
|
|
8407
8204
|
|
|
8408
|
-
var
|
|
8409
|
-
|
|
8205
|
+
var moment$3 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
8206
|
+
var LocalizedTimePipe = /** @class */ (function () {
|
|
8207
|
+
function LocalizedTimePipe(localeService) {
|
|
8208
|
+
this.localeService = localeService;
|
|
8410
8209
|
}
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8210
|
+
LocalizedTimePipe.prototype.transform = function (value, format) {
|
|
8211
|
+
if (format === void 0) { format = "LTS"; }
|
|
8212
|
+
return this.localeService.get().pipe(map(function () { return (value ? moment$3(value, "HH:mm:ss").format(format) : value); }));
|
|
8213
|
+
};
|
|
8214
|
+
LocalizedTimePipe.ctorParameters = function () { return [
|
|
8215
|
+
{ type: LocaleService }
|
|
8216
|
+
]; };
|
|
8217
|
+
LocalizedTimePipe = __decorate([
|
|
8218
|
+
Pipe({
|
|
8219
|
+
name: "localizedTime",
|
|
8416
8220
|
})
|
|
8417
|
-
],
|
|
8418
|
-
return
|
|
8221
|
+
], LocalizedTimePipe);
|
|
8222
|
+
return LocalizedTimePipe;
|
|
8419
8223
|
}());
|
|
8420
8224
|
|
|
8421
|
-
var
|
|
8422
|
-
(
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
}
|
|
8225
|
+
var LocalizedTimeImpurePipe = /** @class */ (function (_super) {
|
|
8226
|
+
__extends(LocalizedTimeImpurePipe, _super);
|
|
8227
|
+
function LocalizedTimeImpurePipe() {
|
|
8228
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
8229
|
+
}
|
|
8230
|
+
LocalizedTimeImpurePipe = __decorate([
|
|
8231
|
+
Pipe({
|
|
8232
|
+
name: "localizedTimeImpure",
|
|
8233
|
+
pure: false,
|
|
8234
|
+
})
|
|
8235
|
+
], LocalizedTimeImpurePipe);
|
|
8236
|
+
return LocalizedTimeImpurePipe;
|
|
8237
|
+
}(LocalizedTimePipe));
|
|
8426
8238
|
|
|
8427
|
-
var
|
|
8428
|
-
function
|
|
8429
|
-
this.
|
|
8430
|
-
this.
|
|
8431
|
-
|
|
8432
|
-
|
|
8239
|
+
var CurrencyService = /** @class */ (function () {
|
|
8240
|
+
function CurrencyService(localeService) {
|
|
8241
|
+
this.localeService = localeService;
|
|
8242
|
+
this.currencies = {
|
|
8243
|
+
KHR: { precision: 12, scale: 2 },
|
|
8244
|
+
SSP: { precision: 12, scale: 2 },
|
|
8245
|
+
XCD: { precision: 12, scale: 2 },
|
|
8246
|
+
EGP: { precision: 12, scale: 2 },
|
|
8247
|
+
KWD: { precision: 12, scale: 3 },
|
|
8248
|
+
YER: { precision: 12, scale: 2 },
|
|
8249
|
+
HUF: { precision: 12, scale: 2 },
|
|
8250
|
+
MXN: { precision: 12, scale: 2 },
|
|
8251
|
+
MYR: { precision: 12, scale: 2 },
|
|
8252
|
+
ZWL: { precision: 12, scale: 2 },
|
|
8253
|
+
MUR: { precision: 12, scale: 2 },
|
|
8254
|
+
DKK: { precision: 12, scale: 2 },
|
|
8255
|
+
NOK: { precision: 12, scale: 2 },
|
|
8256
|
+
DJF: { precision: 12, scale: 0 },
|
|
8257
|
+
CRC: { precision: 12, scale: 2 },
|
|
8258
|
+
BND: { precision: 12, scale: 2 },
|
|
8259
|
+
NAD: { precision: 12, scale: 2 },
|
|
8260
|
+
MKD: { precision: 12, scale: 2 },
|
|
8261
|
+
CDF: { precision: 12, scale: 2 },
|
|
8262
|
+
GNF: { precision: 12, scale: 0 },
|
|
8263
|
+
EUR: { precision: 12, scale: 2 },
|
|
8264
|
+
OMR: { precision: 12, scale: 3 },
|
|
8265
|
+
CLP: { precision: 12, scale: 0 },
|
|
8266
|
+
BSD: { precision: 12, scale: 2 },
|
|
8267
|
+
TOP: { precision: 12, scale: 2 },
|
|
8268
|
+
IRR: { precision: 12, scale: 2 },
|
|
8269
|
+
BGN: { precision: 12, scale: 2 },
|
|
8270
|
+
BZD: { precision: 12, scale: 2 },
|
|
8271
|
+
CNY: { precision: 12, scale: 2 },
|
|
8272
|
+
FJD: { precision: 12, scale: 2 },
|
|
8273
|
+
SRD: { precision: 12, scale: 2 },
|
|
8274
|
+
SOS: { precision: 12, scale: 2 },
|
|
8275
|
+
GYD: { precision: 12, scale: 2 },
|
|
8276
|
+
VUV: { precision: 12, scale: 0 },
|
|
8277
|
+
MWK: { precision: 12, scale: 2 },
|
|
8278
|
+
MRU: { precision: 12, scale: 2 },
|
|
8279
|
+
LSL: { precision: 12, scale: 2 },
|
|
8280
|
+
ERN: { precision: 12, scale: 2 },
|
|
8281
|
+
BMD: { precision: 12, scale: 2 },
|
|
8282
|
+
WST: { precision: 12, scale: 2 },
|
|
8283
|
+
LRD: { precision: 12, scale: 2 },
|
|
8284
|
+
GMD: { precision: 12, scale: 2 },
|
|
8285
|
+
ARS: { precision: 12, scale: 2 },
|
|
8286
|
+
ZAR: { precision: 12, scale: 2 },
|
|
8287
|
+
RSD: { precision: 12, scale: 2 },
|
|
8288
|
+
MDL: { precision: 12, scale: 2 },
|
|
8289
|
+
USD: { precision: 12, scale: 2 },
|
|
8290
|
+
QAR: { precision: 12, scale: 2 },
|
|
8291
|
+
HRK: { precision: 12, scale: 2 },
|
|
8292
|
+
GIP: { precision: 12, scale: 2 },
|
|
8293
|
+
NPR: { precision: 12, scale: 2 },
|
|
8294
|
+
"002": { precision: 9, scale: 4 },
|
|
8295
|
+
PLN: { precision: 12, scale: 2 },
|
|
8296
|
+
MAD: { precision: 12, scale: 2 },
|
|
8297
|
+
BAM: { precision: 12, scale: 2 },
|
|
8298
|
+
BTN: { precision: 12, scale: 2 },
|
|
8299
|
+
BBD: { precision: 12, scale: 2 },
|
|
8300
|
+
SHP: { precision: 12, scale: 2 },
|
|
8301
|
+
LKR: { precision: 12, scale: 2 },
|
|
8302
|
+
KPW: { precision: 12, scale: 2 },
|
|
8303
|
+
LAK: { precision: 12, scale: 2 },
|
|
8304
|
+
SZL: { precision: 12, scale: 2 },
|
|
8305
|
+
PHP: { precision: 12, scale: 2 },
|
|
8306
|
+
RWF: { precision: 12, scale: 0 },
|
|
8307
|
+
ISK: { precision: 12, scale: 0 },
|
|
8308
|
+
XOF: { precision: 12, scale: 0 },
|
|
8309
|
+
AUD: { precision: 12, scale: 2 },
|
|
8310
|
+
NGN: { precision: 12, scale: 2 },
|
|
8311
|
+
KGS: { precision: 12, scale: 2 },
|
|
8312
|
+
KYD: { precision: 12, scale: 2 },
|
|
8313
|
+
PGK: { precision: 12, scale: 2 },
|
|
8314
|
+
DZD: { precision: 12, scale: 2 },
|
|
8315
|
+
XAF: { precision: 12, scale: 0 },
|
|
8316
|
+
PEN: { precision: 12, scale: 2 },
|
|
8317
|
+
JPY: { precision: 12, scale: 0 },
|
|
8318
|
+
SBD: { precision: 12, scale: 2 },
|
|
8319
|
+
UGX: { precision: 12, scale: 0 },
|
|
8320
|
+
AMD: { precision: 12, scale: 2 },
|
|
8321
|
+
AED: { precision: 12, scale: 2 },
|
|
8322
|
+
ALL: { precision: 12, scale: 2 },
|
|
8323
|
+
XPF: { precision: 12, scale: 0 },
|
|
8324
|
+
AFN: { precision: 12, scale: 2 },
|
|
8325
|
+
RON: { precision: 12, scale: 2 },
|
|
8326
|
+
TND: { precision: 12, scale: 3 },
|
|
8327
|
+
NZD: { precision: 12, scale: 2 },
|
|
8328
|
+
JOD: { precision: 12, scale: 3 },
|
|
8329
|
+
VND: { precision: 12, scale: 0 },
|
|
8330
|
+
ETB: { precision: 12, scale: 2 },
|
|
8331
|
+
PYG: { precision: 12, scale: 0 },
|
|
8332
|
+
JMD: { precision: 12, scale: 2 },
|
|
8333
|
+
KES: { precision: 12, scale: 2 },
|
|
8334
|
+
IDR: { precision: 12, scale: 2 },
|
|
8335
|
+
HKD: { precision: 12, scale: 2 },
|
|
8336
|
+
BDT: { precision: 12, scale: 2 },
|
|
8337
|
+
GBP: { precision: 12, scale: 2 },
|
|
8338
|
+
AOA: { precision: 12, scale: 2 },
|
|
8339
|
+
PKR: { precision: 12, scale: 2 },
|
|
8340
|
+
TRY: { precision: 12, scale: 2 },
|
|
8341
|
+
SLL: { precision: 12, scale: 2 },
|
|
8342
|
+
CVE: { precision: 12, scale: 2 },
|
|
8343
|
+
LYD: { precision: 12, scale: 3 },
|
|
8344
|
+
ILS: { precision: 12, scale: 2 },
|
|
8345
|
+
UZS: { precision: 12, scale: 2 },
|
|
8346
|
+
CHF: { precision: 12, scale: 2 },
|
|
8347
|
+
SVC: { precision: 12, scale: 2 },
|
|
8348
|
+
BRL: { precision: 12, scale: 2 },
|
|
8349
|
+
GHS: { precision: 12, scale: 2 },
|
|
8350
|
+
CUP: { precision: 12, scale: 2 },
|
|
8351
|
+
FKP: { precision: 12, scale: 2 },
|
|
8352
|
+
NIO: { precision: 12, scale: 2 },
|
|
8353
|
+
GEL: { precision: 12, scale: 2 },
|
|
8354
|
+
TTD: { precision: 12, scale: 2 },
|
|
8355
|
+
AAA: { precision: 1, scale: 1 },
|
|
8356
|
+
COP: { precision: 12, scale: 2 },
|
|
8357
|
+
MGA: { precision: 12, scale: 2 },
|
|
8358
|
+
INR: { precision: 12, scale: 2 },
|
|
8359
|
+
KRW: { precision: 12, scale: 0 },
|
|
8360
|
+
HNL: { precision: 12, scale: 2 },
|
|
8361
|
+
MMK: { precision: 12, scale: 2 },
|
|
8362
|
+
TZS: { precision: 12, scale: 2 },
|
|
8363
|
+
THB: { precision: 12, scale: 2 },
|
|
8364
|
+
TMT: { precision: 12, scale: 2 },
|
|
8365
|
+
SAR: { precision: 12, scale: 2 },
|
|
8366
|
+
UYU: { precision: 12, scale: 2 },
|
|
8367
|
+
BIF: { precision: 12, scale: 0 },
|
|
8368
|
+
MVR: { precision: 12, scale: 2 },
|
|
8369
|
+
RUB: { precision: 12, scale: 2 },
|
|
8370
|
+
GTQ: { precision: 12, scale: 2 },
|
|
8371
|
+
SCR: { precision: 12, scale: 2 },
|
|
8372
|
+
IQD: { precision: 12, scale: 3 },
|
|
8373
|
+
UAH: { precision: 12, scale: 2 },
|
|
8374
|
+
BYN: { precision: 12, scale: 2 },
|
|
8375
|
+
VES: { precision: 12, scale: 2 },
|
|
8376
|
+
BOB: { precision: 12, scale: 2 },
|
|
8377
|
+
SGD: { precision: 12, scale: 2 },
|
|
8378
|
+
ZMW: { precision: 12, scale: 2 },
|
|
8379
|
+
CZK: { precision: 12, scale: 2 },
|
|
8380
|
+
TJS: { precision: 12, scale: 2 },
|
|
8381
|
+
DOP: { precision: 12, scale: 2 },
|
|
8382
|
+
AZN: { precision: 12, scale: 2 },
|
|
8383
|
+
PAB: { precision: 12, scale: 2 },
|
|
8384
|
+
STN: { precision: 12, scale: 2 },
|
|
8385
|
+
SDG: { precision: 12, scale: 2 },
|
|
8386
|
+
BWP: { precision: 12, scale: 2 },
|
|
8387
|
+
BHD: { precision: 12, scale: 3 },
|
|
8388
|
+
CAD: { precision: 12, scale: 2 },
|
|
8389
|
+
MNT: { precision: 12, scale: 2 },
|
|
8390
|
+
MOP: { precision: 12, scale: 2 },
|
|
8391
|
+
HTG: { precision: 12, scale: 2 },
|
|
8392
|
+
KZT: { precision: 12, scale: 2 },
|
|
8393
|
+
LBP: { precision: 12, scale: 2 },
|
|
8394
|
+
SYP: { precision: 12, scale: 2 },
|
|
8395
|
+
TWD: { precision: 12, scale: 2 },
|
|
8396
|
+
MZN: { precision: 12, scale: 2 },
|
|
8397
|
+
ANG: { precision: 12, scale: 2 },
|
|
8398
|
+
SEK: { precision: 12, scale: 2 },
|
|
8399
|
+
KMF: { precision: 12, scale: 0 },
|
|
8400
|
+
AWG: { precision: 12, scale: 2 },
|
|
8401
|
+
};
|
|
8433
8402
|
}
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
}
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8403
|
+
CurrencyService.prototype.getCurrencySymbol = function (_a) {
|
|
8404
|
+
var currency = _a.currency;
|
|
8405
|
+
var _b, _c;
|
|
8406
|
+
var numberFormat = new Intl.NumberFormat(this.localeService.getLocaleOptions().locale, {
|
|
8407
|
+
style: "currency",
|
|
8408
|
+
currency: currency !== null && currency !== void 0 ? currency : "BRL",
|
|
8409
|
+
currencyDisplay: "narrowSymbol",
|
|
8410
|
+
maximumFractionDigits: 5,
|
|
8411
|
+
});
|
|
8412
|
+
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 : "";
|
|
8413
|
+
};
|
|
8414
|
+
CurrencyService.ctorParameters = function () { return [
|
|
8415
|
+
{ type: LocaleService }
|
|
8416
|
+
]; };
|
|
8417
|
+
CurrencyService.ɵprov = ɵɵdefineInjectable({ factory: function CurrencyService_Factory() { return new CurrencyService(ɵɵinject(LocaleService)); }, token: CurrencyService, providedIn: "root" });
|
|
8418
|
+
CurrencyService = __decorate([
|
|
8419
|
+
Injectable({ providedIn: "root" })
|
|
8420
|
+
], CurrencyService);
|
|
8421
|
+
return CurrencyService;
|
|
8422
|
+
}());
|
|
8423
|
+
|
|
8424
|
+
var NumericService = /** @class */ (function () {
|
|
8425
|
+
function NumericService(localeService, currencyService) {
|
|
8426
|
+
this.localeService = localeService;
|
|
8427
|
+
this.currencyService = currencyService;
|
|
8428
|
+
}
|
|
8429
|
+
/**
|
|
8430
|
+
* Wrapper around Intl.NumberFormat that returns the localized value using the user's locale by default(platform's preferential language).
|
|
8431
|
+
*
|
|
8432
|
+
* This method should only be used after the localeService has been initialized by the host application, either by a resolver or a manual call.
|
|
8433
|
+
*
|
|
8434
|
+
* Can be overwritten by the provided Intl.NumberFormatOptions.
|
|
8435
|
+
*
|
|
8436
|
+
* Documentation is available at {@link https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat Intl.NumberFormatOptions}.
|
|
8437
|
+
*
|
|
8438
|
+
* @param {number | string | BigNumber} value The value to be formatted.
|
|
8439
|
+
* @param options Locale and numberFormatOptions that overwrites the default Intl.NumberFormatOptions.
|
|
8440
|
+
* @return `string` The formatted value.
|
|
8441
|
+
*/
|
|
8442
|
+
NumericService.prototype.instant = function (value, options) {
|
|
8443
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
8444
|
+
if (isNullOrUndefined(value))
|
|
8445
|
+
return null;
|
|
8446
|
+
options = __assign(__assign({}, options), { locale: (_c = (_a = options === null || options === void 0 ? void 0 : options.locale) !== null && _a !== void 0 ? _a : (_b = this.localeService.getLocaleOptions()) === null || _b === void 0 ? void 0 : _b.locale) !== null && _c !== void 0 ? _c : "pt-BR", numberFormatOptions: __assign(__assign({ useGrouping: true }, options === null || options === void 0 ? void 0 : options.numberFormatOptions), { currency: ((_d = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _d === void 0 ? void 0 : _d.style) === "currency" ? ((_f = (_e = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _e === void 0 ? void 0 : _e.currency) !== null && _f !== void 0 ? _f : "BRL") : undefined, currencyDisplay: ((_g = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _g === void 0 ? void 0 : _g.style) === "currency"
|
|
8447
|
+
? ((_j = (_h = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _h === void 0 ? void 0 : _h.currencyDisplay) !== null && _j !== void 0 ? _j : "narrowSymbol")
|
|
8448
|
+
: undefined, minimumFractionDigits: (_l = (_k = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _k === void 0 ? void 0 : _k.minimumFractionDigits) !== null && _l !== void 0 ? _l : this.getCurrencyMinimumFractionDigits((_m = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _m === void 0 ? void 0 : _m.currency) }) });
|
|
8449
|
+
options.numberFormatOptions["roundingMode"] = "trunc";
|
|
8450
|
+
// From https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
|
|
8451
|
+
return new Intl.NumberFormat(options.locale, options.numberFormatOptions).format(this.getType(value) === "number" || this.getType(value) === "string" ? value : value.toString());
|
|
8458
8452
|
};
|
|
8459
|
-
|
|
8460
|
-
var
|
|
8461
|
-
if (
|
|
8462
|
-
|
|
8463
|
-
|
|
8453
|
+
NumericService.prototype.getCurrencyMinimumFractionDigits = function (currency) {
|
|
8454
|
+
var _a;
|
|
8455
|
+
if (!currency)
|
|
8456
|
+
return null;
|
|
8457
|
+
return (_a = this.currencyService.currencies[currency.toUpperCase()]) === null || _a === void 0 ? void 0 : _a.scale;
|
|
8458
|
+
};
|
|
8459
|
+
NumericService.prototype.getType = function (value) {
|
|
8460
|
+
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
|
|
8461
|
+
if (value === null) {
|
|
8462
|
+
return "null";
|
|
8464
8463
|
}
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
}, this.UNBLOCK_TIMEOUT_VALUE);
|
|
8464
|
+
var baseType = typeof value;
|
|
8465
|
+
// Primitive types
|
|
8466
|
+
if (baseType !== "object" && baseType !== "function") {
|
|
8467
|
+
return baseType;
|
|
8470
8468
|
}
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8469
|
+
// Symbol.toStringTag often specifies the "display name" of the
|
|
8470
|
+
// object's class. It's used in Object.prototype.toString().
|
|
8471
|
+
var tag = value[Symbol.toStringTag];
|
|
8472
|
+
if (typeof tag === "string") {
|
|
8473
|
+
return tag;
|
|
8475
8474
|
}
|
|
8476
|
-
|
|
8477
|
-
|
|
8475
|
+
// If it's a function whose source code starts with the "class" keyword
|
|
8476
|
+
if (baseType === "function" && Function.prototype.toString.call(value).startsWith("class")) {
|
|
8477
|
+
return "class";
|
|
8478
8478
|
}
|
|
8479
|
+
// The name of the constructor; for example `Array`, `GeneratorFunction`,
|
|
8480
|
+
// `Number`, `String`, `Boolean` or `MyCustomClass`
|
|
8481
|
+
var className = value.constructor.name;
|
|
8482
|
+
if (typeof className === "string" && className !== "") {
|
|
8483
|
+
return className;
|
|
8484
|
+
}
|
|
8485
|
+
// At this point there's no robust way to get the type of value,
|
|
8486
|
+
// so we use the base implementation.
|
|
8487
|
+
return baseType;
|
|
8479
8488
|
};
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
__decorate([
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
__decorate([
|
|
8489
|
-
Input()
|
|
8490
|
-
], LoadingStateComponent.prototype, "blockWindow", void 0);
|
|
8491
|
-
__decorate([
|
|
8492
|
-
Input()
|
|
8493
|
-
], LoadingStateComponent.prototype, "loading", null);
|
|
8494
|
-
LoadingStateComponent = LoadingStateComponent_1 = __decorate([
|
|
8495
|
-
Component({
|
|
8496
|
-
selector: "s-loading-state",
|
|
8497
|
-
template: "<div\n [id]=\"id\"\n class=\"s-loading-state-container\"\n [ngClass]=\"{\n 'loading': loading,\n 'blocking': blocking,\n 'fullscreen': blockWindow\n }\">\n <div\n [id]=\"id + '-loader'\"\n class=\"loader\">\n <div\n [id]=\"id + '-spinner'\"\n class=\"spinner\">\n <ng-container [ngSwitch]=\"indicator\">\n <s-logo-indicator *ngSwitchCase=\"'logo'\"></s-logo-indicator>\n <s-dots-indicator *ngSwitchCase=\"'dots'\"></s-dots-indicator>\n </ng-container>\n </div>\n <div\n [id]=\"id + '-overlay'\"\n class=\"overlay\">\n </div>\n </div>\n <div\n [id]=\"id + '-contents'\"\n class=\"contents\">\n <ng-container *ngTemplateOutlet=\"contents || originalContent\"></ng-container>\n <ng-template #originalContent>\n <ng-content></ng-content>\n </ng-template>\n </div>\n</div>",
|
|
8498
|
-
styles: [".s-loading-state-container{position:relative}.s-loading-state-container .loader{opacity:0;position:absolute;transition:opacity .2s ease-out,display .2s ease-out;visibility:hidden;inset:1px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.s-loading-state-container .loader .overlay{background-color:#fff;height:100%;opacity:.8;transition:opacity .2s ease-out,display .2s ease-out;width:100%}.s-loading-state-container .loader .spinner{display:-ms-flexbox;display:flex;position:absolute;z-index:2}.s-loading-state-container.blocking>.loader,.s-loading-state-container.loading>.loader{visibility:visible}.s-loading-state-container.blocking>.loader,.s-loading-state-container.blocking>.loader>.overlay,.s-loading-state-container.loading>.loader,.s-loading-state-container.loading>.loader>.overlay{cursor:wait;z-index:1}.s-loading-state-container.blocking>.contents,.s-loading-state-container.loading>.contents{z-index:0!important}.s-loading-state-container.blocking.loading>.loader{opacity:1}.s-loading-state-container.fullscreen>.loader{left:0;position:fixed;top:0;z-index:1005}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.loader{opacity:0;visibility:hidden}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.contents{z-index:0!important}"]
|
|
8489
|
+
NumericService.ctorParameters = function () { return [
|
|
8490
|
+
{ type: LocaleService },
|
|
8491
|
+
{ type: CurrencyService }
|
|
8492
|
+
]; };
|
|
8493
|
+
NumericService.ɵprov = ɵɵdefineInjectable({ factory: function NumericService_Factory() { return new NumericService(ɵɵinject(LocaleService), ɵɵinject(CurrencyService)); }, token: NumericService, providedIn: "root" });
|
|
8494
|
+
NumericService = __decorate([
|
|
8495
|
+
Injectable({
|
|
8496
|
+
providedIn: "root",
|
|
8499
8497
|
})
|
|
8500
|
-
],
|
|
8501
|
-
return
|
|
8498
|
+
], NumericService);
|
|
8499
|
+
return NumericService;
|
|
8502
8500
|
}());
|
|
8503
8501
|
|
|
8504
|
-
var
|
|
8505
|
-
function
|
|
8506
|
-
this.
|
|
8507
|
-
this.
|
|
8508
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
8509
|
-
this.cdr = cdr;
|
|
8510
|
-
this._loading = false;
|
|
8511
|
-
this.indicator = LoadingStateIndicators.Dots;
|
|
8502
|
+
var NumericPipe = /** @class */ (function () {
|
|
8503
|
+
function NumericPipe(numericService, localeService) {
|
|
8504
|
+
this.numericService = numericService;
|
|
8505
|
+
this.localeService = localeService;
|
|
8512
8506
|
}
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
}
|
|
8523
|
-
if (this.loaderComponent) {
|
|
8524
|
-
this.loaderComponent.instance.loading = this._loading;
|
|
8525
|
-
this.loaderComponent.instance.indicator = this.indicator;
|
|
8526
|
-
}
|
|
8527
|
-
},
|
|
8528
|
-
enumerable: true,
|
|
8529
|
-
configurable: true
|
|
8530
|
-
});
|
|
8531
|
-
LoadingStateDirective.prototype.ngAfterViewInit = function () {
|
|
8532
|
-
this.createComponent();
|
|
8533
|
-
};
|
|
8534
|
-
LoadingStateDirective.prototype.createComponent = function () {
|
|
8535
|
-
var factory = this.componentFactoryResolver.resolveComponentFactory(LoadingStateComponent);
|
|
8536
|
-
this.loaderComponent = this.target.createComponent(factory);
|
|
8537
|
-
this.loaderComponent.instance.contents = this.template;
|
|
8538
|
-
this.loaderComponent.instance.loading = this._loading;
|
|
8539
|
-
this.loaderComponent.instance.indicator = this.indicator;
|
|
8540
|
-
this.cdr.detectChanges();
|
|
8541
|
-
};
|
|
8542
|
-
LoadingStateDirective.prototype.ngOnDestroy = function () {
|
|
8543
|
-
if (this.loaderComponent) {
|
|
8544
|
-
this.loaderComponent.destroy();
|
|
8545
|
-
}
|
|
8507
|
+
NumericPipe.prototype.transform = function (value, options) {
|
|
8508
|
+
var _this = this;
|
|
8509
|
+
return (options === null || options === void 0 ? void 0 : options.locale) ? of(this.numericService.instant(value, options))
|
|
8510
|
+
: this.localeService.getLocale().pipe(map(function (locale) {
|
|
8511
|
+
return _this.numericService.instant(value, {
|
|
8512
|
+
locale: locale,
|
|
8513
|
+
numberFormatOptions: options === null || options === void 0 ? void 0 : options.numberFormatOptions,
|
|
8514
|
+
});
|
|
8515
|
+
}));
|
|
8546
8516
|
};
|
|
8547
|
-
|
|
8548
|
-
{ type:
|
|
8549
|
-
{ type:
|
|
8550
|
-
{ type: ComponentFactoryResolver },
|
|
8551
|
-
{ type: ChangeDetectorRef }
|
|
8517
|
+
NumericPipe.ctorParameters = function () { return [
|
|
8518
|
+
{ type: NumericService },
|
|
8519
|
+
{ type: LocaleService }
|
|
8552
8520
|
]; };
|
|
8553
|
-
__decorate([
|
|
8554
|
-
|
|
8555
|
-
],
|
|
8556
|
-
|
|
8557
|
-
Directive({
|
|
8558
|
-
selector: "[sLoadingState]",
|
|
8559
|
-
})
|
|
8560
|
-
], LoadingStateDirective);
|
|
8561
|
-
return LoadingStateDirective;
|
|
8521
|
+
NumericPipe = __decorate([
|
|
8522
|
+
Pipe({ name: "numeric" })
|
|
8523
|
+
], NumericPipe);
|
|
8524
|
+
return NumericPipe;
|
|
8562
8525
|
}());
|
|
8563
8526
|
|
|
8564
|
-
var
|
|
8565
|
-
function
|
|
8527
|
+
var LocaleModule = /** @class */ (function () {
|
|
8528
|
+
function LocaleModule() {
|
|
8566
8529
|
}
|
|
8567
|
-
|
|
8530
|
+
LocaleModule_1 = LocaleModule;
|
|
8531
|
+
LocaleModule.forRoot = function () {
|
|
8532
|
+
return {
|
|
8533
|
+
ngModule: LocaleModule_1,
|
|
8534
|
+
providers: [
|
|
8535
|
+
LocaleService,
|
|
8536
|
+
LocalizedCurrencyPipe,
|
|
8537
|
+
LocalizedDatePipe,
|
|
8538
|
+
LocalizedTimePipe,
|
|
8539
|
+
LocalizedNumberPipe,
|
|
8540
|
+
LocalizedCurrencyImpurePipe,
|
|
8541
|
+
LocalizedDateImpurePipe,
|
|
8542
|
+
LocalizedTimeImpurePipe,
|
|
8543
|
+
LocalizedBignumberPipe,
|
|
8544
|
+
LocalizedBignumberImpurePipe,
|
|
8545
|
+
NumericPipe
|
|
8546
|
+
],
|
|
8547
|
+
};
|
|
8548
|
+
};
|
|
8549
|
+
LocaleModule.forChild = function () {
|
|
8550
|
+
return {
|
|
8551
|
+
ngModule: LocaleModule_1,
|
|
8552
|
+
};
|
|
8553
|
+
};
|
|
8554
|
+
var LocaleModule_1;
|
|
8555
|
+
LocaleModule = LocaleModule_1 = __decorate([
|
|
8568
8556
|
NgModule({
|
|
8569
|
-
imports: [
|
|
8570
|
-
|
|
8571
|
-
|
|
8557
|
+
imports: [CommonModule],
|
|
8558
|
+
exports: [
|
|
8559
|
+
LocalizedCurrencyPipe,
|
|
8560
|
+
LocalizedDatePipe,
|
|
8561
|
+
LocalizedTimePipe,
|
|
8562
|
+
LocalizedNumberPipe,
|
|
8563
|
+
LocalizedCurrencyImpurePipe,
|
|
8564
|
+
LocalizedDateImpurePipe,
|
|
8565
|
+
LocalizedTimeImpurePipe,
|
|
8566
|
+
LocalizedBignumberPipe,
|
|
8567
|
+
LocalizedBignumberImpurePipe,
|
|
8568
|
+
NumericPipe
|
|
8572
8569
|
],
|
|
8573
8570
|
declarations: [
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8571
|
+
LocalizedCurrencyPipe,
|
|
8572
|
+
LocalizedDatePipe,
|
|
8573
|
+
LocalizedTimePipe,
|
|
8574
|
+
LocalizedNumberPipe,
|
|
8575
|
+
LocalizedCurrencyImpurePipe,
|
|
8576
|
+
LocalizedDateImpurePipe,
|
|
8577
|
+
LocalizedTimeImpurePipe,
|
|
8578
|
+
LocalizedBignumberPipe,
|
|
8579
|
+
LocalizedBignumberImpurePipe,
|
|
8580
|
+
NumericPipe
|
|
8582
8581
|
],
|
|
8583
|
-
entryComponents: [LoadingStateComponent],
|
|
8584
8582
|
})
|
|
8585
|
-
],
|
|
8586
|
-
return
|
|
8583
|
+
], LocaleModule);
|
|
8584
|
+
return LocaleModule;
|
|
8587
8585
|
}());
|
|
8588
8586
|
|
|
8589
8587
|
var LocalizedNumberInputDirective = /** @class */ (function () {
|