@seniorsistemas/angular-components 17.16.8 → 17.16.9
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 +1190 -1192
- 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/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/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 +919 -921
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +1191 -1193
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -1221,6 +1221,7 @@
|
|
|
1221
1221
|
var _a;
|
|
1222
1222
|
var numberFormat = new Intl.NumberFormat(this.locale, {
|
|
1223
1223
|
style: "decimal",
|
|
1224
|
+
useGrouping: true,
|
|
1224
1225
|
minimumFractionDigits: 5,
|
|
1225
1226
|
maximumFractionDigits: 5,
|
|
1226
1227
|
});
|
|
@@ -5670,889 +5671,324 @@
|
|
|
5670
5671
|
return AutocompleteField;
|
|
5671
5672
|
}(Field));
|
|
5672
5673
|
|
|
5673
|
-
var
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
};
|
|
5694
|
-
LocalizedBignumberPipe.ctorParameters = function () { return [
|
|
5695
|
-
{ type: LocaleService }
|
|
5696
|
-
]; };
|
|
5697
|
-
LocalizedBignumberPipe = __decorate([
|
|
5698
|
-
core.Pipe({
|
|
5699
|
-
name: "localizedBignumber",
|
|
5700
|
-
})
|
|
5701
|
-
], LocalizedBignumberPipe);
|
|
5702
|
-
return LocalizedBignumberPipe;
|
|
5703
|
-
}());
|
|
5704
|
-
|
|
5705
|
-
var LocalizedBignumberImpurePipe = /** @class */ (function (_super) {
|
|
5706
|
-
__extends(LocalizedBignumberImpurePipe, _super);
|
|
5707
|
-
function LocalizedBignumberImpurePipe() {
|
|
5708
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
5674
|
+
var BignumberField = /** @class */ (function (_super) {
|
|
5675
|
+
__extends(BignumberField, _super);
|
|
5676
|
+
function BignumberField(config) {
|
|
5677
|
+
var _a, _b, _c;
|
|
5678
|
+
var _this = _super.call(this, config) || this;
|
|
5679
|
+
_this.allowNegative = (_a = config.allowNegative) !== null && _a !== void 0 ? _a : true;
|
|
5680
|
+
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
5681
|
+
_this.browserAutocomplete = config.browserAutocomplete;
|
|
5682
|
+
_this.precision = config.precision;
|
|
5683
|
+
_this.scale = (_b = config.scale) !== null && _b !== void 0 ? _b : 2;
|
|
5684
|
+
_this.alignTo = _this.scale ? ng2CurrencyMask.AlignmentOptions.RIGHT : ng2CurrencyMask.AlignmentOptions.LEFT;
|
|
5685
|
+
_this.mask = config.mask;
|
|
5686
|
+
_this.leftAddon = config.leftAddon;
|
|
5687
|
+
_this.rightAddon = config.rightAddon;
|
|
5688
|
+
_this.onBlur = config.onBlur;
|
|
5689
|
+
_this.onFocus = config.onFocus;
|
|
5690
|
+
_this.onComplete = config.onComplete;
|
|
5691
|
+
_this.onInput = config.onInput;
|
|
5692
|
+
_this.autoClear = (_c = config.autoClear) !== null && _c !== void 0 ? _c : true;
|
|
5693
|
+
return _this;
|
|
5709
5694
|
}
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
};
|
|
5713
|
-
LocalizedBignumberImpurePipe = __decorate([
|
|
5714
|
-
core.Pipe({
|
|
5715
|
-
name: "localizedBignumberImpure",
|
|
5716
|
-
pure: false,
|
|
5717
|
-
})
|
|
5718
|
-
], LocalizedBignumberImpurePipe);
|
|
5719
|
-
return LocalizedBignumberImpurePipe;
|
|
5720
|
-
}(LocalizedBignumberPipe));
|
|
5695
|
+
return BignumberField;
|
|
5696
|
+
}(Field));
|
|
5721
5697
|
|
|
5722
|
-
var
|
|
5723
|
-
__extends(
|
|
5724
|
-
function
|
|
5725
|
-
if (config === void 0) { config = {}; }
|
|
5698
|
+
var BlobField = /** @class */ (function (_super) {
|
|
5699
|
+
__extends(BlobField, _super);
|
|
5700
|
+
function BlobField(config) {
|
|
5726
5701
|
var _this = _super.call(this, config) || this;
|
|
5727
|
-
_this.
|
|
5702
|
+
_this.accept = config.accept;
|
|
5703
|
+
_this.files = config.files || [];
|
|
5704
|
+
_this.chooseLabel = config.chooseLabel;
|
|
5705
|
+
_this.removeLabel = config.removeLabel;
|
|
5706
|
+
_this.cancelLabel = config.cancelLabel;
|
|
5707
|
+
_this.successTooltip = config.successTooltip;
|
|
5708
|
+
_this.multiple = config.multiple;
|
|
5709
|
+
_this.onUploadFile = config.onUploadFile;
|
|
5710
|
+
_this.onRemoveFile = config.onRemoveFile;
|
|
5711
|
+
_this.onCancelUpload = config.onCancelUpload;
|
|
5712
|
+
_this.onDownloadFile = config.onDownloadFile;
|
|
5713
|
+
_this.showFileUploadDate = config.showFileUploadDate;
|
|
5728
5714
|
return _this;
|
|
5729
5715
|
}
|
|
5730
|
-
return
|
|
5731
|
-
}(
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
this.
|
|
5716
|
+
return BlobField;
|
|
5717
|
+
}(Field));
|
|
5718
|
+
|
|
5719
|
+
var BooleanOptionsLabel = /** @class */ (function () {
|
|
5720
|
+
function BooleanOptionsLabel(config) {
|
|
5721
|
+
this.true = config.true;
|
|
5722
|
+
this.false = config.false;
|
|
5723
|
+
this.empty = config.empty;
|
|
5724
|
+
this.clear = config.clear;
|
|
5738
5725
|
}
|
|
5739
|
-
|
|
5740
|
-
if (!options) {
|
|
5741
|
-
options = new LocalizedCurrencyPipeOptions();
|
|
5742
|
-
}
|
|
5743
|
-
return value !== undefined && value !== null ? this.applyMask(value, options) : rxjs.of(value);
|
|
5744
|
-
};
|
|
5745
|
-
LocalizedCurrencyPipe.prototype.applyMask = function (value, options) {
|
|
5746
|
-
return this.localeService.get().pipe(operators.map(function (localeConfig) {
|
|
5747
|
-
var config = __assign(__assign({}, localeConfig.number), options);
|
|
5748
|
-
var scale = config.scale, currencySymbol = config.currencySymbol, thousandsSeparator = config.thousandsSeparator, decimalSeparator = config.decimalSeparator;
|
|
5749
|
-
var rawValue = Number(value).toFixed(scale);
|
|
5750
|
-
var onlyNumbers = rawValue.replace(/[^0-9]/g, "");
|
|
5751
|
-
var integerPart = onlyNumbers
|
|
5752
|
-
.slice(0, onlyNumbers.length - scale)
|
|
5753
|
-
.replace(/^0*/g, "")
|
|
5754
|
-
.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparator) || "0";
|
|
5755
|
-
var decimalPart = onlyNumbers.slice(onlyNumbers.length - scale);
|
|
5756
|
-
var newValue = scale ? integerPart + decimalSeparator + decimalPart : integerPart;
|
|
5757
|
-
var isZero = !Number(onlyNumbers);
|
|
5758
|
-
var operator = rawValue.includes("-") && !isZero ? "-" : "";
|
|
5759
|
-
return "" + operator + currencySymbol + newValue;
|
|
5760
|
-
}));
|
|
5761
|
-
};
|
|
5762
|
-
LocalizedCurrencyPipe.ctorParameters = function () { return [
|
|
5763
|
-
{ type: LocaleService }
|
|
5764
|
-
]; };
|
|
5765
|
-
LocalizedCurrencyPipe = __decorate([
|
|
5766
|
-
core.Pipe({
|
|
5767
|
-
name: "localizedCurrency",
|
|
5768
|
-
})
|
|
5769
|
-
], LocalizedCurrencyPipe);
|
|
5770
|
-
return LocalizedCurrencyPipe;
|
|
5726
|
+
return BooleanOptionsLabel;
|
|
5771
5727
|
}());
|
|
5728
|
+
var BooleanField = /** @class */ (function (_super) {
|
|
5729
|
+
__extends(BooleanField, _super);
|
|
5730
|
+
function BooleanField(config) {
|
|
5731
|
+
var _this = _super.call(this, config) || this;
|
|
5732
|
+
_this.verticalAlignment = config.verticalAlignment;
|
|
5733
|
+
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
5734
|
+
_this.representedBy = "radio";
|
|
5735
|
+
_this.onBlur = config.onBlur;
|
|
5736
|
+
_this.onFocus = config.onFocus;
|
|
5737
|
+
_this.onClick = config.onClick;
|
|
5738
|
+
return _this;
|
|
5739
|
+
}
|
|
5740
|
+
return BooleanField;
|
|
5741
|
+
}(Field));
|
|
5772
5742
|
|
|
5773
|
-
/**
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5743
|
+
var BooleanSwitchField = /** @class */ (function (_super) {
|
|
5744
|
+
__extends(BooleanSwitchField, _super);
|
|
5745
|
+
function BooleanSwitchField(config) {
|
|
5746
|
+
var _this = _super.call(this, config) || this;
|
|
5747
|
+
_this.onChange = config.onChange;
|
|
5748
|
+
if (config.optionsLabel) {
|
|
5749
|
+
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
5750
|
+
}
|
|
5751
|
+
_this.representedBy = "switch";
|
|
5752
|
+
return _this;
|
|
5780
5753
|
}
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
return _super.prototype.transform.call(this, value, options);
|
|
5784
|
-
};
|
|
5785
|
-
LocalizedCurrencyImpurePipe = __decorate([
|
|
5786
|
-
core.Pipe({
|
|
5787
|
-
name: "localizedCurrencyImpure",
|
|
5788
|
-
pure: false,
|
|
5789
|
-
})
|
|
5790
|
-
], LocalizedCurrencyImpurePipe);
|
|
5791
|
-
return LocalizedCurrencyImpurePipe;
|
|
5792
|
-
}(LocalizedCurrencyPipe));
|
|
5754
|
+
return BooleanSwitchField;
|
|
5755
|
+
}(Field));
|
|
5793
5756
|
|
|
5794
|
-
var
|
|
5795
|
-
|
|
5796
|
-
function
|
|
5797
|
-
|
|
5757
|
+
var CalendarField = /** @class */ (function (_super) {
|
|
5758
|
+
__extends(CalendarField, _super);
|
|
5759
|
+
function CalendarField(config) {
|
|
5760
|
+
var _this = _super.call(this, config) || this;
|
|
5761
|
+
_this.view = config.view || "date";
|
|
5762
|
+
_this.minDate = config.minDate;
|
|
5763
|
+
_this.maxDate = config.maxDate;
|
|
5764
|
+
_this.defaultDate = config.defaultDate;
|
|
5765
|
+
_this.appendTo = config.appendTo;
|
|
5766
|
+
_this.showOnFocus = typeof config.showOnFocus === "boolean" ? config.showOnFocus : true;
|
|
5767
|
+
_this.calendarLocaleOptions = config.calendarLocaleOptions;
|
|
5768
|
+
_this.onBlur = config.onBlur;
|
|
5769
|
+
_this.onFocus = config.onFocus;
|
|
5770
|
+
_this.onSelect = config.onSelect;
|
|
5771
|
+
_this.onInput = config.onInput;
|
|
5772
|
+
_this.onClose = config.onClose;
|
|
5773
|
+
_this.onTodayClick = config.onTodayClick;
|
|
5774
|
+
_this.onClearClick = config.onClearClick;
|
|
5775
|
+
_this.onMonthChange = config.onMonthChange;
|
|
5776
|
+
_this.onYearChange = config.onYearChange;
|
|
5777
|
+
_this.selectionMode = config.selectionMode || "single";
|
|
5778
|
+
_this.rangeSeparator = config.rangeSeparator || "-";
|
|
5779
|
+
_this.showSeconds = config.showSeconds;
|
|
5780
|
+
// Tornando true o padrão para showSeconds.
|
|
5781
|
+
if (_this.showSeconds === null || _this.showSeconds === undefined) {
|
|
5782
|
+
switch (_this.type) {
|
|
5783
|
+
case exports.FieldType.DateTime:
|
|
5784
|
+
case exports.FieldType.LocalDateTime:
|
|
5785
|
+
case exports.FieldType.Time:
|
|
5786
|
+
_this.showSeconds = true;
|
|
5787
|
+
break;
|
|
5788
|
+
}
|
|
5789
|
+
}
|
|
5790
|
+
return _this;
|
|
5798
5791
|
}
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
return this.localeService.get().pipe(operators.map(function () { return (value ? moment$1(value).format(format) : value); }));
|
|
5802
|
-
};
|
|
5803
|
-
LocalizedDatePipe.ctorParameters = function () { return [
|
|
5804
|
-
{ type: LocaleService }
|
|
5805
|
-
]; };
|
|
5806
|
-
LocalizedDatePipe = __decorate([
|
|
5807
|
-
core.Pipe({
|
|
5808
|
-
name: "localizedDate",
|
|
5809
|
-
})
|
|
5810
|
-
], LocalizedDatePipe);
|
|
5811
|
-
return LocalizedDatePipe;
|
|
5812
|
-
}());
|
|
5792
|
+
return CalendarField;
|
|
5793
|
+
}(Field));
|
|
5813
5794
|
|
|
5814
|
-
var
|
|
5815
|
-
__extends(
|
|
5816
|
-
function
|
|
5817
|
-
|
|
5795
|
+
var CheckboxField = /** @class */ (function (_super) {
|
|
5796
|
+
__extends(CheckboxField, _super);
|
|
5797
|
+
function CheckboxField(config) {
|
|
5798
|
+
var _this = _super.call(this, config) || this;
|
|
5799
|
+
_this.data = config.data;
|
|
5800
|
+
return _this;
|
|
5818
5801
|
}
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
name: "localizedDateImpure",
|
|
5822
|
-
pure: false,
|
|
5823
|
-
})
|
|
5824
|
-
], LocalizedDateImpurePipe);
|
|
5825
|
-
return LocalizedDateImpurePipe;
|
|
5826
|
-
}(LocalizedDatePipe));
|
|
5802
|
+
return CheckboxField;
|
|
5803
|
+
}(Field));
|
|
5827
5804
|
|
|
5828
|
-
/**
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5805
|
+
var ChipsField = /** @class */ (function (_super) {
|
|
5806
|
+
__extends(ChipsField, _super);
|
|
5807
|
+
function ChipsField(config) {
|
|
5808
|
+
var _this = _super.call(this, config) || this;
|
|
5809
|
+
_this.showCopyButton = false;
|
|
5810
|
+
_this.keyFilter = config.keyFilter;
|
|
5811
|
+
_this.showCopyButton = config.showCopyButton;
|
|
5812
|
+
_this.separator = config.separator;
|
|
5813
|
+
_this.onAdd = config.onAdd;
|
|
5814
|
+
_this.onRemove = config.onRemove;
|
|
5815
|
+
_this.onChipClick = config.onChipClick;
|
|
5816
|
+
_this.onFocus = config.onFocus;
|
|
5817
|
+
_this.onBlur = config.onBlur;
|
|
5818
|
+
_this.onCopy = config.onCopy;
|
|
5819
|
+
return _this;
|
|
5834
5820
|
}
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
var numericValue = Number(value);
|
|
5838
|
-
if (!value && isNaN(numericValue))
|
|
5839
|
-
return;
|
|
5840
|
-
return new Intl.NumberFormat(locale, {
|
|
5841
|
-
minimumFractionDigits: minimumFractionDigits || 0,
|
|
5842
|
-
}).format(Number(value));
|
|
5843
|
-
}));
|
|
5844
|
-
};
|
|
5845
|
-
LocalizedNumberPipe.ctorParameters = function () { return [
|
|
5846
|
-
{ type: LocaleService }
|
|
5847
|
-
]; };
|
|
5848
|
-
LocalizedNumberPipe = __decorate([
|
|
5849
|
-
core.Pipe({ name: "localizedNumber" })
|
|
5850
|
-
], LocalizedNumberPipe);
|
|
5851
|
-
return LocalizedNumberPipe;
|
|
5852
|
-
}());
|
|
5821
|
+
return ChipsField;
|
|
5822
|
+
}(Field));
|
|
5853
5823
|
|
|
5854
|
-
var
|
|
5855
|
-
|
|
5856
|
-
function
|
|
5857
|
-
|
|
5824
|
+
var CountryPhonePickerField = /** @class */ (function (_super) {
|
|
5825
|
+
__extends(CountryPhonePickerField, _super);
|
|
5826
|
+
function CountryPhonePickerField(config) {
|
|
5827
|
+
var _this = _super.call(this, config) || this;
|
|
5828
|
+
_this.countries = config.countries;
|
|
5829
|
+
_this.ordination = config.ordination;
|
|
5830
|
+
_this.onSelected = config.onSelected;
|
|
5831
|
+
_this.onFocusLost = config.onFocusLost;
|
|
5832
|
+
return _this;
|
|
5858
5833
|
}
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5834
|
+
return CountryPhonePickerField;
|
|
5835
|
+
}(Field));
|
|
5836
|
+
|
|
5837
|
+
/**
|
|
5838
|
+
* @deprecated Should use 'AlignmentOptions' from @seniorsistemas/ng2-currency-mask instead
|
|
5839
|
+
*/
|
|
5840
|
+
|
|
5841
|
+
(function (NumberAlignmentOption) {
|
|
5842
|
+
NumberAlignmentOption["RIGHT"] = "right";
|
|
5843
|
+
NumberAlignmentOption["LEFT"] = "left";
|
|
5844
|
+
})(exports.NumberAlignmentOption || (exports.NumberAlignmentOption = {}));
|
|
5845
|
+
/**
|
|
5846
|
+
* @deprecated Should use BigNumberInput directive instead
|
|
5847
|
+
*/
|
|
5848
|
+
var NumberInputDirective = /** @class */ (function (_super) {
|
|
5849
|
+
__extends(NumberInputDirective, _super);
|
|
5850
|
+
function NumberInputDirective(_elementRef, _keyValueDiffers, localeService) {
|
|
5851
|
+
var _this = _super.call(this, null, _elementRef, _keyValueDiffers) || this;
|
|
5852
|
+
_this.localeService = localeService;
|
|
5853
|
+
_this.precision = 15;
|
|
5854
|
+
_this.scale = 0;
|
|
5855
|
+
_this.alignTo = exports.NumberAlignmentOption.LEFT;
|
|
5856
|
+
_this.allowNegative = true;
|
|
5857
|
+
_this.regex = /\d/;
|
|
5858
|
+
_this.onLocaleService();
|
|
5859
|
+
return _this;
|
|
5860
|
+
}
|
|
5861
|
+
NumberInputDirective_1 = NumberInputDirective;
|
|
5862
|
+
NumberInputDirective.prototype.ngOnInit = function () {
|
|
5863
|
+
this.updateVariables();
|
|
5864
|
+
_super.prototype.ngOnInit.call(this);
|
|
5862
5865
|
};
|
|
5863
|
-
|
|
5866
|
+
NumberInputDirective.prototype.ngOnChanges = function (changes) {
|
|
5867
|
+
var placeholderChange = changes.placeholder && changes.placeholder.currentValue;
|
|
5868
|
+
if (!placeholderChange && this.scale)
|
|
5869
|
+
this.placeholder = "0" + this.decimalSeparator + "".padEnd(this.scale, "0");
|
|
5870
|
+
if (changes.scale ||
|
|
5871
|
+
changes.decimalSeparator ||
|
|
5872
|
+
changes.thousandsSeparator ||
|
|
5873
|
+
changes.alignTo ||
|
|
5874
|
+
changes.precision ||
|
|
5875
|
+
changes.allowNegative) {
|
|
5876
|
+
this.updateVariables();
|
|
5877
|
+
}
|
|
5878
|
+
};
|
|
5879
|
+
/**
|
|
5880
|
+
* Update the options values according to the directive input values.
|
|
5881
|
+
*/
|
|
5882
|
+
NumberInputDirective.prototype.updateVariables = function () {
|
|
5883
|
+
this.options = {
|
|
5884
|
+
align: this.alignTo,
|
|
5885
|
+
decimal: this.decimalSeparator,
|
|
5886
|
+
thousands: this.thousandsSeparator,
|
|
5887
|
+
precision: this.scale || 0,
|
|
5888
|
+
prefix: "",
|
|
5889
|
+
suffix: "",
|
|
5890
|
+
allowNegative: this.allowNegative,
|
|
5891
|
+
};
|
|
5892
|
+
this.calculateMaxLength();
|
|
5893
|
+
};
|
|
5894
|
+
/**
|
|
5895
|
+
* Responsible to calculate the field maximum length considering the separators.
|
|
5896
|
+
*/
|
|
5897
|
+
NumberInputDirective.prototype.calculateMaxLength = function () {
|
|
5898
|
+
var decSepLength = this.decimalSeparator.length;
|
|
5899
|
+
var thoSepLength = this.thousandsSeparator.length;
|
|
5900
|
+
var maxLength = this.precision + (this.scale ? decSepLength : 0);
|
|
5901
|
+
maxLength += Math.ceil((this.precision - (this.scale ? this.scale : 0)) / 3 - 1) * thoSepLength;
|
|
5902
|
+
this.maxLength = maxLength;
|
|
5903
|
+
};
|
|
5904
|
+
/**
|
|
5905
|
+
* Prevents the default CurrencyMask behavior when typed a incorrect value.
|
|
5906
|
+
* By default the CurrencyMask inputs the mask value to the component value when typed a incorrect value.
|
|
5907
|
+
*/
|
|
5908
|
+
NumberInputDirective.prototype.handleKeypress = function (event) {
|
|
5909
|
+
var negativeOperator = "-";
|
|
5910
|
+
var key = event.key;
|
|
5911
|
+
if (this.thousandsSeparator.includes(key) ||
|
|
5912
|
+
this.decimalSeparator.includes(key) ||
|
|
5913
|
+
negativeOperator.includes(key) ||
|
|
5914
|
+
this.regex.test(key) ||
|
|
5915
|
+
"Enter".toUpperCase() === key.toUpperCase())
|
|
5916
|
+
_super.prototype.handleKeypress.call(this, event);
|
|
5917
|
+
else
|
|
5918
|
+
event.preventDefault();
|
|
5919
|
+
};
|
|
5920
|
+
NumberInputDirective.prototype.onLocaleService = function () {
|
|
5921
|
+
var _this = this;
|
|
5922
|
+
this.localeService
|
|
5923
|
+
.getLocale()
|
|
5924
|
+
.pipe(operators.first())
|
|
5925
|
+
.subscribe(function () {
|
|
5926
|
+
var _a, _b;
|
|
5927
|
+
_this.decimalSeparator = (_a = _this.decimalSeparator) !== null && _a !== void 0 ? _a : _this.localeService.getDecimalSeparator();
|
|
5928
|
+
_this.thousandsSeparator = (_b = _this.thousandsSeparator) !== null && _b !== void 0 ? _b : _this.localeService.getGroupingSeparator();
|
|
5929
|
+
});
|
|
5930
|
+
};
|
|
5931
|
+
var NumberInputDirective_1;
|
|
5932
|
+
NumberInputDirective.ctorParameters = function () { return [
|
|
5933
|
+
{ type: core.ElementRef },
|
|
5934
|
+
{ type: core.KeyValueDiffers },
|
|
5864
5935
|
{ type: LocaleService }
|
|
5865
5936
|
]; };
|
|
5866
|
-
|
|
5867
|
-
core.
|
|
5868
|
-
|
|
5937
|
+
__decorate([
|
|
5938
|
+
core.Input()
|
|
5939
|
+
], NumberInputDirective.prototype, "precision", void 0);
|
|
5940
|
+
__decorate([
|
|
5941
|
+
core.Input()
|
|
5942
|
+
], NumberInputDirective.prototype, "scale", void 0);
|
|
5943
|
+
__decorate([
|
|
5944
|
+
core.Input()
|
|
5945
|
+
], NumberInputDirective.prototype, "decimalSeparator", void 0);
|
|
5946
|
+
__decorate([
|
|
5947
|
+
core.Input()
|
|
5948
|
+
], NumberInputDirective.prototype, "thousandsSeparator", void 0);
|
|
5949
|
+
__decorate([
|
|
5950
|
+
core.Input()
|
|
5951
|
+
], NumberInputDirective.prototype, "alignTo", void 0);
|
|
5952
|
+
__decorate([
|
|
5953
|
+
core.Input()
|
|
5954
|
+
], NumberInputDirective.prototype, "allowNegative", void 0);
|
|
5955
|
+
__decorate([
|
|
5956
|
+
core.Input(),
|
|
5957
|
+
core.HostBinding("attr.placeholder")
|
|
5958
|
+
], NumberInputDirective.prototype, "placeholder", void 0);
|
|
5959
|
+
__decorate([
|
|
5960
|
+
core.HostBinding("attr.maxLength")
|
|
5961
|
+
], NumberInputDirective.prototype, "maxLength", void 0);
|
|
5962
|
+
NumberInputDirective = NumberInputDirective_1 = __decorate([
|
|
5963
|
+
core.Directive({
|
|
5964
|
+
selector: "input[sNumberInput]",
|
|
5965
|
+
providers: [
|
|
5966
|
+
{
|
|
5967
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
5968
|
+
useExisting: core.forwardRef(function () { return NumberInputDirective_1; }),
|
|
5969
|
+
multi: true,
|
|
5970
|
+
},
|
|
5971
|
+
],
|
|
5869
5972
|
})
|
|
5870
|
-
],
|
|
5871
|
-
return
|
|
5872
|
-
}());
|
|
5973
|
+
], NumberInputDirective);
|
|
5974
|
+
return NumberInputDirective;
|
|
5975
|
+
}(ng2CurrencyMask$1.CurrencyMaskDirective));
|
|
5873
5976
|
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5977
|
+
/**
|
|
5978
|
+
* @deprecated Should use 'BignumberInputModule' instead
|
|
5979
|
+
*/
|
|
5980
|
+
var NumberInputModule = /** @class */ (function () {
|
|
5981
|
+
function NumberInputModule() {
|
|
5878
5982
|
}
|
|
5879
|
-
|
|
5880
|
-
core.
|
|
5881
|
-
|
|
5882
|
-
|
|
5983
|
+
NumberInputModule = __decorate([
|
|
5984
|
+
core.NgModule({
|
|
5985
|
+
imports: [common.CommonModule],
|
|
5986
|
+
declarations: [NumberInputDirective],
|
|
5987
|
+
exports: [NumberInputDirective],
|
|
5883
5988
|
})
|
|
5884
|
-
],
|
|
5885
|
-
return
|
|
5886
|
-
}(
|
|
5887
|
-
|
|
5888
|
-
var CurrencyService = /** @class */ (function () {
|
|
5889
|
-
function CurrencyService(localeService) {
|
|
5890
|
-
this.localeService = localeService;
|
|
5891
|
-
this.currencies = {
|
|
5892
|
-
KHR: { precision: 12, scale: 2 },
|
|
5893
|
-
SSP: { precision: 12, scale: 2 },
|
|
5894
|
-
XCD: { precision: 12, scale: 2 },
|
|
5895
|
-
EGP: { precision: 12, scale: 2 },
|
|
5896
|
-
KWD: { precision: 12, scale: 3 },
|
|
5897
|
-
YER: { precision: 12, scale: 2 },
|
|
5898
|
-
HUF: { precision: 12, scale: 2 },
|
|
5899
|
-
MXN: { precision: 12, scale: 2 },
|
|
5900
|
-
MYR: { precision: 12, scale: 2 },
|
|
5901
|
-
ZWL: { precision: 12, scale: 2 },
|
|
5902
|
-
MUR: { precision: 12, scale: 2 },
|
|
5903
|
-
DKK: { precision: 12, scale: 2 },
|
|
5904
|
-
NOK: { precision: 12, scale: 2 },
|
|
5905
|
-
DJF: { precision: 12, scale: 0 },
|
|
5906
|
-
CRC: { precision: 12, scale: 2 },
|
|
5907
|
-
BND: { precision: 12, scale: 2 },
|
|
5908
|
-
NAD: { precision: 12, scale: 2 },
|
|
5909
|
-
MKD: { precision: 12, scale: 2 },
|
|
5910
|
-
CDF: { precision: 12, scale: 2 },
|
|
5911
|
-
GNF: { precision: 12, scale: 0 },
|
|
5912
|
-
EUR: { precision: 12, scale: 2 },
|
|
5913
|
-
OMR: { precision: 12, scale: 3 },
|
|
5914
|
-
CLP: { precision: 12, scale: 0 },
|
|
5915
|
-
BSD: { precision: 12, scale: 2 },
|
|
5916
|
-
TOP: { precision: 12, scale: 2 },
|
|
5917
|
-
IRR: { precision: 12, scale: 2 },
|
|
5918
|
-
BGN: { precision: 12, scale: 2 },
|
|
5919
|
-
BZD: { precision: 12, scale: 2 },
|
|
5920
|
-
CNY: { precision: 12, scale: 2 },
|
|
5921
|
-
FJD: { precision: 12, scale: 2 },
|
|
5922
|
-
SRD: { precision: 12, scale: 2 },
|
|
5923
|
-
SOS: { precision: 12, scale: 2 },
|
|
5924
|
-
GYD: { precision: 12, scale: 2 },
|
|
5925
|
-
VUV: { precision: 12, scale: 0 },
|
|
5926
|
-
MWK: { precision: 12, scale: 2 },
|
|
5927
|
-
MRU: { precision: 12, scale: 2 },
|
|
5928
|
-
LSL: { precision: 12, scale: 2 },
|
|
5929
|
-
ERN: { precision: 12, scale: 2 },
|
|
5930
|
-
BMD: { precision: 12, scale: 2 },
|
|
5931
|
-
WST: { precision: 12, scale: 2 },
|
|
5932
|
-
LRD: { precision: 12, scale: 2 },
|
|
5933
|
-
GMD: { precision: 12, scale: 2 },
|
|
5934
|
-
ARS: { precision: 12, scale: 2 },
|
|
5935
|
-
ZAR: { precision: 12, scale: 2 },
|
|
5936
|
-
RSD: { precision: 12, scale: 2 },
|
|
5937
|
-
MDL: { precision: 12, scale: 2 },
|
|
5938
|
-
USD: { precision: 12, scale: 2 },
|
|
5939
|
-
QAR: { precision: 12, scale: 2 },
|
|
5940
|
-
HRK: { precision: 12, scale: 2 },
|
|
5941
|
-
GIP: { precision: 12, scale: 2 },
|
|
5942
|
-
NPR: { precision: 12, scale: 2 },
|
|
5943
|
-
"002": { precision: 9, scale: 4 },
|
|
5944
|
-
PLN: { precision: 12, scale: 2 },
|
|
5945
|
-
MAD: { precision: 12, scale: 2 },
|
|
5946
|
-
BAM: { precision: 12, scale: 2 },
|
|
5947
|
-
BTN: { precision: 12, scale: 2 },
|
|
5948
|
-
BBD: { precision: 12, scale: 2 },
|
|
5949
|
-
SHP: { precision: 12, scale: 2 },
|
|
5950
|
-
LKR: { precision: 12, scale: 2 },
|
|
5951
|
-
KPW: { precision: 12, scale: 2 },
|
|
5952
|
-
LAK: { precision: 12, scale: 2 },
|
|
5953
|
-
SZL: { precision: 12, scale: 2 },
|
|
5954
|
-
PHP: { precision: 12, scale: 2 },
|
|
5955
|
-
RWF: { precision: 12, scale: 0 },
|
|
5956
|
-
ISK: { precision: 12, scale: 0 },
|
|
5957
|
-
XOF: { precision: 12, scale: 0 },
|
|
5958
|
-
AUD: { precision: 12, scale: 2 },
|
|
5959
|
-
NGN: { precision: 12, scale: 2 },
|
|
5960
|
-
KGS: { precision: 12, scale: 2 },
|
|
5961
|
-
KYD: { precision: 12, scale: 2 },
|
|
5962
|
-
PGK: { precision: 12, scale: 2 },
|
|
5963
|
-
DZD: { precision: 12, scale: 2 },
|
|
5964
|
-
XAF: { precision: 12, scale: 0 },
|
|
5965
|
-
PEN: { precision: 12, scale: 2 },
|
|
5966
|
-
JPY: { precision: 12, scale: 0 },
|
|
5967
|
-
SBD: { precision: 12, scale: 2 },
|
|
5968
|
-
UGX: { precision: 12, scale: 0 },
|
|
5969
|
-
AMD: { precision: 12, scale: 2 },
|
|
5970
|
-
AED: { precision: 12, scale: 2 },
|
|
5971
|
-
ALL: { precision: 12, scale: 2 },
|
|
5972
|
-
XPF: { precision: 12, scale: 0 },
|
|
5973
|
-
AFN: { precision: 12, scale: 2 },
|
|
5974
|
-
RON: { precision: 12, scale: 2 },
|
|
5975
|
-
TND: { precision: 12, scale: 3 },
|
|
5976
|
-
NZD: { precision: 12, scale: 2 },
|
|
5977
|
-
JOD: { precision: 12, scale: 3 },
|
|
5978
|
-
VND: { precision: 12, scale: 0 },
|
|
5979
|
-
ETB: { precision: 12, scale: 2 },
|
|
5980
|
-
PYG: { precision: 12, scale: 0 },
|
|
5981
|
-
JMD: { precision: 12, scale: 2 },
|
|
5982
|
-
KES: { precision: 12, scale: 2 },
|
|
5983
|
-
IDR: { precision: 12, scale: 2 },
|
|
5984
|
-
HKD: { precision: 12, scale: 2 },
|
|
5985
|
-
BDT: { precision: 12, scale: 2 },
|
|
5986
|
-
GBP: { precision: 12, scale: 2 },
|
|
5987
|
-
AOA: { precision: 12, scale: 2 },
|
|
5988
|
-
PKR: { precision: 12, scale: 2 },
|
|
5989
|
-
TRY: { precision: 12, scale: 2 },
|
|
5990
|
-
SLL: { precision: 12, scale: 2 },
|
|
5991
|
-
CVE: { precision: 12, scale: 2 },
|
|
5992
|
-
LYD: { precision: 12, scale: 3 },
|
|
5993
|
-
ILS: { precision: 12, scale: 2 },
|
|
5994
|
-
UZS: { precision: 12, scale: 2 },
|
|
5995
|
-
CHF: { precision: 12, scale: 2 },
|
|
5996
|
-
SVC: { precision: 12, scale: 2 },
|
|
5997
|
-
BRL: { precision: 12, scale: 2 },
|
|
5998
|
-
GHS: { precision: 12, scale: 2 },
|
|
5999
|
-
CUP: { precision: 12, scale: 2 },
|
|
6000
|
-
FKP: { precision: 12, scale: 2 },
|
|
6001
|
-
NIO: { precision: 12, scale: 2 },
|
|
6002
|
-
GEL: { precision: 12, scale: 2 },
|
|
6003
|
-
TTD: { precision: 12, scale: 2 },
|
|
6004
|
-
AAA: { precision: 1, scale: 1 },
|
|
6005
|
-
COP: { precision: 12, scale: 2 },
|
|
6006
|
-
MGA: { precision: 12, scale: 2 },
|
|
6007
|
-
INR: { precision: 12, scale: 2 },
|
|
6008
|
-
KRW: { precision: 12, scale: 0 },
|
|
6009
|
-
HNL: { precision: 12, scale: 2 },
|
|
6010
|
-
MMK: { precision: 12, scale: 2 },
|
|
6011
|
-
TZS: { precision: 12, scale: 2 },
|
|
6012
|
-
THB: { precision: 12, scale: 2 },
|
|
6013
|
-
TMT: { precision: 12, scale: 2 },
|
|
6014
|
-
SAR: { precision: 12, scale: 2 },
|
|
6015
|
-
UYU: { precision: 12, scale: 2 },
|
|
6016
|
-
BIF: { precision: 12, scale: 0 },
|
|
6017
|
-
MVR: { precision: 12, scale: 2 },
|
|
6018
|
-
RUB: { precision: 12, scale: 2 },
|
|
6019
|
-
GTQ: { precision: 12, scale: 2 },
|
|
6020
|
-
SCR: { precision: 12, scale: 2 },
|
|
6021
|
-
IQD: { precision: 12, scale: 3 },
|
|
6022
|
-
UAH: { precision: 12, scale: 2 },
|
|
6023
|
-
BYN: { precision: 12, scale: 2 },
|
|
6024
|
-
VES: { precision: 12, scale: 2 },
|
|
6025
|
-
BOB: { precision: 12, scale: 2 },
|
|
6026
|
-
SGD: { precision: 12, scale: 2 },
|
|
6027
|
-
ZMW: { precision: 12, scale: 2 },
|
|
6028
|
-
CZK: { precision: 12, scale: 2 },
|
|
6029
|
-
TJS: { precision: 12, scale: 2 },
|
|
6030
|
-
DOP: { precision: 12, scale: 2 },
|
|
6031
|
-
AZN: { precision: 12, scale: 2 },
|
|
6032
|
-
PAB: { precision: 12, scale: 2 },
|
|
6033
|
-
STN: { precision: 12, scale: 2 },
|
|
6034
|
-
SDG: { precision: 12, scale: 2 },
|
|
6035
|
-
BWP: { precision: 12, scale: 2 },
|
|
6036
|
-
BHD: { precision: 12, scale: 3 },
|
|
6037
|
-
CAD: { precision: 12, scale: 2 },
|
|
6038
|
-
MNT: { precision: 12, scale: 2 },
|
|
6039
|
-
MOP: { precision: 12, scale: 2 },
|
|
6040
|
-
HTG: { precision: 12, scale: 2 },
|
|
6041
|
-
KZT: { precision: 12, scale: 2 },
|
|
6042
|
-
LBP: { precision: 12, scale: 2 },
|
|
6043
|
-
SYP: { precision: 12, scale: 2 },
|
|
6044
|
-
TWD: { precision: 12, scale: 2 },
|
|
6045
|
-
MZN: { precision: 12, scale: 2 },
|
|
6046
|
-
ANG: { precision: 12, scale: 2 },
|
|
6047
|
-
SEK: { precision: 12, scale: 2 },
|
|
6048
|
-
KMF: { precision: 12, scale: 0 },
|
|
6049
|
-
AWG: { precision: 12, scale: 2 },
|
|
6050
|
-
};
|
|
6051
|
-
}
|
|
6052
|
-
CurrencyService.prototype.getCurrencySymbol = function (_a) {
|
|
6053
|
-
var currency = _a.currency;
|
|
6054
|
-
var _b, _c;
|
|
6055
|
-
var numberFormat = new Intl.NumberFormat(this.localeService.getLocaleOptions().locale, {
|
|
6056
|
-
style: "currency",
|
|
6057
|
-
currency: currency !== null && currency !== void 0 ? currency : "BRL",
|
|
6058
|
-
currencyDisplay: "narrowSymbol",
|
|
6059
|
-
maximumFractionDigits: 5,
|
|
6060
|
-
});
|
|
6061
|
-
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 : "";
|
|
6062
|
-
};
|
|
6063
|
-
CurrencyService.ctorParameters = function () { return [
|
|
6064
|
-
{ type: LocaleService }
|
|
6065
|
-
]; };
|
|
6066
|
-
CurrencyService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function CurrencyService_Factory() { return new CurrencyService(core["ɵɵinject"](LocaleService)); }, token: CurrencyService, providedIn: "root" });
|
|
6067
|
-
CurrencyService = __decorate([
|
|
6068
|
-
core.Injectable({ providedIn: "root" })
|
|
6069
|
-
], CurrencyService);
|
|
6070
|
-
return CurrencyService;
|
|
6071
|
-
}());
|
|
6072
|
-
|
|
6073
|
-
var isNullOrUndefined = function (value) { return value === null || value === undefined; };
|
|
6074
|
-
|
|
6075
|
-
var NumericService = /** @class */ (function () {
|
|
6076
|
-
function NumericService(localeService, currencyService) {
|
|
6077
|
-
this.localeService = localeService;
|
|
6078
|
-
this.currencyService = currencyService;
|
|
6079
|
-
}
|
|
6080
|
-
/**
|
|
6081
|
-
* Wrapper around Intl.NumberFormat that returns the localized value using the user's locale by default(platform's preferential language).
|
|
6082
|
-
*
|
|
6083
|
-
* This method should only be used after the localeService has been initialized by the host application, either by a resolver or a manual call.
|
|
6084
|
-
*
|
|
6085
|
-
* Can be overwritten by the provided Intl.NumberFormatOptions.
|
|
6086
|
-
*
|
|
6087
|
-
* Documentation is available at {@link https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat Intl.NumberFormatOptions}.
|
|
6088
|
-
*
|
|
6089
|
-
* @param {number | string | BigNumber} value The value to be formatted.
|
|
6090
|
-
* @param options Locale and numberFormatOptions that overwrites the default Intl.NumberFormatOptions.
|
|
6091
|
-
* @return `string` The formatted value.
|
|
6092
|
-
*/
|
|
6093
|
-
NumericService.prototype.instant = function (value, options) {
|
|
6094
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
6095
|
-
if (isNullOrUndefined(value))
|
|
6096
|
-
return null;
|
|
6097
|
-
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"
|
|
6098
|
-
? ((_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")
|
|
6099
|
-
: 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) }) });
|
|
6100
|
-
options.numberFormatOptions["roundingMode"] = "trunc";
|
|
6101
|
-
// From https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
|
|
6102
|
-
return new Intl.NumberFormat(options.locale, options.numberFormatOptions).format(this.getType(value) === "number" || this.getType(value) === "string" ? value : value.toString());
|
|
6103
|
-
};
|
|
6104
|
-
NumericService.prototype.getCurrencyMinimumFractionDigits = function (currency) {
|
|
6105
|
-
var _a;
|
|
6106
|
-
if (!currency)
|
|
6107
|
-
return null;
|
|
6108
|
-
return (_a = this.currencyService.currencies[currency.toUpperCase()]) === null || _a === void 0 ? void 0 : _a.scale;
|
|
6109
|
-
};
|
|
6110
|
-
NumericService.prototype.getType = function (value) {
|
|
6111
|
-
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
|
|
6112
|
-
if (value === null) {
|
|
6113
|
-
return "null";
|
|
6114
|
-
}
|
|
6115
|
-
var baseType = typeof value;
|
|
6116
|
-
// Primitive types
|
|
6117
|
-
if (baseType !== "object" && baseType !== "function") {
|
|
6118
|
-
return baseType;
|
|
6119
|
-
}
|
|
6120
|
-
// Symbol.toStringTag often specifies the "display name" of the
|
|
6121
|
-
// object's class. It's used in Object.prototype.toString().
|
|
6122
|
-
var tag = value[Symbol.toStringTag];
|
|
6123
|
-
if (typeof tag === "string") {
|
|
6124
|
-
return tag;
|
|
6125
|
-
}
|
|
6126
|
-
// If it's a function whose source code starts with the "class" keyword
|
|
6127
|
-
if (baseType === "function" && Function.prototype.toString.call(value).startsWith("class")) {
|
|
6128
|
-
return "class";
|
|
6129
|
-
}
|
|
6130
|
-
// The name of the constructor; for example `Array`, `GeneratorFunction`,
|
|
6131
|
-
// `Number`, `String`, `Boolean` or `MyCustomClass`
|
|
6132
|
-
var className = value.constructor.name;
|
|
6133
|
-
if (typeof className === "string" && className !== "") {
|
|
6134
|
-
return className;
|
|
6135
|
-
}
|
|
6136
|
-
// At this point there's no robust way to get the type of value,
|
|
6137
|
-
// so we use the base implementation.
|
|
6138
|
-
return baseType;
|
|
6139
|
-
};
|
|
6140
|
-
NumericService.ctorParameters = function () { return [
|
|
6141
|
-
{ type: LocaleService },
|
|
6142
|
-
{ type: CurrencyService }
|
|
6143
|
-
]; };
|
|
6144
|
-
NumericService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function NumericService_Factory() { return new NumericService(core["ɵɵinject"](LocaleService), core["ɵɵinject"](CurrencyService)); }, token: NumericService, providedIn: "root" });
|
|
6145
|
-
NumericService = __decorate([
|
|
6146
|
-
core.Injectable({
|
|
6147
|
-
providedIn: "root",
|
|
6148
|
-
})
|
|
6149
|
-
], NumericService);
|
|
6150
|
-
return NumericService;
|
|
6151
|
-
}());
|
|
6152
|
-
|
|
6153
|
-
var NumericPipe = /** @class */ (function () {
|
|
6154
|
-
function NumericPipe(numericService, localeService) {
|
|
6155
|
-
this.numericService = numericService;
|
|
6156
|
-
this.localeService = localeService;
|
|
6157
|
-
}
|
|
6158
|
-
NumericPipe.prototype.transform = function (value, options) {
|
|
6159
|
-
var _this = this;
|
|
6160
|
-
return (options === null || options === void 0 ? void 0 : options.locale) ? rxjs.of(this.numericService.instant(value, options))
|
|
6161
|
-
: this.localeService.getLocale().pipe(operators.map(function (locale) {
|
|
6162
|
-
return _this.numericService.instant(value, {
|
|
6163
|
-
locale: locale,
|
|
6164
|
-
numberFormatOptions: options === null || options === void 0 ? void 0 : options.numberFormatOptions,
|
|
6165
|
-
});
|
|
6166
|
-
}));
|
|
6167
|
-
};
|
|
6168
|
-
NumericPipe.ctorParameters = function () { return [
|
|
6169
|
-
{ type: NumericService },
|
|
6170
|
-
{ type: LocaleService }
|
|
6171
|
-
]; };
|
|
6172
|
-
NumericPipe = __decorate([
|
|
6173
|
-
core.Pipe({ name: "numeric" })
|
|
6174
|
-
], NumericPipe);
|
|
6175
|
-
return NumericPipe;
|
|
6176
|
-
}());
|
|
6177
|
-
|
|
6178
|
-
var LocaleModule = /** @class */ (function () {
|
|
6179
|
-
function LocaleModule() {
|
|
6180
|
-
}
|
|
6181
|
-
LocaleModule_1 = LocaleModule;
|
|
6182
|
-
LocaleModule.forRoot = function () {
|
|
6183
|
-
return {
|
|
6184
|
-
ngModule: LocaleModule_1,
|
|
6185
|
-
providers: [
|
|
6186
|
-
LocaleService,
|
|
6187
|
-
LocalizedCurrencyPipe,
|
|
6188
|
-
LocalizedDatePipe,
|
|
6189
|
-
LocalizedTimePipe,
|
|
6190
|
-
LocalizedNumberPipe,
|
|
6191
|
-
LocalizedCurrencyImpurePipe,
|
|
6192
|
-
LocalizedDateImpurePipe,
|
|
6193
|
-
LocalizedTimeImpurePipe,
|
|
6194
|
-
LocalizedBignumberPipe,
|
|
6195
|
-
LocalizedBignumberImpurePipe,
|
|
6196
|
-
NumericPipe
|
|
6197
|
-
],
|
|
6198
|
-
};
|
|
6199
|
-
};
|
|
6200
|
-
LocaleModule.forChild = function () {
|
|
6201
|
-
return {
|
|
6202
|
-
ngModule: LocaleModule_1,
|
|
6203
|
-
};
|
|
6204
|
-
};
|
|
6205
|
-
var LocaleModule_1;
|
|
6206
|
-
LocaleModule = LocaleModule_1 = __decorate([
|
|
6207
|
-
core.NgModule({
|
|
6208
|
-
imports: [common.CommonModule],
|
|
6209
|
-
exports: [
|
|
6210
|
-
LocalizedCurrencyPipe,
|
|
6211
|
-
LocalizedDatePipe,
|
|
6212
|
-
LocalizedTimePipe,
|
|
6213
|
-
LocalizedNumberPipe,
|
|
6214
|
-
LocalizedCurrencyImpurePipe,
|
|
6215
|
-
LocalizedDateImpurePipe,
|
|
6216
|
-
LocalizedTimeImpurePipe,
|
|
6217
|
-
LocalizedBignumberPipe,
|
|
6218
|
-
LocalizedBignumberImpurePipe,
|
|
6219
|
-
NumericPipe
|
|
6220
|
-
],
|
|
6221
|
-
declarations: [
|
|
6222
|
-
LocalizedCurrencyPipe,
|
|
6223
|
-
LocalizedDatePipe,
|
|
6224
|
-
LocalizedTimePipe,
|
|
6225
|
-
LocalizedNumberPipe,
|
|
6226
|
-
LocalizedCurrencyImpurePipe,
|
|
6227
|
-
LocalizedDateImpurePipe,
|
|
6228
|
-
LocalizedTimeImpurePipe,
|
|
6229
|
-
LocalizedBignumberPipe,
|
|
6230
|
-
LocalizedBignumberImpurePipe,
|
|
6231
|
-
NumericPipe
|
|
6232
|
-
],
|
|
6233
|
-
})
|
|
6234
|
-
], LocaleModule);
|
|
6235
|
-
return LocaleModule;
|
|
6236
|
-
}());
|
|
6237
|
-
|
|
6238
|
-
var BignumberField = /** @class */ (function (_super) {
|
|
6239
|
-
__extends(BignumberField, _super);
|
|
6240
|
-
function BignumberField(config) {
|
|
6241
|
-
var _a, _b, _c, _d;
|
|
6242
|
-
var _this = _super.call(this, config) || this;
|
|
6243
|
-
_this.allowNegative = (_a = config.allowNegative) !== null && _a !== void 0 ? _a : true;
|
|
6244
|
-
_this.numberLocaleOptions = (_b = config.numberLocaleOptions) !== null && _b !== void 0 ? _b : new NumberLocaleOptions();
|
|
6245
|
-
_this.browserAutocomplete = config.browserAutocomplete;
|
|
6246
|
-
_this.precision = config.precision;
|
|
6247
|
-
_this.scale = (_c = config.scale) !== null && _c !== void 0 ? _c : 2;
|
|
6248
|
-
_this.alignTo = _this.scale ? ng2CurrencyMask.AlignmentOptions.RIGHT : ng2CurrencyMask.AlignmentOptions.LEFT;
|
|
6249
|
-
_this.mask = config.mask;
|
|
6250
|
-
_this.leftAddon = config.leftAddon;
|
|
6251
|
-
_this.rightAddon = config.rightAddon;
|
|
6252
|
-
_this.onBlur = config.onBlur;
|
|
6253
|
-
_this.onFocus = config.onFocus;
|
|
6254
|
-
_this.onComplete = config.onComplete;
|
|
6255
|
-
_this.onInput = config.onInput;
|
|
6256
|
-
_this.autoClear = (_d = config.autoClear) !== null && _d !== void 0 ? _d : true;
|
|
6257
|
-
return _this;
|
|
6258
|
-
}
|
|
6259
|
-
return BignumberField;
|
|
6260
|
-
}(Field));
|
|
6261
|
-
|
|
6262
|
-
var BlobField = /** @class */ (function (_super) {
|
|
6263
|
-
__extends(BlobField, _super);
|
|
6264
|
-
function BlobField(config) {
|
|
6265
|
-
var _this = _super.call(this, config) || this;
|
|
6266
|
-
_this.accept = config.accept;
|
|
6267
|
-
_this.files = config.files || [];
|
|
6268
|
-
_this.chooseLabel = config.chooseLabel;
|
|
6269
|
-
_this.removeLabel = config.removeLabel;
|
|
6270
|
-
_this.cancelLabel = config.cancelLabel;
|
|
6271
|
-
_this.successTooltip = config.successTooltip;
|
|
6272
|
-
_this.multiple = config.multiple;
|
|
6273
|
-
_this.onUploadFile = config.onUploadFile;
|
|
6274
|
-
_this.onRemoveFile = config.onRemoveFile;
|
|
6275
|
-
_this.onCancelUpload = config.onCancelUpload;
|
|
6276
|
-
_this.onDownloadFile = config.onDownloadFile;
|
|
6277
|
-
_this.showFileUploadDate = config.showFileUploadDate;
|
|
6278
|
-
return _this;
|
|
6279
|
-
}
|
|
6280
|
-
return BlobField;
|
|
6281
|
-
}(Field));
|
|
6282
|
-
|
|
6283
|
-
var BooleanOptionsLabel = /** @class */ (function () {
|
|
6284
|
-
function BooleanOptionsLabel(config) {
|
|
6285
|
-
this.true = config.true;
|
|
6286
|
-
this.false = config.false;
|
|
6287
|
-
this.empty = config.empty;
|
|
6288
|
-
this.clear = config.clear;
|
|
6289
|
-
}
|
|
6290
|
-
return BooleanOptionsLabel;
|
|
6291
|
-
}());
|
|
6292
|
-
var BooleanField = /** @class */ (function (_super) {
|
|
6293
|
-
__extends(BooleanField, _super);
|
|
6294
|
-
function BooleanField(config) {
|
|
6295
|
-
var _this = _super.call(this, config) || this;
|
|
6296
|
-
_this.verticalAlignment = config.verticalAlignment;
|
|
6297
|
-
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
6298
|
-
_this.representedBy = "radio";
|
|
6299
|
-
_this.onBlur = config.onBlur;
|
|
6300
|
-
_this.onFocus = config.onFocus;
|
|
6301
|
-
_this.onClick = config.onClick;
|
|
6302
|
-
return _this;
|
|
6303
|
-
}
|
|
6304
|
-
return BooleanField;
|
|
6305
|
-
}(Field));
|
|
6306
|
-
|
|
6307
|
-
var BooleanSwitchField = /** @class */ (function (_super) {
|
|
6308
|
-
__extends(BooleanSwitchField, _super);
|
|
6309
|
-
function BooleanSwitchField(config) {
|
|
6310
|
-
var _this = _super.call(this, config) || this;
|
|
6311
|
-
_this.onChange = config.onChange;
|
|
6312
|
-
if (config.optionsLabel) {
|
|
6313
|
-
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
6314
|
-
}
|
|
6315
|
-
_this.representedBy = "switch";
|
|
6316
|
-
return _this;
|
|
6317
|
-
}
|
|
6318
|
-
return BooleanSwitchField;
|
|
6319
|
-
}(Field));
|
|
6320
|
-
|
|
6321
|
-
var CalendarField = /** @class */ (function (_super) {
|
|
6322
|
-
__extends(CalendarField, _super);
|
|
6323
|
-
function CalendarField(config) {
|
|
6324
|
-
var _this = _super.call(this, config) || this;
|
|
6325
|
-
_this.view = config.view || "date";
|
|
6326
|
-
_this.minDate = config.minDate;
|
|
6327
|
-
_this.maxDate = config.maxDate;
|
|
6328
|
-
_this.defaultDate = config.defaultDate;
|
|
6329
|
-
_this.appendTo = config.appendTo;
|
|
6330
|
-
_this.showOnFocus = typeof config.showOnFocus === "boolean" ? config.showOnFocus : true;
|
|
6331
|
-
_this.calendarLocaleOptions = config.calendarLocaleOptions;
|
|
6332
|
-
_this.onBlur = config.onBlur;
|
|
6333
|
-
_this.onFocus = config.onFocus;
|
|
6334
|
-
_this.onSelect = config.onSelect;
|
|
6335
|
-
_this.onInput = config.onInput;
|
|
6336
|
-
_this.onClose = config.onClose;
|
|
6337
|
-
_this.onTodayClick = config.onTodayClick;
|
|
6338
|
-
_this.onClearClick = config.onClearClick;
|
|
6339
|
-
_this.onMonthChange = config.onMonthChange;
|
|
6340
|
-
_this.onYearChange = config.onYearChange;
|
|
6341
|
-
_this.selectionMode = config.selectionMode || "single";
|
|
6342
|
-
_this.rangeSeparator = config.rangeSeparator || "-";
|
|
6343
|
-
_this.showSeconds = config.showSeconds;
|
|
6344
|
-
// Tornando true o padrão para showSeconds.
|
|
6345
|
-
if (_this.showSeconds === null || _this.showSeconds === undefined) {
|
|
6346
|
-
switch (_this.type) {
|
|
6347
|
-
case exports.FieldType.DateTime:
|
|
6348
|
-
case exports.FieldType.LocalDateTime:
|
|
6349
|
-
case exports.FieldType.Time:
|
|
6350
|
-
_this.showSeconds = true;
|
|
6351
|
-
break;
|
|
6352
|
-
}
|
|
6353
|
-
}
|
|
6354
|
-
return _this;
|
|
6355
|
-
}
|
|
6356
|
-
return CalendarField;
|
|
6357
|
-
}(Field));
|
|
6358
|
-
|
|
6359
|
-
var CheckboxField = /** @class */ (function (_super) {
|
|
6360
|
-
__extends(CheckboxField, _super);
|
|
6361
|
-
function CheckboxField(config) {
|
|
6362
|
-
var _this = _super.call(this, config) || this;
|
|
6363
|
-
_this.data = config.data;
|
|
6364
|
-
return _this;
|
|
6365
|
-
}
|
|
6366
|
-
return CheckboxField;
|
|
6367
|
-
}(Field));
|
|
6368
|
-
|
|
6369
|
-
var ChipsField = /** @class */ (function (_super) {
|
|
6370
|
-
__extends(ChipsField, _super);
|
|
6371
|
-
function ChipsField(config) {
|
|
6372
|
-
var _this = _super.call(this, config) || this;
|
|
6373
|
-
_this.showCopyButton = false;
|
|
6374
|
-
_this.keyFilter = config.keyFilter;
|
|
6375
|
-
_this.showCopyButton = config.showCopyButton;
|
|
6376
|
-
_this.separator = config.separator;
|
|
6377
|
-
_this.onAdd = config.onAdd;
|
|
6378
|
-
_this.onRemove = config.onRemove;
|
|
6379
|
-
_this.onChipClick = config.onChipClick;
|
|
6380
|
-
_this.onFocus = config.onFocus;
|
|
6381
|
-
_this.onBlur = config.onBlur;
|
|
6382
|
-
_this.onCopy = config.onCopy;
|
|
6383
|
-
return _this;
|
|
6384
|
-
}
|
|
6385
|
-
return ChipsField;
|
|
6386
|
-
}(Field));
|
|
6387
|
-
|
|
6388
|
-
var CountryPhonePickerField = /** @class */ (function (_super) {
|
|
6389
|
-
__extends(CountryPhonePickerField, _super);
|
|
6390
|
-
function CountryPhonePickerField(config) {
|
|
6391
|
-
var _this = _super.call(this, config) || this;
|
|
6392
|
-
_this.countries = config.countries;
|
|
6393
|
-
_this.ordination = config.ordination;
|
|
6394
|
-
_this.onSelected = config.onSelected;
|
|
6395
|
-
_this.onFocusLost = config.onFocusLost;
|
|
6396
|
-
return _this;
|
|
6397
|
-
}
|
|
6398
|
-
return CountryPhonePickerField;
|
|
6399
|
-
}(Field));
|
|
6400
|
-
|
|
6401
|
-
/**
|
|
6402
|
-
* @deprecated Should use 'AlignmentOptions' from @seniorsistemas/ng2-currency-mask instead
|
|
6403
|
-
*/
|
|
6404
|
-
|
|
6405
|
-
(function (NumberAlignmentOption) {
|
|
6406
|
-
NumberAlignmentOption["RIGHT"] = "right";
|
|
6407
|
-
NumberAlignmentOption["LEFT"] = "left";
|
|
6408
|
-
})(exports.NumberAlignmentOption || (exports.NumberAlignmentOption = {}));
|
|
6409
|
-
/**
|
|
6410
|
-
* @deprecated Should use BigNumberInput directive instead
|
|
6411
|
-
*/
|
|
6412
|
-
var NumberInputDirective = /** @class */ (function (_super) {
|
|
6413
|
-
__extends(NumberInputDirective, _super);
|
|
6414
|
-
function NumberInputDirective(_elementRef, _keyValueDiffers, localeService) {
|
|
6415
|
-
var _this = _super.call(this, null, _elementRef, _keyValueDiffers) || this;
|
|
6416
|
-
_this.localeService = localeService;
|
|
6417
|
-
_this.precision = 15;
|
|
6418
|
-
_this.scale = 0;
|
|
6419
|
-
_this.alignTo = exports.NumberAlignmentOption.LEFT;
|
|
6420
|
-
_this.allowNegative = true;
|
|
6421
|
-
_this.regex = /\d/;
|
|
6422
|
-
_this.onLocaleService();
|
|
6423
|
-
return _this;
|
|
6424
|
-
}
|
|
6425
|
-
NumberInputDirective_1 = NumberInputDirective;
|
|
6426
|
-
NumberInputDirective.prototype.ngOnInit = function () {
|
|
6427
|
-
this.updateVariables();
|
|
6428
|
-
_super.prototype.ngOnInit.call(this);
|
|
6429
|
-
};
|
|
6430
|
-
NumberInputDirective.prototype.ngOnChanges = function (changes) {
|
|
6431
|
-
var placeholderChange = changes.placeholder && changes.placeholder.currentValue;
|
|
6432
|
-
if (!placeholderChange && this.scale)
|
|
6433
|
-
this.placeholder = "0" + this.decimalSeparator + "".padEnd(this.scale, "0");
|
|
6434
|
-
if (changes.scale ||
|
|
6435
|
-
changes.decimalSeparator ||
|
|
6436
|
-
changes.thousandsSeparator ||
|
|
6437
|
-
changes.alignTo ||
|
|
6438
|
-
changes.precision ||
|
|
6439
|
-
changes.allowNegative) {
|
|
6440
|
-
this.updateVariables();
|
|
6441
|
-
}
|
|
6442
|
-
};
|
|
6443
|
-
/**
|
|
6444
|
-
* Update the options values according to the directive input values.
|
|
6445
|
-
*/
|
|
6446
|
-
NumberInputDirective.prototype.updateVariables = function () {
|
|
6447
|
-
this.options = {
|
|
6448
|
-
align: this.alignTo,
|
|
6449
|
-
decimal: this.decimalSeparator,
|
|
6450
|
-
thousands: this.thousandsSeparator,
|
|
6451
|
-
precision: this.scale || 0,
|
|
6452
|
-
prefix: "",
|
|
6453
|
-
suffix: "",
|
|
6454
|
-
allowNegative: this.allowNegative,
|
|
6455
|
-
};
|
|
6456
|
-
this.calculateMaxLength();
|
|
6457
|
-
};
|
|
6458
|
-
/**
|
|
6459
|
-
* Responsible to calculate the field maximum length considering the separators.
|
|
6460
|
-
*/
|
|
6461
|
-
NumberInputDirective.prototype.calculateMaxLength = function () {
|
|
6462
|
-
var decSepLength = this.decimalSeparator.length;
|
|
6463
|
-
var thoSepLength = this.thousandsSeparator.length;
|
|
6464
|
-
var maxLength = this.precision + (this.scale ? decSepLength : 0);
|
|
6465
|
-
maxLength += Math.ceil((this.precision - (this.scale ? this.scale : 0)) / 3 - 1) * thoSepLength;
|
|
6466
|
-
this.maxLength = maxLength;
|
|
6467
|
-
};
|
|
6468
|
-
/**
|
|
6469
|
-
* Prevents the default CurrencyMask behavior when typed a incorrect value.
|
|
6470
|
-
* By default the CurrencyMask inputs the mask value to the component value when typed a incorrect value.
|
|
6471
|
-
*/
|
|
6472
|
-
NumberInputDirective.prototype.handleKeypress = function (event) {
|
|
6473
|
-
var negativeOperator = "-";
|
|
6474
|
-
var key = event.key;
|
|
6475
|
-
if (this.thousandsSeparator.includes(key) ||
|
|
6476
|
-
this.decimalSeparator.includes(key) ||
|
|
6477
|
-
negativeOperator.includes(key) ||
|
|
6478
|
-
this.regex.test(key) ||
|
|
6479
|
-
"Enter".toUpperCase() === key.toUpperCase())
|
|
6480
|
-
_super.prototype.handleKeypress.call(this, event);
|
|
6481
|
-
else
|
|
6482
|
-
event.preventDefault();
|
|
6483
|
-
};
|
|
6484
|
-
NumberInputDirective.prototype.onLocaleService = function () {
|
|
6485
|
-
var _this = this;
|
|
6486
|
-
this.localeService
|
|
6487
|
-
.getLocale()
|
|
6488
|
-
.pipe(operators.first())
|
|
6489
|
-
.subscribe(function () {
|
|
6490
|
-
var _a, _b;
|
|
6491
|
-
_this.decimalSeparator = (_a = _this.decimalSeparator) !== null && _a !== void 0 ? _a : _this.localeService.getDecimalSeparator();
|
|
6492
|
-
_this.thousandsSeparator = (_b = _this.thousandsSeparator) !== null && _b !== void 0 ? _b : _this.localeService.getGroupingSeparator();
|
|
6493
|
-
});
|
|
6494
|
-
};
|
|
6495
|
-
var NumberInputDirective_1;
|
|
6496
|
-
NumberInputDirective.ctorParameters = function () { return [
|
|
6497
|
-
{ type: core.ElementRef },
|
|
6498
|
-
{ type: core.KeyValueDiffers },
|
|
6499
|
-
{ type: LocaleService }
|
|
6500
|
-
]; };
|
|
6501
|
-
__decorate([
|
|
6502
|
-
core.Input()
|
|
6503
|
-
], NumberInputDirective.prototype, "precision", void 0);
|
|
6504
|
-
__decorate([
|
|
6505
|
-
core.Input()
|
|
6506
|
-
], NumberInputDirective.prototype, "scale", void 0);
|
|
6507
|
-
__decorate([
|
|
6508
|
-
core.Input()
|
|
6509
|
-
], NumberInputDirective.prototype, "decimalSeparator", void 0);
|
|
6510
|
-
__decorate([
|
|
6511
|
-
core.Input()
|
|
6512
|
-
], NumberInputDirective.prototype, "thousandsSeparator", void 0);
|
|
6513
|
-
__decorate([
|
|
6514
|
-
core.Input()
|
|
6515
|
-
], NumberInputDirective.prototype, "alignTo", void 0);
|
|
6516
|
-
__decorate([
|
|
6517
|
-
core.Input()
|
|
6518
|
-
], NumberInputDirective.prototype, "allowNegative", void 0);
|
|
6519
|
-
__decorate([
|
|
6520
|
-
core.Input(),
|
|
6521
|
-
core.HostBinding("attr.placeholder")
|
|
6522
|
-
], NumberInputDirective.prototype, "placeholder", void 0);
|
|
6523
|
-
__decorate([
|
|
6524
|
-
core.HostBinding("attr.maxLength")
|
|
6525
|
-
], NumberInputDirective.prototype, "maxLength", void 0);
|
|
6526
|
-
NumberInputDirective = NumberInputDirective_1 = __decorate([
|
|
6527
|
-
core.Directive({
|
|
6528
|
-
selector: "input[sNumberInput]",
|
|
6529
|
-
providers: [
|
|
6530
|
-
{
|
|
6531
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
6532
|
-
useExisting: core.forwardRef(function () { return NumberInputDirective_1; }),
|
|
6533
|
-
multi: true,
|
|
6534
|
-
},
|
|
6535
|
-
],
|
|
6536
|
-
})
|
|
6537
|
-
], NumberInputDirective);
|
|
6538
|
-
return NumberInputDirective;
|
|
6539
|
-
}(ng2CurrencyMask$1.CurrencyMaskDirective));
|
|
6540
|
-
|
|
6541
|
-
/**
|
|
6542
|
-
* @deprecated Should use 'BignumberInputModule' instead
|
|
6543
|
-
*/
|
|
6544
|
-
var NumberInputModule = /** @class */ (function () {
|
|
6545
|
-
function NumberInputModule() {
|
|
6546
|
-
}
|
|
6547
|
-
NumberInputModule = __decorate([
|
|
6548
|
-
core.NgModule({
|
|
6549
|
-
imports: [common.CommonModule],
|
|
6550
|
-
declarations: [NumberInputDirective],
|
|
6551
|
-
exports: [NumberInputDirective],
|
|
6552
|
-
})
|
|
6553
|
-
], NumberInputModule);
|
|
6554
|
-
return NumberInputModule;
|
|
6555
|
-
}());
|
|
5989
|
+
], NumberInputModule);
|
|
5990
|
+
return NumberInputModule;
|
|
5991
|
+
}());
|
|
6556
5992
|
|
|
6557
5993
|
/**
|
|
6558
5994
|
* @deprecated Should use BignumberField instead
|
|
@@ -6560,9 +5996,8 @@
|
|
|
6560
5996
|
var NumberField = /** @class */ (function (_super) {
|
|
6561
5997
|
__extends(NumberField, _super);
|
|
6562
5998
|
function NumberField(config) {
|
|
6563
|
-
var _a;
|
|
6564
5999
|
var _this = _super.call(this, config) || this;
|
|
6565
|
-
_this.numberLocaleOptions =
|
|
6000
|
+
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
6566
6001
|
_this.browserAutocomplete = config.browserAutocomplete;
|
|
6567
6002
|
_this.precision = config.precision;
|
|
6568
6003
|
_this.scale = config.scale;
|
|
@@ -6585,9 +6020,8 @@
|
|
|
6585
6020
|
var DecimalField = /** @class */ (function (_super) {
|
|
6586
6021
|
__extends(DecimalField, _super);
|
|
6587
6022
|
function DecimalField(config) {
|
|
6588
|
-
var _a;
|
|
6589
6023
|
var _this = _super.call(this, config) || this;
|
|
6590
|
-
_this.numberLocaleOptions =
|
|
6024
|
+
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
6591
6025
|
_this.alignTo = config.alignTo || exports.NumberAlignmentOption.RIGHT;
|
|
6592
6026
|
_this.scale = typeof config.scale === "function" ? config.scale() : config.scale;
|
|
6593
6027
|
return _this;
|
|
@@ -6601,10 +6035,9 @@
|
|
|
6601
6035
|
var CurrencyField = /** @class */ (function (_super) {
|
|
6602
6036
|
__extends(CurrencyField, _super);
|
|
6603
6037
|
function CurrencyField(config) {
|
|
6604
|
-
var _a;
|
|
6605
6038
|
var _this = _super.call(this, config) || this;
|
|
6606
6039
|
_this.currency = config['currency'];
|
|
6607
|
-
_this.numberLocaleOptions =
|
|
6040
|
+
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
6608
6041
|
return _this;
|
|
6609
6042
|
}
|
|
6610
6043
|
return CurrencyField;
|
|
@@ -8020,6 +7453,8 @@
|
|
|
8020
7453
|
.replace(/\byy\b/, "YYYY"); // year (four digits)
|
|
8021
7454
|
};
|
|
8022
7455
|
|
|
7456
|
+
var isNullOrUndefined = function (value) { return value === null || value === undefined; };
|
|
7457
|
+
|
|
8023
7458
|
|
|
8024
7459
|
(function (ValidateErrors) {
|
|
8025
7460
|
ValidateErrors["MAX_FILE_SIZE"] = "MAX_FILE_SIZE";
|
|
@@ -8040,7 +7475,7 @@
|
|
|
8040
7475
|
exports.FileUploadPermissions.Remove,
|
|
8041
7476
|
];
|
|
8042
7477
|
|
|
8043
|
-
var moment$
|
|
7478
|
+
var moment$1 = moment_;
|
|
8044
7479
|
var FileUploadComponent = /** @class */ (function () {
|
|
8045
7480
|
function FileUploadComponent(sanitizer, fileUploadService, translate) {
|
|
8046
7481
|
this.sanitizer = sanitizer;
|
|
@@ -8222,11 +7657,11 @@
|
|
|
8222
7657
|
.then(function (metadata) { return _this.setModifiedDate(metadata); });
|
|
8223
7658
|
};
|
|
8224
7659
|
FileUploadComponent.prototype.setModifiedDate = function (metadata) {
|
|
8225
|
-
var hour = moment$
|
|
8226
|
-
var minutes = moment$
|
|
8227
|
-
var day = moment$
|
|
8228
|
-
var month = moment$
|
|
8229
|
-
var fullYear = moment$
|
|
7660
|
+
var hour = moment$1(metadata.modified).format("HH");
|
|
7661
|
+
var minutes = moment$1(metadata.modified).format("mm");
|
|
7662
|
+
var day = moment$1(metadata.modified).format("DD");
|
|
7663
|
+
var month = moment$1(metadata.modified).format("MM");
|
|
7664
|
+
var fullYear = moment$1(metadata.modified).format("YYYY");
|
|
8230
7665
|
this.modifiedDate = this.translate.instant("platform.angular_components.date_modified_custom_blob", { hour: hour, minutes: minutes, day: day, month: month, fullYear: fullYear });
|
|
8231
7666
|
};
|
|
8232
7667
|
var FileUploadComponent_1;
|
|
@@ -8321,414 +7756,977 @@
|
|
|
8321
7756
|
core.Output()
|
|
8322
7757
|
], FileUploadComponent.prototype, "validateErrors", void 0);
|
|
8323
7758
|
__decorate([
|
|
8324
|
-
core.HostListener("window:resize")
|
|
8325
|
-
], FileUploadComponent.prototype, "onResize", null);
|
|
8326
|
-
FileUploadComponent = FileUploadComponent_1 = __decorate([
|
|
8327
|
-
core.Component({
|
|
8328
|
-
selector: "s-file-upload",
|
|
8329
|
-
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",
|
|
8330
|
-
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}}"]
|
|
7759
|
+
core.HostListener("window:resize")
|
|
7760
|
+
], FileUploadComponent.prototype, "onResize", null);
|
|
7761
|
+
FileUploadComponent = FileUploadComponent_1 = __decorate([
|
|
7762
|
+
core.Component({
|
|
7763
|
+
selector: "s-file-upload",
|
|
7764
|
+
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",
|
|
7765
|
+
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}}"]
|
|
7766
|
+
})
|
|
7767
|
+
], FileUploadComponent);
|
|
7768
|
+
return FileUploadComponent;
|
|
7769
|
+
}());
|
|
7770
|
+
|
|
7771
|
+
var FileUploadModule = /** @class */ (function () {
|
|
7772
|
+
function FileUploadModule() {
|
|
7773
|
+
}
|
|
7774
|
+
FileUploadModule = __decorate([
|
|
7775
|
+
core.NgModule({
|
|
7776
|
+
declarations: [FileUploadComponent],
|
|
7777
|
+
imports: [
|
|
7778
|
+
common.CommonModule,
|
|
7779
|
+
ButtonModule,
|
|
7780
|
+
tooltip.TooltipModule,
|
|
7781
|
+
progressbar.ProgressBarModule,
|
|
7782
|
+
core$1.TranslateModule,
|
|
7783
|
+
],
|
|
7784
|
+
providers: [FileUploadService],
|
|
7785
|
+
exports: [FileUploadComponent],
|
|
7786
|
+
})
|
|
7787
|
+
], FileUploadModule);
|
|
7788
|
+
return FileUploadModule;
|
|
7789
|
+
}());
|
|
7790
|
+
|
|
7791
|
+
var InfoSignComponent = /** @class */ (function () {
|
|
7792
|
+
function InfoSignComponent() {
|
|
7793
|
+
}
|
|
7794
|
+
InfoSignComponent = __decorate([
|
|
7795
|
+
core.Component({
|
|
7796
|
+
selector: "s-info-sign-component",
|
|
7797
|
+
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",
|
|
7798
|
+
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}"]
|
|
7799
|
+
})
|
|
7800
|
+
], InfoSignComponent);
|
|
7801
|
+
return InfoSignComponent;
|
|
7802
|
+
}());
|
|
7803
|
+
|
|
7804
|
+
var InfoSignDirective = /** @class */ (function () {
|
|
7805
|
+
function InfoSignDirective(templateRef, viewContainer, componentFactoryResolver) {
|
|
7806
|
+
this.templateRef = templateRef;
|
|
7807
|
+
this.viewContainer = viewContainer;
|
|
7808
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
7809
|
+
this.displayTime = 5000;
|
|
7810
|
+
}
|
|
7811
|
+
InfoSignDirective.prototype.ngOnChanges = function () {
|
|
7812
|
+
this.createInfoSign();
|
|
7813
|
+
};
|
|
7814
|
+
InfoSignDirective.prototype.ngOnInit = function () {
|
|
7815
|
+
this.createInfoSign();
|
|
7816
|
+
};
|
|
7817
|
+
InfoSignDirective.prototype.ngOnDestroy = function () {
|
|
7818
|
+
if (this.componentRef) {
|
|
7819
|
+
this.componentRef.destroy();
|
|
7820
|
+
}
|
|
7821
|
+
};
|
|
7822
|
+
InfoSignDirective.prototype.createInfoSign = function () {
|
|
7823
|
+
if (!this.componentRef && this.sInfoSign) {
|
|
7824
|
+
this.viewContainer.clear();
|
|
7825
|
+
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(InfoSignComponent);
|
|
7826
|
+
this.componentRef = this.viewContainer.createComponent(componentFactory);
|
|
7827
|
+
this.componentRef.instance.templateRef = this.templateRef;
|
|
7828
|
+
this.componentRef.instance.tooltip = this.sInfoSign;
|
|
7829
|
+
this.componentRef.instance.displayTime = this.displayTime;
|
|
7830
|
+
this.componentRef.instance.focusedInputRef = this.focusedInputRef;
|
|
7831
|
+
}
|
|
7832
|
+
else if (this.componentRef && this.sInfoSign) {
|
|
7833
|
+
this.componentRef.instance.tooltip = this.sInfoSign;
|
|
7834
|
+
}
|
|
7835
|
+
else {
|
|
7836
|
+
this.viewContainer.clear();
|
|
7837
|
+
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
7838
|
+
}
|
|
7839
|
+
};
|
|
7840
|
+
InfoSignDirective.ctorParameters = function () { return [
|
|
7841
|
+
{ type: core.TemplateRef },
|
|
7842
|
+
{ type: core.ViewContainerRef },
|
|
7843
|
+
{ type: core.ComponentFactoryResolver }
|
|
7844
|
+
]; };
|
|
7845
|
+
__decorate([
|
|
7846
|
+
core.Input()
|
|
7847
|
+
], InfoSignDirective.prototype, "sInfoSign", void 0);
|
|
7848
|
+
__decorate([
|
|
7849
|
+
core.Input('sInfoSignDisplayTime')
|
|
7850
|
+
], InfoSignDirective.prototype, "displayTime", void 0);
|
|
7851
|
+
__decorate([
|
|
7852
|
+
core.Input('sInfoSignFocusedInputRef')
|
|
7853
|
+
], InfoSignDirective.prototype, "focusedInputRef", void 0);
|
|
7854
|
+
InfoSignDirective = __decorate([
|
|
7855
|
+
core.Directive({
|
|
7856
|
+
selector: "[sInfoSign]"
|
|
7857
|
+
})
|
|
7858
|
+
], InfoSignDirective);
|
|
7859
|
+
return InfoSignDirective;
|
|
7860
|
+
}());
|
|
7861
|
+
|
|
7862
|
+
var InfoSignModule = /** @class */ (function () {
|
|
7863
|
+
function InfoSignModule() {
|
|
7864
|
+
}
|
|
7865
|
+
InfoSignModule = __decorate([
|
|
7866
|
+
core.NgModule({
|
|
7867
|
+
imports: [
|
|
7868
|
+
TooltipModule,
|
|
7869
|
+
common.CommonModule,
|
|
7870
|
+
],
|
|
7871
|
+
declarations: [
|
|
7872
|
+
InfoSignDirective,
|
|
7873
|
+
InfoSignComponent,
|
|
7874
|
+
],
|
|
7875
|
+
exports: [InfoSignDirective],
|
|
7876
|
+
entryComponents: [InfoSignComponent],
|
|
7877
|
+
})
|
|
7878
|
+
], InfoSignModule);
|
|
7879
|
+
return InfoSignModule;
|
|
7880
|
+
}());
|
|
7881
|
+
|
|
7882
|
+
var IAssistIconComponent = /** @class */ (function () {
|
|
7883
|
+
function IAssistIconComponent() {
|
|
7884
|
+
}
|
|
7885
|
+
IAssistIconComponent = __decorate([
|
|
7886
|
+
core.Component({
|
|
7887
|
+
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>"
|
|
7888
|
+
})
|
|
7889
|
+
], IAssistIconComponent);
|
|
7890
|
+
return IAssistIconComponent;
|
|
7891
|
+
}());
|
|
7892
|
+
|
|
7893
|
+
var SeniorIconComponent = /** @class */ (function () {
|
|
7894
|
+
function SeniorIconComponent() {
|
|
7895
|
+
}
|
|
7896
|
+
SeniorIconComponent = __decorate([
|
|
7897
|
+
core.Component({
|
|
7898
|
+
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"
|
|
7899
|
+
})
|
|
7900
|
+
], SeniorIconComponent);
|
|
7901
|
+
return SeniorIconComponent;
|
|
7902
|
+
}());
|
|
7903
|
+
|
|
7904
|
+
var SVGFactoryIcons;
|
|
7905
|
+
(function (SVGFactoryIcons) {
|
|
7906
|
+
SVGFactoryIcons["IAssist"] = "iassist";
|
|
7907
|
+
SVGFactoryIcons["Senior"] = "senior";
|
|
7908
|
+
})(SVGFactoryIcons || (SVGFactoryIcons = {}));
|
|
7909
|
+
|
|
7910
|
+
var SVGFactoryDirective = /** @class */ (function () {
|
|
7911
|
+
function SVGFactoryDirective(viewContainerRef, componentFactoryResolver, cdr) {
|
|
7912
|
+
this.viewContainerRef = viewContainerRef;
|
|
7913
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
7914
|
+
this.cdr = cdr;
|
|
7915
|
+
this._iconClass = this._getIconClass(SVGFactoryIcons.Senior);
|
|
7916
|
+
}
|
|
7917
|
+
Object.defineProperty(SVGFactoryDirective.prototype, "sSVGFactory", {
|
|
7918
|
+
set: function (icon) {
|
|
7919
|
+
this._iconClass = this._getIconClass(icon);
|
|
7920
|
+
},
|
|
7921
|
+
enumerable: true,
|
|
7922
|
+
configurable: true
|
|
7923
|
+
});
|
|
7924
|
+
SVGFactoryDirective.prototype.ngAfterViewInit = function () {
|
|
7925
|
+
this._createComponent();
|
|
7926
|
+
};
|
|
7927
|
+
SVGFactoryDirective.prototype._createComponent = function () {
|
|
7928
|
+
var factory = this.componentFactoryResolver.resolveComponentFactory(this._iconClass);
|
|
7929
|
+
this.viewContainerRef.clear();
|
|
7930
|
+
this.viewContainerRef.createComponent(factory);
|
|
7931
|
+
this.cdr.detectChanges();
|
|
7932
|
+
};
|
|
7933
|
+
SVGFactoryDirective.prototype._getIconClass = function (icon) {
|
|
7934
|
+
switch (icon) {
|
|
7935
|
+
case SVGFactoryIcons.IAssist:
|
|
7936
|
+
return IAssistIconComponent;
|
|
7937
|
+
case SVGFactoryIcons.Senior:
|
|
7938
|
+
default:
|
|
7939
|
+
return SeniorIconComponent;
|
|
7940
|
+
}
|
|
7941
|
+
};
|
|
7942
|
+
SVGFactoryDirective.ctorParameters = function () { return [
|
|
7943
|
+
{ type: core.ViewContainerRef },
|
|
7944
|
+
{ type: core.ComponentFactoryResolver },
|
|
7945
|
+
{ type: core.ChangeDetectorRef }
|
|
7946
|
+
]; };
|
|
7947
|
+
__decorate([
|
|
7948
|
+
core.Input("sSVGFactory")
|
|
7949
|
+
], SVGFactoryDirective.prototype, "sSVGFactory", null);
|
|
7950
|
+
SVGFactoryDirective = __decorate([
|
|
7951
|
+
core.Directive({
|
|
7952
|
+
selector: "[sSVGFactory]",
|
|
8331
7953
|
})
|
|
8332
|
-
],
|
|
8333
|
-
return
|
|
7954
|
+
], SVGFactoryDirective);
|
|
7955
|
+
return SVGFactoryDirective;
|
|
8334
7956
|
}());
|
|
8335
7957
|
|
|
8336
|
-
var
|
|
8337
|
-
function
|
|
7958
|
+
var SVGFactoryModule = /** @class */ (function () {
|
|
7959
|
+
function SVGFactoryModule() {
|
|
8338
7960
|
}
|
|
8339
|
-
|
|
7961
|
+
SVGFactoryModule = __decorate([
|
|
8340
7962
|
core.NgModule({
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
progressbar.ProgressBarModule,
|
|
8347
|
-
core$1.TranslateModule,
|
|
7963
|
+
imports: [common.CommonModule],
|
|
7964
|
+
declarations: [
|
|
7965
|
+
SVGFactoryDirective,
|
|
7966
|
+
IAssistIconComponent,
|
|
7967
|
+
SeniorIconComponent,
|
|
8348
7968
|
],
|
|
8349
|
-
|
|
8350
|
-
exports: [FileUploadComponent],
|
|
7969
|
+
exports: [SVGFactoryDirective],
|
|
8351
7970
|
})
|
|
8352
|
-
],
|
|
8353
|
-
return
|
|
7971
|
+
], SVGFactoryModule);
|
|
7972
|
+
return SVGFactoryModule;
|
|
8354
7973
|
}());
|
|
8355
7974
|
|
|
8356
|
-
var
|
|
8357
|
-
function
|
|
7975
|
+
var DotsIndicatorComponent = /** @class */ (function () {
|
|
7976
|
+
function DotsIndicatorComponent() {
|
|
8358
7977
|
}
|
|
8359
|
-
|
|
7978
|
+
DotsIndicatorComponent = __decorate([
|
|
8360
7979
|
core.Component({
|
|
8361
|
-
selector: "s-
|
|
8362
|
-
template: "<
|
|
8363
|
-
styles: [".
|
|
7980
|
+
selector: "s-dots-indicator",
|
|
7981
|
+
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",
|
|
7982
|
+
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)}}"]
|
|
8364
7983
|
})
|
|
8365
|
-
],
|
|
8366
|
-
return
|
|
7984
|
+
], DotsIndicatorComponent);
|
|
7985
|
+
return DotsIndicatorComponent;
|
|
8367
7986
|
}());
|
|
8368
7987
|
|
|
8369
|
-
var
|
|
8370
|
-
function
|
|
8371
|
-
this.templateRef = templateRef;
|
|
8372
|
-
this.viewContainer = viewContainer;
|
|
8373
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
8374
|
-
this.displayTime = 5000;
|
|
7988
|
+
var LoadingIndicatorComponent = /** @class */ (function () {
|
|
7989
|
+
function LoadingIndicatorComponent() {
|
|
8375
7990
|
}
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
7991
|
+
LoadingIndicatorComponent = __decorate([
|
|
7992
|
+
core.Component({
|
|
7993
|
+
selector: "s-logo-indicator",
|
|
7994
|
+
template: "<div class=\"logo-indicator\">\n <span *sSVGFactory=\"'senior'\"></span>\n</div>\n",
|
|
7995
|
+
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)}}"]
|
|
7996
|
+
})
|
|
7997
|
+
], LoadingIndicatorComponent);
|
|
7998
|
+
return LoadingIndicatorComponent;
|
|
7999
|
+
}());
|
|
8000
|
+
|
|
8001
|
+
var LoadingStateIndicators;
|
|
8002
|
+
(function (LoadingStateIndicators) {
|
|
8003
|
+
LoadingStateIndicators["Dots"] = "dots";
|
|
8004
|
+
LoadingStateIndicators["Logo"] = "logo";
|
|
8005
|
+
})(LoadingStateIndicators || (LoadingStateIndicators = {}));
|
|
8006
|
+
|
|
8007
|
+
var LoadingStateComponent = /** @class */ (function () {
|
|
8008
|
+
function LoadingStateComponent() {
|
|
8009
|
+
this.indicator = LoadingStateIndicators.Dots;
|
|
8010
|
+
this.id = "s-loading-state-" + LoadingStateComponent_1.nextId++;
|
|
8011
|
+
this.BLOCK_TIMEOUT_VALUE = 300;
|
|
8012
|
+
this.UNBLOCK_TIMEOUT_VALUE = 200;
|
|
8013
|
+
}
|
|
8014
|
+
LoadingStateComponent_1 = LoadingStateComponent;
|
|
8015
|
+
Object.defineProperty(LoadingStateComponent.prototype, "loading", {
|
|
8016
|
+
get: function () {
|
|
8017
|
+
return this._loading;
|
|
8018
|
+
},
|
|
8019
|
+
set: function (loading) {
|
|
8020
|
+
this._loading = loading;
|
|
8021
|
+
loading ? this.block() : this.unblock();
|
|
8022
|
+
},
|
|
8023
|
+
enumerable: true,
|
|
8024
|
+
configurable: true
|
|
8025
|
+
});
|
|
8026
|
+
LoadingStateComponent.prototype.block = function () {
|
|
8027
|
+
var _this = this;
|
|
8028
|
+
if (this.unblockTimeoutId) {
|
|
8029
|
+
clearTimeout(this.unblockTimeoutId);
|
|
8030
|
+
this.unblockTimeoutId = undefined;
|
|
8031
|
+
}
|
|
8032
|
+
if (!this.blockTimeoutId) {
|
|
8033
|
+
this.blockTimeoutId = setTimeout(function () {
|
|
8034
|
+
_this.blocking = true;
|
|
8035
|
+
_this.blockTimeoutId = undefined;
|
|
8036
|
+
}, this.BLOCK_TIMEOUT_VALUE);
|
|
8385
8037
|
}
|
|
8386
8038
|
};
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
this.
|
|
8392
|
-
this.componentRef.instance.templateRef = this.templateRef;
|
|
8393
|
-
this.componentRef.instance.tooltip = this.sInfoSign;
|
|
8394
|
-
this.componentRef.instance.displayTime = this.displayTime;
|
|
8395
|
-
this.componentRef.instance.focusedInputRef = this.focusedInputRef;
|
|
8039
|
+
LoadingStateComponent.prototype.unblock = function () {
|
|
8040
|
+
var _this = this;
|
|
8041
|
+
if (this.blockTimeoutId) {
|
|
8042
|
+
clearTimeout(this.blockTimeoutId);
|
|
8043
|
+
this.blockTimeoutId = undefined;
|
|
8396
8044
|
}
|
|
8397
|
-
|
|
8398
|
-
this.
|
|
8045
|
+
if (!this.unblockTimeoutId) {
|
|
8046
|
+
this.unblockTimeoutId = setTimeout(function () {
|
|
8047
|
+
_this.blocking = false;
|
|
8048
|
+
_this.unblockTimeoutId = undefined;
|
|
8049
|
+
}, this.UNBLOCK_TIMEOUT_VALUE);
|
|
8399
8050
|
}
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8051
|
+
};
|
|
8052
|
+
LoadingStateComponent.prototype.ngOnDestroy = function () {
|
|
8053
|
+
if (this.blockTimeoutId) {
|
|
8054
|
+
clearTimeout(this.blockTimeoutId);
|
|
8055
|
+
}
|
|
8056
|
+
if (this.unblockTimeoutId) {
|
|
8057
|
+
clearTimeout(this.unblockTimeoutId);
|
|
8403
8058
|
}
|
|
8404
8059
|
};
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
{ type: core.ViewContainerRef },
|
|
8408
|
-
{ type: core.ComponentFactoryResolver }
|
|
8409
|
-
]; };
|
|
8060
|
+
var LoadingStateComponent_1;
|
|
8061
|
+
LoadingStateComponent.nextId = 0;
|
|
8410
8062
|
__decorate([
|
|
8411
8063
|
core.Input()
|
|
8412
|
-
],
|
|
8064
|
+
], LoadingStateComponent.prototype, "indicator", void 0);
|
|
8413
8065
|
__decorate([
|
|
8414
|
-
core.Input(
|
|
8415
|
-
],
|
|
8066
|
+
core.Input()
|
|
8067
|
+
], LoadingStateComponent.prototype, "id", void 0);
|
|
8416
8068
|
__decorate([
|
|
8417
|
-
core.Input(
|
|
8418
|
-
],
|
|
8419
|
-
|
|
8069
|
+
core.Input()
|
|
8070
|
+
], LoadingStateComponent.prototype, "blockWindow", void 0);
|
|
8071
|
+
__decorate([
|
|
8072
|
+
core.Input()
|
|
8073
|
+
], LoadingStateComponent.prototype, "loading", null);
|
|
8074
|
+
LoadingStateComponent = LoadingStateComponent_1 = __decorate([
|
|
8075
|
+
core.Component({
|
|
8076
|
+
selector: "s-loading-state",
|
|
8077
|
+
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>",
|
|
8078
|
+
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}"]
|
|
8079
|
+
})
|
|
8080
|
+
], LoadingStateComponent);
|
|
8081
|
+
return LoadingStateComponent;
|
|
8082
|
+
}());
|
|
8083
|
+
|
|
8084
|
+
var LoadingStateDirective = /** @class */ (function () {
|
|
8085
|
+
function LoadingStateDirective(target, template, componentFactoryResolver, cdr) {
|
|
8086
|
+
this.target = target;
|
|
8087
|
+
this.template = template;
|
|
8088
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
8089
|
+
this.cdr = cdr;
|
|
8090
|
+
this._loading = false;
|
|
8091
|
+
this.indicator = LoadingStateIndicators.Dots;
|
|
8092
|
+
}
|
|
8093
|
+
Object.defineProperty(LoadingStateDirective.prototype, "sLoadingState", {
|
|
8094
|
+
set: function (value) {
|
|
8095
|
+
if (typeof value === "boolean") {
|
|
8096
|
+
this._loading = value;
|
|
8097
|
+
this.indicator = LoadingStateIndicators.Dots;
|
|
8098
|
+
}
|
|
8099
|
+
else if (typeof value === "object") {
|
|
8100
|
+
this._loading = value.loading;
|
|
8101
|
+
this.indicator = value.indicator || LoadingStateIndicators.Dots;
|
|
8102
|
+
}
|
|
8103
|
+
if (this.loaderComponent) {
|
|
8104
|
+
this.loaderComponent.instance.loading = this._loading;
|
|
8105
|
+
this.loaderComponent.instance.indicator = this.indicator;
|
|
8106
|
+
}
|
|
8107
|
+
},
|
|
8108
|
+
enumerable: true,
|
|
8109
|
+
configurable: true
|
|
8110
|
+
});
|
|
8111
|
+
LoadingStateDirective.prototype.ngAfterViewInit = function () {
|
|
8112
|
+
this.createComponent();
|
|
8113
|
+
};
|
|
8114
|
+
LoadingStateDirective.prototype.createComponent = function () {
|
|
8115
|
+
var factory = this.componentFactoryResolver.resolveComponentFactory(LoadingStateComponent);
|
|
8116
|
+
this.loaderComponent = this.target.createComponent(factory);
|
|
8117
|
+
this.loaderComponent.instance.contents = this.template;
|
|
8118
|
+
this.loaderComponent.instance.loading = this._loading;
|
|
8119
|
+
this.loaderComponent.instance.indicator = this.indicator;
|
|
8120
|
+
this.cdr.detectChanges();
|
|
8121
|
+
};
|
|
8122
|
+
LoadingStateDirective.prototype.ngOnDestroy = function () {
|
|
8123
|
+
if (this.loaderComponent) {
|
|
8124
|
+
this.loaderComponent.destroy();
|
|
8125
|
+
}
|
|
8126
|
+
};
|
|
8127
|
+
LoadingStateDirective.ctorParameters = function () { return [
|
|
8128
|
+
{ type: core.ViewContainerRef },
|
|
8129
|
+
{ type: core.TemplateRef },
|
|
8130
|
+
{ type: core.ComponentFactoryResolver },
|
|
8131
|
+
{ type: core.ChangeDetectorRef }
|
|
8132
|
+
]; };
|
|
8133
|
+
__decorate([
|
|
8134
|
+
core.Input("sLoadingState")
|
|
8135
|
+
], LoadingStateDirective.prototype, "sLoadingState", null);
|
|
8136
|
+
LoadingStateDirective = __decorate([
|
|
8420
8137
|
core.Directive({
|
|
8421
|
-
selector: "[
|
|
8138
|
+
selector: "[sLoadingState]",
|
|
8422
8139
|
})
|
|
8423
|
-
],
|
|
8424
|
-
return
|
|
8140
|
+
], LoadingStateDirective);
|
|
8141
|
+
return LoadingStateDirective;
|
|
8425
8142
|
}());
|
|
8426
8143
|
|
|
8427
|
-
var
|
|
8428
|
-
function
|
|
8144
|
+
var LoadingStateModule = /** @class */ (function () {
|
|
8145
|
+
function LoadingStateModule() {
|
|
8429
8146
|
}
|
|
8430
|
-
|
|
8147
|
+
LoadingStateModule = __decorate([
|
|
8431
8148
|
core.NgModule({
|
|
8432
8149
|
imports: [
|
|
8433
|
-
TooltipModule,
|
|
8434
8150
|
common.CommonModule,
|
|
8151
|
+
SVGFactoryModule,
|
|
8435
8152
|
],
|
|
8436
8153
|
declarations: [
|
|
8437
|
-
|
|
8438
|
-
|
|
8154
|
+
LoadingStateComponent,
|
|
8155
|
+
LoadingStateDirective,
|
|
8156
|
+
DotsIndicatorComponent,
|
|
8157
|
+
LoadingIndicatorComponent,
|
|
8439
8158
|
],
|
|
8440
|
-
exports: [
|
|
8441
|
-
|
|
8159
|
+
exports: [
|
|
8160
|
+
LoadingStateComponent,
|
|
8161
|
+
LoadingStateDirective,
|
|
8162
|
+
],
|
|
8163
|
+
entryComponents: [LoadingStateComponent],
|
|
8442
8164
|
})
|
|
8443
|
-
],
|
|
8444
|
-
return
|
|
8165
|
+
], LoadingStateModule);
|
|
8166
|
+
return LoadingStateModule;
|
|
8445
8167
|
}());
|
|
8446
8168
|
|
|
8447
|
-
var
|
|
8448
|
-
function
|
|
8169
|
+
var LocalizedBignumberPipe = /** @class */ (function () {
|
|
8170
|
+
function LocalizedBignumberPipe(localeService) {
|
|
8171
|
+
this.localeService = localeService;
|
|
8449
8172
|
}
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8173
|
+
LocalizedBignumberPipe.prototype.transform = function (value, options) {
|
|
8174
|
+
return value !== undefined && value !== null ? this.applyMask(value, options) : rxjs.of(value);
|
|
8175
|
+
};
|
|
8176
|
+
LocalizedBignumberPipe.prototype.applyMask = function (value, options) {
|
|
8177
|
+
return this.localeService.get().pipe(operators.map(function (localeConfig) {
|
|
8178
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
8179
|
+
var configs = {
|
|
8180
|
+
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$",
|
|
8181
|
+
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 : ".",
|
|
8182
|
+
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 : ",",
|
|
8183
|
+
scale: (_k = options === null || options === void 0 ? void 0 : options.scale) !== null && _k !== void 0 ? _k : 2,
|
|
8184
|
+
allowNegative: (_l = options === null || options === void 0 ? void 0 : options.allowNegative) !== null && _l !== void 0 ? _l : true
|
|
8185
|
+
};
|
|
8186
|
+
var isNumber = !(new BigNumber__default(value).isNaN());
|
|
8187
|
+
return ng2CurrencyMask.applyMask(value, configs, isNumber);
|
|
8188
|
+
}));
|
|
8189
|
+
};
|
|
8190
|
+
LocalizedBignumberPipe.ctorParameters = function () { return [
|
|
8191
|
+
{ type: LocaleService }
|
|
8192
|
+
]; };
|
|
8193
|
+
LocalizedBignumberPipe = __decorate([
|
|
8194
|
+
core.Pipe({
|
|
8195
|
+
name: "localizedBignumber",
|
|
8453
8196
|
})
|
|
8454
|
-
],
|
|
8455
|
-
return
|
|
8197
|
+
], LocalizedBignumberPipe);
|
|
8198
|
+
return LocalizedBignumberPipe;
|
|
8456
8199
|
}());
|
|
8457
8200
|
|
|
8458
|
-
var
|
|
8459
|
-
|
|
8201
|
+
var LocalizedBignumberImpurePipe = /** @class */ (function (_super) {
|
|
8202
|
+
__extends(LocalizedBignumberImpurePipe, _super);
|
|
8203
|
+
function LocalizedBignumberImpurePipe() {
|
|
8204
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
8460
8205
|
}
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8206
|
+
LocalizedBignumberImpurePipe.prototype.transform = function (value, options) {
|
|
8207
|
+
return _super.prototype.transform.call(this, value, options);
|
|
8208
|
+
};
|
|
8209
|
+
LocalizedBignumberImpurePipe = __decorate([
|
|
8210
|
+
core.Pipe({
|
|
8211
|
+
name: "localizedBignumberImpure",
|
|
8212
|
+
pure: false,
|
|
8464
8213
|
})
|
|
8465
|
-
],
|
|
8466
|
-
return
|
|
8467
|
-
}());
|
|
8468
|
-
|
|
8469
|
-
var SVGFactoryIcons;
|
|
8470
|
-
(function (SVGFactoryIcons) {
|
|
8471
|
-
SVGFactoryIcons["IAssist"] = "iassist";
|
|
8472
|
-
SVGFactoryIcons["Senior"] = "senior";
|
|
8473
|
-
})(SVGFactoryIcons || (SVGFactoryIcons = {}));
|
|
8214
|
+
], LocalizedBignumberImpurePipe);
|
|
8215
|
+
return LocalizedBignumberImpurePipe;
|
|
8216
|
+
}(LocalizedBignumberPipe));
|
|
8474
8217
|
|
|
8475
|
-
var
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8218
|
+
var LocalizedCurrencyPipeOptions = /** @class */ (function (_super) {
|
|
8219
|
+
__extends(LocalizedCurrencyPipeOptions, _super);
|
|
8220
|
+
function LocalizedCurrencyPipeOptions(config) {
|
|
8221
|
+
if (config === void 0) { config = {}; }
|
|
8222
|
+
var _this = _super.call(this, config) || this;
|
|
8223
|
+
_this.scale = 2;
|
|
8224
|
+
return _this;
|
|
8481
8225
|
}
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
this.viewContainerRef.clear();
|
|
8495
|
-
this.viewContainerRef.createComponent(factory);
|
|
8496
|
-
this.cdr.detectChanges();
|
|
8497
|
-
};
|
|
8498
|
-
SVGFactoryDirective.prototype._getIconClass = function (icon) {
|
|
8499
|
-
switch (icon) {
|
|
8500
|
-
case SVGFactoryIcons.IAssist:
|
|
8501
|
-
return IAssistIconComponent;
|
|
8502
|
-
case SVGFactoryIcons.Senior:
|
|
8503
|
-
default:
|
|
8504
|
-
return SeniorIconComponent;
|
|
8226
|
+
return LocalizedCurrencyPipeOptions;
|
|
8227
|
+
}(NumberLocaleOptions));
|
|
8228
|
+
/**
|
|
8229
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
8230
|
+
*/
|
|
8231
|
+
var LocalizedCurrencyPipe = /** @class */ (function () {
|
|
8232
|
+
function LocalizedCurrencyPipe(localeService) {
|
|
8233
|
+
this.localeService = localeService;
|
|
8234
|
+
}
|
|
8235
|
+
LocalizedCurrencyPipe.prototype.transform = function (value, options) {
|
|
8236
|
+
if (!options) {
|
|
8237
|
+
options = new LocalizedCurrencyPipeOptions();
|
|
8505
8238
|
}
|
|
8239
|
+
return value !== undefined && value !== null ? this.applyMask(value, options) : rxjs.of(value);
|
|
8506
8240
|
};
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8241
|
+
LocalizedCurrencyPipe.prototype.applyMask = function (value, options) {
|
|
8242
|
+
return this.localeService.get().pipe(operators.map(function (localeConfig) {
|
|
8243
|
+
var config = __assign(__assign({}, localeConfig.number), options);
|
|
8244
|
+
var scale = config.scale, currencySymbol = config.currencySymbol, thousandsSeparator = config.thousandsSeparator, decimalSeparator = config.decimalSeparator;
|
|
8245
|
+
var rawValue = Number(value).toFixed(scale);
|
|
8246
|
+
var onlyNumbers = rawValue.replace(/[^0-9]/g, "");
|
|
8247
|
+
var integerPart = onlyNumbers
|
|
8248
|
+
.slice(0, onlyNumbers.length - scale)
|
|
8249
|
+
.replace(/^0*/g, "")
|
|
8250
|
+
.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparator) || "0";
|
|
8251
|
+
var decimalPart = onlyNumbers.slice(onlyNumbers.length - scale);
|
|
8252
|
+
var newValue = scale ? integerPart + decimalSeparator + decimalPart : integerPart;
|
|
8253
|
+
var isZero = !Number(onlyNumbers);
|
|
8254
|
+
var operator = rawValue.includes("-") && !isZero ? "-" : "";
|
|
8255
|
+
return "" + operator + currencySymbol + newValue;
|
|
8256
|
+
}));
|
|
8257
|
+
};
|
|
8258
|
+
LocalizedCurrencyPipe.ctorParameters = function () { return [
|
|
8259
|
+
{ type: LocaleService }
|
|
8511
8260
|
]; };
|
|
8512
|
-
__decorate([
|
|
8513
|
-
core.
|
|
8514
|
-
|
|
8515
|
-
SVGFactoryDirective = __decorate([
|
|
8516
|
-
core.Directive({
|
|
8517
|
-
selector: "[sSVGFactory]",
|
|
8261
|
+
LocalizedCurrencyPipe = __decorate([
|
|
8262
|
+
core.Pipe({
|
|
8263
|
+
name: "localizedCurrency",
|
|
8518
8264
|
})
|
|
8519
|
-
],
|
|
8520
|
-
return
|
|
8265
|
+
], LocalizedCurrencyPipe);
|
|
8266
|
+
return LocalizedCurrencyPipe;
|
|
8521
8267
|
}());
|
|
8522
8268
|
|
|
8523
|
-
|
|
8524
|
-
|
|
8269
|
+
/**
|
|
8270
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
8271
|
+
*/
|
|
8272
|
+
var LocalizedCurrencyImpurePipe = /** @class */ (function (_super) {
|
|
8273
|
+
__extends(LocalizedCurrencyImpurePipe, _super);
|
|
8274
|
+
function LocalizedCurrencyImpurePipe() {
|
|
8275
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
8525
8276
|
}
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
exports: [SVGFactoryDirective],
|
|
8277
|
+
LocalizedCurrencyImpurePipe.prototype.transform = function (value, options) {
|
|
8278
|
+
if (options === void 0) { options = new LocalizedCurrencyPipeOptions(); }
|
|
8279
|
+
return _super.prototype.transform.call(this, value, options);
|
|
8280
|
+
};
|
|
8281
|
+
LocalizedCurrencyImpurePipe = __decorate([
|
|
8282
|
+
core.Pipe({
|
|
8283
|
+
name: "localizedCurrencyImpure",
|
|
8284
|
+
pure: false,
|
|
8535
8285
|
})
|
|
8536
|
-
],
|
|
8537
|
-
return
|
|
8286
|
+
], LocalizedCurrencyImpurePipe);
|
|
8287
|
+
return LocalizedCurrencyImpurePipe;
|
|
8288
|
+
}(LocalizedCurrencyPipe));
|
|
8289
|
+
|
|
8290
|
+
var moment$2 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
8291
|
+
var LocalizedDatePipe = /** @class */ (function () {
|
|
8292
|
+
function LocalizedDatePipe(localeService) {
|
|
8293
|
+
this.localeService = localeService;
|
|
8294
|
+
}
|
|
8295
|
+
LocalizedDatePipe.prototype.transform = function (value, format) {
|
|
8296
|
+
if (format === void 0) { format = "L LTS"; }
|
|
8297
|
+
return this.localeService.get().pipe(operators.map(function () { return (value ? moment$2(value).format(format) : value); }));
|
|
8298
|
+
};
|
|
8299
|
+
LocalizedDatePipe.ctorParameters = function () { return [
|
|
8300
|
+
{ type: LocaleService }
|
|
8301
|
+
]; };
|
|
8302
|
+
LocalizedDatePipe = __decorate([
|
|
8303
|
+
core.Pipe({
|
|
8304
|
+
name: "localizedDate",
|
|
8305
|
+
})
|
|
8306
|
+
], LocalizedDatePipe);
|
|
8307
|
+
return LocalizedDatePipe;
|
|
8538
8308
|
}());
|
|
8539
8309
|
|
|
8540
|
-
var
|
|
8541
|
-
|
|
8310
|
+
var LocalizedDateImpurePipe = /** @class */ (function (_super) {
|
|
8311
|
+
__extends(LocalizedDateImpurePipe, _super);
|
|
8312
|
+
function LocalizedDateImpurePipe() {
|
|
8313
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
8542
8314
|
}
|
|
8543
|
-
|
|
8544
|
-
core.
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
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)}}"]
|
|
8315
|
+
LocalizedDateImpurePipe = __decorate([
|
|
8316
|
+
core.Pipe({
|
|
8317
|
+
name: "localizedDateImpure",
|
|
8318
|
+
pure: false,
|
|
8548
8319
|
})
|
|
8549
|
-
],
|
|
8550
|
-
return
|
|
8320
|
+
], LocalizedDateImpurePipe);
|
|
8321
|
+
return LocalizedDateImpurePipe;
|
|
8322
|
+
}(LocalizedDatePipe));
|
|
8323
|
+
|
|
8324
|
+
/**
|
|
8325
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
8326
|
+
*/
|
|
8327
|
+
var LocalizedNumberPipe = /** @class */ (function () {
|
|
8328
|
+
function LocalizedNumberPipe(localeService) {
|
|
8329
|
+
this.localeService = localeService;
|
|
8330
|
+
}
|
|
8331
|
+
LocalizedNumberPipe.prototype.transform = function (value, minimumFractionDigits) {
|
|
8332
|
+
return rxjs.from(this.localeService.getLocale()).pipe(operators.map(function (locale) {
|
|
8333
|
+
var numericValue = Number(value);
|
|
8334
|
+
if (!value && isNaN(numericValue))
|
|
8335
|
+
return;
|
|
8336
|
+
return new Intl.NumberFormat(locale, {
|
|
8337
|
+
minimumFractionDigits: minimumFractionDigits || 0,
|
|
8338
|
+
}).format(Number(value));
|
|
8339
|
+
}));
|
|
8340
|
+
};
|
|
8341
|
+
LocalizedNumberPipe.ctorParameters = function () { return [
|
|
8342
|
+
{ type: LocaleService }
|
|
8343
|
+
]; };
|
|
8344
|
+
LocalizedNumberPipe = __decorate([
|
|
8345
|
+
core.Pipe({ name: "localizedNumber" })
|
|
8346
|
+
], LocalizedNumberPipe);
|
|
8347
|
+
return LocalizedNumberPipe;
|
|
8551
8348
|
}());
|
|
8552
8349
|
|
|
8553
|
-
var
|
|
8554
|
-
|
|
8350
|
+
var moment$3 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
8351
|
+
var LocalizedTimePipe = /** @class */ (function () {
|
|
8352
|
+
function LocalizedTimePipe(localeService) {
|
|
8353
|
+
this.localeService = localeService;
|
|
8555
8354
|
}
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8355
|
+
LocalizedTimePipe.prototype.transform = function (value, format) {
|
|
8356
|
+
if (format === void 0) { format = "LTS"; }
|
|
8357
|
+
return this.localeService.get().pipe(operators.map(function () { return (value ? moment$3(value, "HH:mm:ss").format(format) : value); }));
|
|
8358
|
+
};
|
|
8359
|
+
LocalizedTimePipe.ctorParameters = function () { return [
|
|
8360
|
+
{ type: LocaleService }
|
|
8361
|
+
]; };
|
|
8362
|
+
LocalizedTimePipe = __decorate([
|
|
8363
|
+
core.Pipe({
|
|
8364
|
+
name: "localizedTime",
|
|
8561
8365
|
})
|
|
8562
|
-
],
|
|
8563
|
-
return
|
|
8366
|
+
], LocalizedTimePipe);
|
|
8367
|
+
return LocalizedTimePipe;
|
|
8564
8368
|
}());
|
|
8565
8369
|
|
|
8566
|
-
var
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8370
|
+
var LocalizedTimeImpurePipe = /** @class */ (function (_super) {
|
|
8371
|
+
__extends(LocalizedTimeImpurePipe, _super);
|
|
8372
|
+
function LocalizedTimeImpurePipe() {
|
|
8373
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
8374
|
+
}
|
|
8375
|
+
LocalizedTimeImpurePipe = __decorate([
|
|
8376
|
+
core.Pipe({
|
|
8377
|
+
name: "localizedTimeImpure",
|
|
8378
|
+
pure: false,
|
|
8379
|
+
})
|
|
8380
|
+
], LocalizedTimeImpurePipe);
|
|
8381
|
+
return LocalizedTimeImpurePipe;
|
|
8382
|
+
}(LocalizedTimePipe));
|
|
8571
8383
|
|
|
8572
|
-
var
|
|
8573
|
-
function
|
|
8574
|
-
this.
|
|
8575
|
-
this.
|
|
8576
|
-
|
|
8577
|
-
|
|
8384
|
+
var CurrencyService = /** @class */ (function () {
|
|
8385
|
+
function CurrencyService(localeService) {
|
|
8386
|
+
this.localeService = localeService;
|
|
8387
|
+
this.currencies = {
|
|
8388
|
+
KHR: { precision: 12, scale: 2 },
|
|
8389
|
+
SSP: { precision: 12, scale: 2 },
|
|
8390
|
+
XCD: { precision: 12, scale: 2 },
|
|
8391
|
+
EGP: { precision: 12, scale: 2 },
|
|
8392
|
+
KWD: { precision: 12, scale: 3 },
|
|
8393
|
+
YER: { precision: 12, scale: 2 },
|
|
8394
|
+
HUF: { precision: 12, scale: 2 },
|
|
8395
|
+
MXN: { precision: 12, scale: 2 },
|
|
8396
|
+
MYR: { precision: 12, scale: 2 },
|
|
8397
|
+
ZWL: { precision: 12, scale: 2 },
|
|
8398
|
+
MUR: { precision: 12, scale: 2 },
|
|
8399
|
+
DKK: { precision: 12, scale: 2 },
|
|
8400
|
+
NOK: { precision: 12, scale: 2 },
|
|
8401
|
+
DJF: { precision: 12, scale: 0 },
|
|
8402
|
+
CRC: { precision: 12, scale: 2 },
|
|
8403
|
+
BND: { precision: 12, scale: 2 },
|
|
8404
|
+
NAD: { precision: 12, scale: 2 },
|
|
8405
|
+
MKD: { precision: 12, scale: 2 },
|
|
8406
|
+
CDF: { precision: 12, scale: 2 },
|
|
8407
|
+
GNF: { precision: 12, scale: 0 },
|
|
8408
|
+
EUR: { precision: 12, scale: 2 },
|
|
8409
|
+
OMR: { precision: 12, scale: 3 },
|
|
8410
|
+
CLP: { precision: 12, scale: 0 },
|
|
8411
|
+
BSD: { precision: 12, scale: 2 },
|
|
8412
|
+
TOP: { precision: 12, scale: 2 },
|
|
8413
|
+
IRR: { precision: 12, scale: 2 },
|
|
8414
|
+
BGN: { precision: 12, scale: 2 },
|
|
8415
|
+
BZD: { precision: 12, scale: 2 },
|
|
8416
|
+
CNY: { precision: 12, scale: 2 },
|
|
8417
|
+
FJD: { precision: 12, scale: 2 },
|
|
8418
|
+
SRD: { precision: 12, scale: 2 },
|
|
8419
|
+
SOS: { precision: 12, scale: 2 },
|
|
8420
|
+
GYD: { precision: 12, scale: 2 },
|
|
8421
|
+
VUV: { precision: 12, scale: 0 },
|
|
8422
|
+
MWK: { precision: 12, scale: 2 },
|
|
8423
|
+
MRU: { precision: 12, scale: 2 },
|
|
8424
|
+
LSL: { precision: 12, scale: 2 },
|
|
8425
|
+
ERN: { precision: 12, scale: 2 },
|
|
8426
|
+
BMD: { precision: 12, scale: 2 },
|
|
8427
|
+
WST: { precision: 12, scale: 2 },
|
|
8428
|
+
LRD: { precision: 12, scale: 2 },
|
|
8429
|
+
GMD: { precision: 12, scale: 2 },
|
|
8430
|
+
ARS: { precision: 12, scale: 2 },
|
|
8431
|
+
ZAR: { precision: 12, scale: 2 },
|
|
8432
|
+
RSD: { precision: 12, scale: 2 },
|
|
8433
|
+
MDL: { precision: 12, scale: 2 },
|
|
8434
|
+
USD: { precision: 12, scale: 2 },
|
|
8435
|
+
QAR: { precision: 12, scale: 2 },
|
|
8436
|
+
HRK: { precision: 12, scale: 2 },
|
|
8437
|
+
GIP: { precision: 12, scale: 2 },
|
|
8438
|
+
NPR: { precision: 12, scale: 2 },
|
|
8439
|
+
"002": { precision: 9, scale: 4 },
|
|
8440
|
+
PLN: { precision: 12, scale: 2 },
|
|
8441
|
+
MAD: { precision: 12, scale: 2 },
|
|
8442
|
+
BAM: { precision: 12, scale: 2 },
|
|
8443
|
+
BTN: { precision: 12, scale: 2 },
|
|
8444
|
+
BBD: { precision: 12, scale: 2 },
|
|
8445
|
+
SHP: { precision: 12, scale: 2 },
|
|
8446
|
+
LKR: { precision: 12, scale: 2 },
|
|
8447
|
+
KPW: { precision: 12, scale: 2 },
|
|
8448
|
+
LAK: { precision: 12, scale: 2 },
|
|
8449
|
+
SZL: { precision: 12, scale: 2 },
|
|
8450
|
+
PHP: { precision: 12, scale: 2 },
|
|
8451
|
+
RWF: { precision: 12, scale: 0 },
|
|
8452
|
+
ISK: { precision: 12, scale: 0 },
|
|
8453
|
+
XOF: { precision: 12, scale: 0 },
|
|
8454
|
+
AUD: { precision: 12, scale: 2 },
|
|
8455
|
+
NGN: { precision: 12, scale: 2 },
|
|
8456
|
+
KGS: { precision: 12, scale: 2 },
|
|
8457
|
+
KYD: { precision: 12, scale: 2 },
|
|
8458
|
+
PGK: { precision: 12, scale: 2 },
|
|
8459
|
+
DZD: { precision: 12, scale: 2 },
|
|
8460
|
+
XAF: { precision: 12, scale: 0 },
|
|
8461
|
+
PEN: { precision: 12, scale: 2 },
|
|
8462
|
+
JPY: { precision: 12, scale: 0 },
|
|
8463
|
+
SBD: { precision: 12, scale: 2 },
|
|
8464
|
+
UGX: { precision: 12, scale: 0 },
|
|
8465
|
+
AMD: { precision: 12, scale: 2 },
|
|
8466
|
+
AED: { precision: 12, scale: 2 },
|
|
8467
|
+
ALL: { precision: 12, scale: 2 },
|
|
8468
|
+
XPF: { precision: 12, scale: 0 },
|
|
8469
|
+
AFN: { precision: 12, scale: 2 },
|
|
8470
|
+
RON: { precision: 12, scale: 2 },
|
|
8471
|
+
TND: { precision: 12, scale: 3 },
|
|
8472
|
+
NZD: { precision: 12, scale: 2 },
|
|
8473
|
+
JOD: { precision: 12, scale: 3 },
|
|
8474
|
+
VND: { precision: 12, scale: 0 },
|
|
8475
|
+
ETB: { precision: 12, scale: 2 },
|
|
8476
|
+
PYG: { precision: 12, scale: 0 },
|
|
8477
|
+
JMD: { precision: 12, scale: 2 },
|
|
8478
|
+
KES: { precision: 12, scale: 2 },
|
|
8479
|
+
IDR: { precision: 12, scale: 2 },
|
|
8480
|
+
HKD: { precision: 12, scale: 2 },
|
|
8481
|
+
BDT: { precision: 12, scale: 2 },
|
|
8482
|
+
GBP: { precision: 12, scale: 2 },
|
|
8483
|
+
AOA: { precision: 12, scale: 2 },
|
|
8484
|
+
PKR: { precision: 12, scale: 2 },
|
|
8485
|
+
TRY: { precision: 12, scale: 2 },
|
|
8486
|
+
SLL: { precision: 12, scale: 2 },
|
|
8487
|
+
CVE: { precision: 12, scale: 2 },
|
|
8488
|
+
LYD: { precision: 12, scale: 3 },
|
|
8489
|
+
ILS: { precision: 12, scale: 2 },
|
|
8490
|
+
UZS: { precision: 12, scale: 2 },
|
|
8491
|
+
CHF: { precision: 12, scale: 2 },
|
|
8492
|
+
SVC: { precision: 12, scale: 2 },
|
|
8493
|
+
BRL: { precision: 12, scale: 2 },
|
|
8494
|
+
GHS: { precision: 12, scale: 2 },
|
|
8495
|
+
CUP: { precision: 12, scale: 2 },
|
|
8496
|
+
FKP: { precision: 12, scale: 2 },
|
|
8497
|
+
NIO: { precision: 12, scale: 2 },
|
|
8498
|
+
GEL: { precision: 12, scale: 2 },
|
|
8499
|
+
TTD: { precision: 12, scale: 2 },
|
|
8500
|
+
AAA: { precision: 1, scale: 1 },
|
|
8501
|
+
COP: { precision: 12, scale: 2 },
|
|
8502
|
+
MGA: { precision: 12, scale: 2 },
|
|
8503
|
+
INR: { precision: 12, scale: 2 },
|
|
8504
|
+
KRW: { precision: 12, scale: 0 },
|
|
8505
|
+
HNL: { precision: 12, scale: 2 },
|
|
8506
|
+
MMK: { precision: 12, scale: 2 },
|
|
8507
|
+
TZS: { precision: 12, scale: 2 },
|
|
8508
|
+
THB: { precision: 12, scale: 2 },
|
|
8509
|
+
TMT: { precision: 12, scale: 2 },
|
|
8510
|
+
SAR: { precision: 12, scale: 2 },
|
|
8511
|
+
UYU: { precision: 12, scale: 2 },
|
|
8512
|
+
BIF: { precision: 12, scale: 0 },
|
|
8513
|
+
MVR: { precision: 12, scale: 2 },
|
|
8514
|
+
RUB: { precision: 12, scale: 2 },
|
|
8515
|
+
GTQ: { precision: 12, scale: 2 },
|
|
8516
|
+
SCR: { precision: 12, scale: 2 },
|
|
8517
|
+
IQD: { precision: 12, scale: 3 },
|
|
8518
|
+
UAH: { precision: 12, scale: 2 },
|
|
8519
|
+
BYN: { precision: 12, scale: 2 },
|
|
8520
|
+
VES: { precision: 12, scale: 2 },
|
|
8521
|
+
BOB: { precision: 12, scale: 2 },
|
|
8522
|
+
SGD: { precision: 12, scale: 2 },
|
|
8523
|
+
ZMW: { precision: 12, scale: 2 },
|
|
8524
|
+
CZK: { precision: 12, scale: 2 },
|
|
8525
|
+
TJS: { precision: 12, scale: 2 },
|
|
8526
|
+
DOP: { precision: 12, scale: 2 },
|
|
8527
|
+
AZN: { precision: 12, scale: 2 },
|
|
8528
|
+
PAB: { precision: 12, scale: 2 },
|
|
8529
|
+
STN: { precision: 12, scale: 2 },
|
|
8530
|
+
SDG: { precision: 12, scale: 2 },
|
|
8531
|
+
BWP: { precision: 12, scale: 2 },
|
|
8532
|
+
BHD: { precision: 12, scale: 3 },
|
|
8533
|
+
CAD: { precision: 12, scale: 2 },
|
|
8534
|
+
MNT: { precision: 12, scale: 2 },
|
|
8535
|
+
MOP: { precision: 12, scale: 2 },
|
|
8536
|
+
HTG: { precision: 12, scale: 2 },
|
|
8537
|
+
KZT: { precision: 12, scale: 2 },
|
|
8538
|
+
LBP: { precision: 12, scale: 2 },
|
|
8539
|
+
SYP: { precision: 12, scale: 2 },
|
|
8540
|
+
TWD: { precision: 12, scale: 2 },
|
|
8541
|
+
MZN: { precision: 12, scale: 2 },
|
|
8542
|
+
ANG: { precision: 12, scale: 2 },
|
|
8543
|
+
SEK: { precision: 12, scale: 2 },
|
|
8544
|
+
KMF: { precision: 12, scale: 0 },
|
|
8545
|
+
AWG: { precision: 12, scale: 2 },
|
|
8546
|
+
};
|
|
8578
8547
|
}
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
}
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
|
|
8601
|
-
|
|
8602
|
-
|
|
8548
|
+
CurrencyService.prototype.getCurrencySymbol = function (_a) {
|
|
8549
|
+
var currency = _a.currency;
|
|
8550
|
+
var _b, _c;
|
|
8551
|
+
var numberFormat = new Intl.NumberFormat(this.localeService.getLocaleOptions().locale, {
|
|
8552
|
+
style: "currency",
|
|
8553
|
+
currency: currency !== null && currency !== void 0 ? currency : "BRL",
|
|
8554
|
+
currencyDisplay: "narrowSymbol",
|
|
8555
|
+
maximumFractionDigits: 5,
|
|
8556
|
+
});
|
|
8557
|
+
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 : "";
|
|
8558
|
+
};
|
|
8559
|
+
CurrencyService.ctorParameters = function () { return [
|
|
8560
|
+
{ type: LocaleService }
|
|
8561
|
+
]; };
|
|
8562
|
+
CurrencyService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function CurrencyService_Factory() { return new CurrencyService(core["ɵɵinject"](LocaleService)); }, token: CurrencyService, providedIn: "root" });
|
|
8563
|
+
CurrencyService = __decorate([
|
|
8564
|
+
core.Injectable({ providedIn: "root" })
|
|
8565
|
+
], CurrencyService);
|
|
8566
|
+
return CurrencyService;
|
|
8567
|
+
}());
|
|
8568
|
+
|
|
8569
|
+
var NumericService = /** @class */ (function () {
|
|
8570
|
+
function NumericService(localeService, currencyService) {
|
|
8571
|
+
this.localeService = localeService;
|
|
8572
|
+
this.currencyService = currencyService;
|
|
8573
|
+
}
|
|
8574
|
+
/**
|
|
8575
|
+
* Wrapper around Intl.NumberFormat that returns the localized value using the user's locale by default(platform's preferential language).
|
|
8576
|
+
*
|
|
8577
|
+
* This method should only be used after the localeService has been initialized by the host application, either by a resolver or a manual call.
|
|
8578
|
+
*
|
|
8579
|
+
* Can be overwritten by the provided Intl.NumberFormatOptions.
|
|
8580
|
+
*
|
|
8581
|
+
* Documentation is available at {@link https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat Intl.NumberFormatOptions}.
|
|
8582
|
+
*
|
|
8583
|
+
* @param {number | string | BigNumber} value The value to be formatted.
|
|
8584
|
+
* @param options Locale and numberFormatOptions that overwrites the default Intl.NumberFormatOptions.
|
|
8585
|
+
* @return `string` The formatted value.
|
|
8586
|
+
*/
|
|
8587
|
+
NumericService.prototype.instant = function (value, options) {
|
|
8588
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
8589
|
+
if (isNullOrUndefined(value))
|
|
8590
|
+
return null;
|
|
8591
|
+
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"
|
|
8592
|
+
? ((_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")
|
|
8593
|
+
: 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) }) });
|
|
8594
|
+
options.numberFormatOptions["roundingMode"] = "trunc";
|
|
8595
|
+
// From https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
|
|
8596
|
+
return new Intl.NumberFormat(options.locale, options.numberFormatOptions).format(this.getType(value) === "number" || this.getType(value) === "string" ? value : value.toString());
|
|
8603
8597
|
};
|
|
8604
|
-
|
|
8605
|
-
var
|
|
8606
|
-
if (
|
|
8607
|
-
|
|
8608
|
-
|
|
8598
|
+
NumericService.prototype.getCurrencyMinimumFractionDigits = function (currency) {
|
|
8599
|
+
var _a;
|
|
8600
|
+
if (!currency)
|
|
8601
|
+
return null;
|
|
8602
|
+
return (_a = this.currencyService.currencies[currency.toUpperCase()]) === null || _a === void 0 ? void 0 : _a.scale;
|
|
8603
|
+
};
|
|
8604
|
+
NumericService.prototype.getType = function (value) {
|
|
8605
|
+
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
|
|
8606
|
+
if (value === null) {
|
|
8607
|
+
return "null";
|
|
8609
8608
|
}
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
}, this.UNBLOCK_TIMEOUT_VALUE);
|
|
8609
|
+
var baseType = typeof value;
|
|
8610
|
+
// Primitive types
|
|
8611
|
+
if (baseType !== "object" && baseType !== "function") {
|
|
8612
|
+
return baseType;
|
|
8615
8613
|
}
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8614
|
+
// Symbol.toStringTag often specifies the "display name" of the
|
|
8615
|
+
// object's class. It's used in Object.prototype.toString().
|
|
8616
|
+
var tag = value[Symbol.toStringTag];
|
|
8617
|
+
if (typeof tag === "string") {
|
|
8618
|
+
return tag;
|
|
8620
8619
|
}
|
|
8621
|
-
|
|
8622
|
-
|
|
8620
|
+
// If it's a function whose source code starts with the "class" keyword
|
|
8621
|
+
if (baseType === "function" && Function.prototype.toString.call(value).startsWith("class")) {
|
|
8622
|
+
return "class";
|
|
8623
8623
|
}
|
|
8624
|
+
// The name of the constructor; for example `Array`, `GeneratorFunction`,
|
|
8625
|
+
// `Number`, `String`, `Boolean` or `MyCustomClass`
|
|
8626
|
+
var className = value.constructor.name;
|
|
8627
|
+
if (typeof className === "string" && className !== "") {
|
|
8628
|
+
return className;
|
|
8629
|
+
}
|
|
8630
|
+
// At this point there's no robust way to get the type of value,
|
|
8631
|
+
// so we use the base implementation.
|
|
8632
|
+
return baseType;
|
|
8624
8633
|
};
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
]
|
|
8630
|
-
__decorate([
|
|
8631
|
-
core.
|
|
8632
|
-
|
|
8633
|
-
__decorate([
|
|
8634
|
-
core.Input()
|
|
8635
|
-
], LoadingStateComponent.prototype, "blockWindow", void 0);
|
|
8636
|
-
__decorate([
|
|
8637
|
-
core.Input()
|
|
8638
|
-
], LoadingStateComponent.prototype, "loading", null);
|
|
8639
|
-
LoadingStateComponent = LoadingStateComponent_1 = __decorate([
|
|
8640
|
-
core.Component({
|
|
8641
|
-
selector: "s-loading-state",
|
|
8642
|
-
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>",
|
|
8643
|
-
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}"]
|
|
8634
|
+
NumericService.ctorParameters = function () { return [
|
|
8635
|
+
{ type: LocaleService },
|
|
8636
|
+
{ type: CurrencyService }
|
|
8637
|
+
]; };
|
|
8638
|
+
NumericService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function NumericService_Factory() { return new NumericService(core["ɵɵinject"](LocaleService), core["ɵɵinject"](CurrencyService)); }, token: NumericService, providedIn: "root" });
|
|
8639
|
+
NumericService = __decorate([
|
|
8640
|
+
core.Injectable({
|
|
8641
|
+
providedIn: "root",
|
|
8644
8642
|
})
|
|
8645
|
-
],
|
|
8646
|
-
return
|
|
8643
|
+
], NumericService);
|
|
8644
|
+
return NumericService;
|
|
8647
8645
|
}());
|
|
8648
8646
|
|
|
8649
|
-
var
|
|
8650
|
-
function
|
|
8651
|
-
this.
|
|
8652
|
-
this.
|
|
8653
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
8654
|
-
this.cdr = cdr;
|
|
8655
|
-
this._loading = false;
|
|
8656
|
-
this.indicator = LoadingStateIndicators.Dots;
|
|
8647
|
+
var NumericPipe = /** @class */ (function () {
|
|
8648
|
+
function NumericPipe(numericService, localeService) {
|
|
8649
|
+
this.numericService = numericService;
|
|
8650
|
+
this.localeService = localeService;
|
|
8657
8651
|
}
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
}
|
|
8668
|
-
if (this.loaderComponent) {
|
|
8669
|
-
this.loaderComponent.instance.loading = this._loading;
|
|
8670
|
-
this.loaderComponent.instance.indicator = this.indicator;
|
|
8671
|
-
}
|
|
8672
|
-
},
|
|
8673
|
-
enumerable: true,
|
|
8674
|
-
configurable: true
|
|
8675
|
-
});
|
|
8676
|
-
LoadingStateDirective.prototype.ngAfterViewInit = function () {
|
|
8677
|
-
this.createComponent();
|
|
8678
|
-
};
|
|
8679
|
-
LoadingStateDirective.prototype.createComponent = function () {
|
|
8680
|
-
var factory = this.componentFactoryResolver.resolveComponentFactory(LoadingStateComponent);
|
|
8681
|
-
this.loaderComponent = this.target.createComponent(factory);
|
|
8682
|
-
this.loaderComponent.instance.contents = this.template;
|
|
8683
|
-
this.loaderComponent.instance.loading = this._loading;
|
|
8684
|
-
this.loaderComponent.instance.indicator = this.indicator;
|
|
8685
|
-
this.cdr.detectChanges();
|
|
8686
|
-
};
|
|
8687
|
-
LoadingStateDirective.prototype.ngOnDestroy = function () {
|
|
8688
|
-
if (this.loaderComponent) {
|
|
8689
|
-
this.loaderComponent.destroy();
|
|
8690
|
-
}
|
|
8652
|
+
NumericPipe.prototype.transform = function (value, options) {
|
|
8653
|
+
var _this = this;
|
|
8654
|
+
return (options === null || options === void 0 ? void 0 : options.locale) ? rxjs.of(this.numericService.instant(value, options))
|
|
8655
|
+
: this.localeService.getLocale().pipe(operators.map(function (locale) {
|
|
8656
|
+
return _this.numericService.instant(value, {
|
|
8657
|
+
locale: locale,
|
|
8658
|
+
numberFormatOptions: options === null || options === void 0 ? void 0 : options.numberFormatOptions,
|
|
8659
|
+
});
|
|
8660
|
+
}));
|
|
8691
8661
|
};
|
|
8692
|
-
|
|
8693
|
-
{ type:
|
|
8694
|
-
{ type:
|
|
8695
|
-
{ type: core.ComponentFactoryResolver },
|
|
8696
|
-
{ type: core.ChangeDetectorRef }
|
|
8662
|
+
NumericPipe.ctorParameters = function () { return [
|
|
8663
|
+
{ type: NumericService },
|
|
8664
|
+
{ type: LocaleService }
|
|
8697
8665
|
]; };
|
|
8698
|
-
__decorate([
|
|
8699
|
-
core.
|
|
8700
|
-
],
|
|
8701
|
-
|
|
8702
|
-
core.Directive({
|
|
8703
|
-
selector: "[sLoadingState]",
|
|
8704
|
-
})
|
|
8705
|
-
], LoadingStateDirective);
|
|
8706
|
-
return LoadingStateDirective;
|
|
8666
|
+
NumericPipe = __decorate([
|
|
8667
|
+
core.Pipe({ name: "numeric" })
|
|
8668
|
+
], NumericPipe);
|
|
8669
|
+
return NumericPipe;
|
|
8707
8670
|
}());
|
|
8708
8671
|
|
|
8709
|
-
var
|
|
8710
|
-
function
|
|
8672
|
+
var LocaleModule = /** @class */ (function () {
|
|
8673
|
+
function LocaleModule() {
|
|
8711
8674
|
}
|
|
8712
|
-
|
|
8675
|
+
LocaleModule_1 = LocaleModule;
|
|
8676
|
+
LocaleModule.forRoot = function () {
|
|
8677
|
+
return {
|
|
8678
|
+
ngModule: LocaleModule_1,
|
|
8679
|
+
providers: [
|
|
8680
|
+
LocaleService,
|
|
8681
|
+
LocalizedCurrencyPipe,
|
|
8682
|
+
LocalizedDatePipe,
|
|
8683
|
+
LocalizedTimePipe,
|
|
8684
|
+
LocalizedNumberPipe,
|
|
8685
|
+
LocalizedCurrencyImpurePipe,
|
|
8686
|
+
LocalizedDateImpurePipe,
|
|
8687
|
+
LocalizedTimeImpurePipe,
|
|
8688
|
+
LocalizedBignumberPipe,
|
|
8689
|
+
LocalizedBignumberImpurePipe,
|
|
8690
|
+
NumericPipe
|
|
8691
|
+
],
|
|
8692
|
+
};
|
|
8693
|
+
};
|
|
8694
|
+
LocaleModule.forChild = function () {
|
|
8695
|
+
return {
|
|
8696
|
+
ngModule: LocaleModule_1,
|
|
8697
|
+
};
|
|
8698
|
+
};
|
|
8699
|
+
var LocaleModule_1;
|
|
8700
|
+
LocaleModule = LocaleModule_1 = __decorate([
|
|
8713
8701
|
core.NgModule({
|
|
8714
|
-
imports: [
|
|
8715
|
-
|
|
8716
|
-
|
|
8702
|
+
imports: [common.CommonModule],
|
|
8703
|
+
exports: [
|
|
8704
|
+
LocalizedCurrencyPipe,
|
|
8705
|
+
LocalizedDatePipe,
|
|
8706
|
+
LocalizedTimePipe,
|
|
8707
|
+
LocalizedNumberPipe,
|
|
8708
|
+
LocalizedCurrencyImpurePipe,
|
|
8709
|
+
LocalizedDateImpurePipe,
|
|
8710
|
+
LocalizedTimeImpurePipe,
|
|
8711
|
+
LocalizedBignumberPipe,
|
|
8712
|
+
LocalizedBignumberImpurePipe,
|
|
8713
|
+
NumericPipe
|
|
8717
8714
|
],
|
|
8718
8715
|
declarations: [
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8716
|
+
LocalizedCurrencyPipe,
|
|
8717
|
+
LocalizedDatePipe,
|
|
8718
|
+
LocalizedTimePipe,
|
|
8719
|
+
LocalizedNumberPipe,
|
|
8720
|
+
LocalizedCurrencyImpurePipe,
|
|
8721
|
+
LocalizedDateImpurePipe,
|
|
8722
|
+
LocalizedTimeImpurePipe,
|
|
8723
|
+
LocalizedBignumberPipe,
|
|
8724
|
+
LocalizedBignumberImpurePipe,
|
|
8725
|
+
NumericPipe
|
|
8727
8726
|
],
|
|
8728
|
-
entryComponents: [LoadingStateComponent],
|
|
8729
8727
|
})
|
|
8730
|
-
],
|
|
8731
|
-
return
|
|
8728
|
+
], LocaleModule);
|
|
8729
|
+
return LocaleModule;
|
|
8732
8730
|
}());
|
|
8733
8731
|
|
|
8734
8732
|
var LocalizedNumberInputDirective = /** @class */ (function () {
|