@seniorsistemas/angular-components 17.6.3 → 17.7.0
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 +186 -84
- 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/locale/locale.service.d.ts +5 -0
- package/components/locale/options/index.d.ts +1 -0
- package/components/locale/pipes/numeric.pipe.d.ts +13 -0
- package/components/locale/services/numeric.service.d.ts +24 -0
- package/esm2015/components/locale/locale.module.js +8 -4
- package/esm2015/components/locale/locale.service.js +9 -2
- package/esm2015/components/locale/options/index.js +1 -1
- package/esm2015/components/locale/pipes/numeric.pipe.js +28 -0
- package/esm2015/components/locale/services/numeric.service.js +70 -0
- package/esm2015/seniorsistemas-angular-components.js +83 -81
- package/esm5/components/locale/locale.module.js +8 -4
- package/esm5/components/locale/locale.service.js +10 -3
- package/esm5/components/locale/options/index.js +1 -1
- package/esm5/components/locale/pipes/numeric.pipe.js +32 -0
- package/esm5/components/locale/services/numeric.service.js +71 -0
- package/esm5/seniorsistemas-angular-components.js +83 -81
- package/fesm2015/seniorsistemas-angular-components.js +101 -6
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +107 -7
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +2 -2
- package/seniorsistemas-angular-components.d.ts +82 -80
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -1090,7 +1090,7 @@
|
|
|
1090
1090
|
var _this = this;
|
|
1091
1091
|
return this.localeOptions
|
|
1092
1092
|
? rxjs.of(this.localeOptions)
|
|
1093
|
-
: this.getLocaleConfig().pipe(operators.tap(function (localeOptions) { return (_this.localeOptions = localeOptions); }));
|
|
1093
|
+
: this.getLocaleConfig().pipe(operators.tap(function (localeOptions) { return (_this.localeOptions = __assign(__assign({}, localeOptions), { locale: _this.locale })); }));
|
|
1094
1094
|
};
|
|
1095
1095
|
LocaleService.prototype.getLocale = function () {
|
|
1096
1096
|
var _this = this;
|
|
@@ -1101,6 +1101,13 @@
|
|
|
1101
1101
|
return _this.locale;
|
|
1102
1102
|
}));
|
|
1103
1103
|
};
|
|
1104
|
+
/**
|
|
1105
|
+
* Returns an object with the locale options based on the user's locale(platform locale).
|
|
1106
|
+
* @return The locale options object.
|
|
1107
|
+
*/
|
|
1108
|
+
LocaleService.prototype.getLocaleOptions = function () {
|
|
1109
|
+
return this.localeOptions;
|
|
1110
|
+
};
|
|
1104
1111
|
LocaleService.prototype.getUserData = function () {
|
|
1105
1112
|
try {
|
|
1106
1113
|
return rxjs.of(JSON.parse(this.cookieService.get("com.senior.token")));
|
|
@@ -6511,6 +6518,96 @@
|
|
|
6511
6518
|
return LocalizedTimeImpurePipe;
|
|
6512
6519
|
}(LocalizedTimePipe));
|
|
6513
6520
|
|
|
6521
|
+
var NumericService = /** @class */ (function () {
|
|
6522
|
+
function NumericService(localeService) {
|
|
6523
|
+
this.localeService = localeService;
|
|
6524
|
+
}
|
|
6525
|
+
/**
|
|
6526
|
+
* Wrapper around Intl.NumberFormat that returns the localized value using the user's locale by default(platform's preferential language).
|
|
6527
|
+
*
|
|
6528
|
+
* This method should only be used after the localeService has been initialized by the host application, either by a resolver or a manual call.
|
|
6529
|
+
*
|
|
6530
|
+
* Can be overwritten by the provided Intl.NumberFormatOptions.
|
|
6531
|
+
*
|
|
6532
|
+
* Documentation is available at {@link https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat Intl.NumberFormatOptions}.
|
|
6533
|
+
*
|
|
6534
|
+
* @param {number | string | BigNumber} value The value to be formatted.
|
|
6535
|
+
* @param {Intl.NumberFormatOptions} options Options that overwrites the default Intl.NumberFormatOptions.
|
|
6536
|
+
* @return `string` The formatted value.
|
|
6537
|
+
*/
|
|
6538
|
+
NumericService.prototype.instant = function (value, options) {
|
|
6539
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
6540
|
+
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", options: __assign(__assign({}, options === null || options === void 0 ? void 0 : options.options), { currency: ((_d = options === null || options === void 0 ? void 0 : options.options) === null || _d === void 0 ? void 0 : _d.style) === "currency" ? (_f = (_e = options === null || options === void 0 ? void 0 : options.options) === 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.options) === null || _g === void 0 ? void 0 : _g.style) === "currency" ? (_j = (_h = options === null || options === void 0 ? void 0 : options.options) === null || _h === void 0 ? void 0 : _h.currencyDisplay) !== null && _j !== void 0 ? _j : "narrowSymbol" : undefined, minimumFractionDigits: (_l = (_k = options === null || options === void 0 ? void 0 : options.options) === null || _k === void 0 ? void 0 : _k.minimumFractionDigits) !== null && _l !== void 0 ? _l : 0 }) });
|
|
6541
|
+
// From https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
|
|
6542
|
+
return new Intl.NumberFormat(options.locale, options.options).format(this.getType(value) === "number" || this.getType(value) === "string" ? value : value.toString());
|
|
6543
|
+
};
|
|
6544
|
+
NumericService.prototype.getType = function (value) {
|
|
6545
|
+
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
|
|
6546
|
+
if (value === null) {
|
|
6547
|
+
return "null";
|
|
6548
|
+
}
|
|
6549
|
+
var baseType = typeof value;
|
|
6550
|
+
// Primitive types
|
|
6551
|
+
if (baseType !== "object" && baseType !== "function") {
|
|
6552
|
+
return baseType;
|
|
6553
|
+
}
|
|
6554
|
+
// Symbol.toStringTag often specifies the "display name" of the
|
|
6555
|
+
// object's class. It's used in Object.prototype.toString().
|
|
6556
|
+
var tag = value[Symbol.toStringTag];
|
|
6557
|
+
if (typeof tag === "string") {
|
|
6558
|
+
return tag;
|
|
6559
|
+
}
|
|
6560
|
+
// If it's a function whose source code starts with the "class" keyword
|
|
6561
|
+
if (baseType === "function" && Function.prototype.toString.call(value).startsWith("class")) {
|
|
6562
|
+
return "class";
|
|
6563
|
+
}
|
|
6564
|
+
// The name of the constructor; for example `Array`, `GeneratorFunction`,
|
|
6565
|
+
// `Number`, `String`, `Boolean` or `MyCustomClass`
|
|
6566
|
+
var className = value.constructor.name;
|
|
6567
|
+
if (typeof className === "string" && className !== "") {
|
|
6568
|
+
return className;
|
|
6569
|
+
}
|
|
6570
|
+
// At this point there's no robust way to get the type of value,
|
|
6571
|
+
// so we use the base implementation.
|
|
6572
|
+
return baseType;
|
|
6573
|
+
};
|
|
6574
|
+
NumericService.ctorParameters = function () { return [
|
|
6575
|
+
{ type: LocaleService }
|
|
6576
|
+
]; };
|
|
6577
|
+
NumericService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function NumericService_Factory() { return new NumericService(core["ɵɵinject"](LocaleService)); }, token: NumericService, providedIn: "root" });
|
|
6578
|
+
NumericService = __decorate([
|
|
6579
|
+
core.Injectable({
|
|
6580
|
+
providedIn: "root",
|
|
6581
|
+
})
|
|
6582
|
+
], NumericService);
|
|
6583
|
+
return NumericService;
|
|
6584
|
+
}());
|
|
6585
|
+
|
|
6586
|
+
var NumericPipe = /** @class */ (function () {
|
|
6587
|
+
function NumericPipe(numericService, localeService) {
|
|
6588
|
+
this.numericService = numericService;
|
|
6589
|
+
this.localeService = localeService;
|
|
6590
|
+
}
|
|
6591
|
+
NumericPipe.prototype.transform = function (value, options) {
|
|
6592
|
+
var _this = this;
|
|
6593
|
+
return (options === null || options === void 0 ? void 0 : options.locale) ? rxjs.of(this.numericService.instant(value, options))
|
|
6594
|
+
: this.localeService.getLocale().pipe(operators.map(function (locale) {
|
|
6595
|
+
return _this.numericService.instant(value, {
|
|
6596
|
+
locale: locale,
|
|
6597
|
+
options: options === null || options === void 0 ? void 0 : options.options,
|
|
6598
|
+
});
|
|
6599
|
+
}));
|
|
6600
|
+
};
|
|
6601
|
+
NumericPipe.ctorParameters = function () { return [
|
|
6602
|
+
{ type: NumericService },
|
|
6603
|
+
{ type: LocaleService }
|
|
6604
|
+
]; };
|
|
6605
|
+
NumericPipe = __decorate([
|
|
6606
|
+
core.Pipe({ name: "numeric" })
|
|
6607
|
+
], NumericPipe);
|
|
6608
|
+
return NumericPipe;
|
|
6609
|
+
}());
|
|
6610
|
+
|
|
6514
6611
|
var LocaleModule = /** @class */ (function () {
|
|
6515
6612
|
function LocaleModule() {
|
|
6516
6613
|
}
|
|
@@ -6528,7 +6625,8 @@
|
|
|
6528
6625
|
LocalizedDateImpurePipe,
|
|
6529
6626
|
LocalizedTimeImpurePipe,
|
|
6530
6627
|
LocalizedBignumberPipe,
|
|
6531
|
-
LocalizedBignumberImpurePipe
|
|
6628
|
+
LocalizedBignumberImpurePipe,
|
|
6629
|
+
NumericPipe
|
|
6532
6630
|
],
|
|
6533
6631
|
};
|
|
6534
6632
|
};
|
|
@@ -6550,7 +6648,8 @@
|
|
|
6550
6648
|
LocalizedDateImpurePipe,
|
|
6551
6649
|
LocalizedTimeImpurePipe,
|
|
6552
6650
|
LocalizedBignumberPipe,
|
|
6553
|
-
LocalizedBignumberImpurePipe
|
|
6651
|
+
LocalizedBignumberImpurePipe,
|
|
6652
|
+
NumericPipe
|
|
6554
6653
|
],
|
|
6555
6654
|
declarations: [
|
|
6556
6655
|
LocalizedCurrencyPipe,
|
|
@@ -6561,7 +6660,8 @@
|
|
|
6561
6660
|
LocalizedDateImpurePipe,
|
|
6562
6661
|
LocalizedTimeImpurePipe,
|
|
6563
6662
|
LocalizedBignumberPipe,
|
|
6564
|
-
LocalizedBignumberImpurePipe
|
|
6663
|
+
LocalizedBignumberImpurePipe,
|
|
6664
|
+
NumericPipe
|
|
6565
6665
|
],
|
|
6566
6666
|
})
|
|
6567
6667
|
], LocaleModule);
|
|
@@ -17933,74 +18033,76 @@
|
|
|
17933
18033
|
exports.fallback = fallback;
|
|
17934
18034
|
exports.ɵa = TooltipComponent;
|
|
17935
18035
|
exports.ɵb = TooltipDirective;
|
|
17936
|
-
exports.ɵba =
|
|
17937
|
-
exports.ɵbb =
|
|
17938
|
-
exports.ɵbc =
|
|
17939
|
-
exports.ɵbd =
|
|
17940
|
-
exports.ɵbe =
|
|
17941
|
-
exports.ɵbf =
|
|
17942
|
-
exports.ɵbg =
|
|
17943
|
-
exports.ɵbh =
|
|
17944
|
-
exports.ɵbi =
|
|
17945
|
-
exports.ɵbj =
|
|
17946
|
-
exports.ɵbk =
|
|
17947
|
-
exports.ɵbl =
|
|
17948
|
-
exports.ɵbm =
|
|
17949
|
-
exports.ɵbn =
|
|
17950
|
-
exports.ɵbo =
|
|
17951
|
-
exports.ɵbp =
|
|
17952
|
-
exports.ɵbq =
|
|
17953
|
-
exports.ɵbr =
|
|
17954
|
-
exports.ɵbs =
|
|
17955
|
-
exports.ɵbt =
|
|
17956
|
-
exports.ɵbu =
|
|
17957
|
-
exports.ɵbv =
|
|
17958
|
-
exports.ɵbw =
|
|
17959
|
-
exports.ɵbx =
|
|
17960
|
-
exports.ɵby =
|
|
17961
|
-
exports.ɵbz =
|
|
18036
|
+
exports.ɵba = TablePagingComponent;
|
|
18037
|
+
exports.ɵbb = TextFieldModule;
|
|
18038
|
+
exports.ɵbc = TextFieldComponent;
|
|
18039
|
+
exports.ɵbd = NumberFieldModule;
|
|
18040
|
+
exports.ɵbe = LocalizedNumberInputModule;
|
|
18041
|
+
exports.ɵbf = NumberInputModule;
|
|
18042
|
+
exports.ɵbg = NumberFieldComponent;
|
|
18043
|
+
exports.ɵbh = CurrencyFieldModule;
|
|
18044
|
+
exports.ɵbi = CurrencyFieldComponent;
|
|
18045
|
+
exports.ɵbj = NumberFieldModule$1;
|
|
18046
|
+
exports.ɵbk = BignumberInputModule;
|
|
18047
|
+
exports.ɵbl = BignumberFieldComponent;
|
|
18048
|
+
exports.ɵbm = AutocompleteFieldComponent;
|
|
18049
|
+
exports.ɵbn = BooleanFieldComponent;
|
|
18050
|
+
exports.ɵbo = BooleanSwitchFieldComponent;
|
|
18051
|
+
exports.ɵbp = CalendarFieldComponent;
|
|
18052
|
+
exports.ɵbq = ChipsFieldComponent;
|
|
18053
|
+
exports.ɵbr = CountryPhonePickerFieldComponent;
|
|
18054
|
+
exports.ɵbs = DynamicFieldComponent;
|
|
18055
|
+
exports.ɵbt = DynamicFormDirective;
|
|
18056
|
+
exports.ɵbu = FieldsetComponent;
|
|
18057
|
+
exports.ɵbv = FileUploadComponent$1;
|
|
18058
|
+
exports.ɵbw = LookupFieldComponent;
|
|
18059
|
+
exports.ɵbx = PasswordFieldComponent;
|
|
18060
|
+
exports.ɵby = RadioButtonComponent;
|
|
18061
|
+
exports.ɵbz = RowComponent;
|
|
17962
18062
|
exports.ɵc = TemplateDirective;
|
|
17963
|
-
exports.ɵca =
|
|
17964
|
-
exports.ɵcb =
|
|
17965
|
-
exports.ɵcc =
|
|
17966
|
-
exports.ɵcd =
|
|
17967
|
-
exports.ɵ
|
|
17968
|
-
exports.ɵ
|
|
17969
|
-
exports.ɵch =
|
|
17970
|
-
exports.ɵci =
|
|
17971
|
-
exports.ɵcj =
|
|
17972
|
-
exports.ɵck =
|
|
17973
|
-
exports.ɵcl =
|
|
17974
|
-
exports.ɵcm =
|
|
17975
|
-
exports.ɵcn =
|
|
17976
|
-
exports.ɵco =
|
|
17977
|
-
exports.ɵcp =
|
|
17978
|
-
exports.ɵcq =
|
|
17979
|
-
exports.ɵcr =
|
|
17980
|
-
exports.ɵcs =
|
|
17981
|
-
exports.ɵct =
|
|
17982
|
-
exports.ɵcu =
|
|
17983
|
-
exports.ɵcv =
|
|
17984
|
-
exports.ɵcw =
|
|
17985
|
-
exports.ɵcx =
|
|
17986
|
-
exports.ɵcy =
|
|
17987
|
-
exports.ɵcz =
|
|
18063
|
+
exports.ɵca = SectionComponent;
|
|
18064
|
+
exports.ɵcb = SelectFieldComponent;
|
|
18065
|
+
exports.ɵcc = SliderFieldComponent;
|
|
18066
|
+
exports.ɵcd = TextAreaFieldComponent;
|
|
18067
|
+
exports.ɵce = TextAreaIAFieldComponent;
|
|
18068
|
+
exports.ɵcf = IAssistService;
|
|
18069
|
+
exports.ɵch = DecimalField;
|
|
18070
|
+
exports.ɵci = SideTableComponent;
|
|
18071
|
+
exports.ɵcj = ThumbnailService;
|
|
18072
|
+
exports.ɵck = InfiniteScrollModule;
|
|
18073
|
+
exports.ɵcl = InfiniteScrollDirective;
|
|
18074
|
+
exports.ɵcm = IAInsightSidebarComponent;
|
|
18075
|
+
exports.ɵcn = IAInsightCardComponent;
|
|
18076
|
+
exports.ɵco = IAInsightCardLoaderComponent;
|
|
18077
|
+
exports.ɵcp = StructureModule;
|
|
18078
|
+
exports.ɵcq = HeaderComponent;
|
|
18079
|
+
exports.ɵcr = FooterComponent;
|
|
18080
|
+
exports.ɵcs = KanbanEventService;
|
|
18081
|
+
exports.ɵct = KanbanItemComponent;
|
|
18082
|
+
exports.ɵcu = KanbanColumnComponent;
|
|
18083
|
+
exports.ɵcv = KanbanItemDraggingComponent;
|
|
18084
|
+
exports.ɵcw = NumberLocaleOptions;
|
|
18085
|
+
exports.ɵcx = BorderButtonModule;
|
|
18086
|
+
exports.ɵcy = BorderButtonComponent;
|
|
18087
|
+
exports.ɵcz = SelectButtonItemComponent;
|
|
17988
18088
|
exports.ɵd = TemplateModule;
|
|
17989
|
-
exports.ɵda =
|
|
17990
|
-
exports.ɵdb =
|
|
17991
|
-
exports.ɵdc =
|
|
17992
|
-
exports.ɵdd =
|
|
17993
|
-
exports.ɵde =
|
|
17994
|
-
exports.ɵdf =
|
|
17995
|
-
exports.ɵdg =
|
|
17996
|
-
exports.ɵdh =
|
|
17997
|
-
exports.ɵdi =
|
|
17998
|
-
exports.ɵdj =
|
|
17999
|
-
exports.ɵdk =
|
|
18000
|
-
exports.ɵdl =
|
|
18001
|
-
exports.ɵdm =
|
|
18002
|
-
exports.ɵdn =
|
|
18003
|
-
exports.ɵdo =
|
|
18089
|
+
exports.ɵda = SlidePanelService;
|
|
18090
|
+
exports.ɵdb = TieredMenuEventService;
|
|
18091
|
+
exports.ɵdc = TieredMenuService;
|
|
18092
|
+
exports.ɵdd = TieredMenuComponent;
|
|
18093
|
+
exports.ɵde = TieredMenuNestedComponent;
|
|
18094
|
+
exports.ɵdf = TieredMenuItemComponent;
|
|
18095
|
+
exports.ɵdg = TieredMenuDividerComponent;
|
|
18096
|
+
exports.ɵdh = TimelineItemModule;
|
|
18097
|
+
exports.ɵdi = TimelineIconItemComponent;
|
|
18098
|
+
exports.ɵdj = HorizontalTimelineModule;
|
|
18099
|
+
exports.ɵdk = HorizontalTimelineComponent;
|
|
18100
|
+
exports.ɵdl = VerticalTimelineModule;
|
|
18101
|
+
exports.ɵdm = VerticalTimelineComponent;
|
|
18102
|
+
exports.ɵdn = RangeLineComponent;
|
|
18103
|
+
exports.ɵdo = CollapseOptionComponent;
|
|
18104
|
+
exports.ɵdp = CollapsedItemsComponent;
|
|
18105
|
+
exports.ɵdq = VerticalItemsComponent;
|
|
18004
18106
|
exports.ɵe = CustomTranslationsModule;
|
|
18005
18107
|
exports.ɵf = CodeEditorComponent;
|
|
18006
18108
|
exports.ɵg = CoreFacade;
|
|
@@ -18009,20 +18111,20 @@
|
|
|
18009
18111
|
exports.ɵj = LocalizedCurrencyImpurePipe;
|
|
18010
18112
|
exports.ɵk = LocalizedBignumberPipe;
|
|
18011
18113
|
exports.ɵl = LocalizedBignumberImpurePipe;
|
|
18012
|
-
exports.ɵm =
|
|
18013
|
-
exports.ɵn =
|
|
18014
|
-
exports.ɵo =
|
|
18015
|
-
exports.ɵp =
|
|
18016
|
-
exports.ɵq =
|
|
18017
|
-
exports.ɵr =
|
|
18018
|
-
exports.ɵs =
|
|
18019
|
-
exports.ɵt =
|
|
18020
|
-
exports.ɵu =
|
|
18021
|
-
exports.ɵv =
|
|
18022
|
-
exports.ɵw =
|
|
18023
|
-
exports.ɵx =
|
|
18024
|
-
exports.ɵy =
|
|
18025
|
-
exports.ɵz =
|
|
18114
|
+
exports.ɵm = NumericPipe;
|
|
18115
|
+
exports.ɵn = NumericService;
|
|
18116
|
+
exports.ɵo = EmptyStateGoBackComponent;
|
|
18117
|
+
exports.ɵp = IAssistIconComponent;
|
|
18118
|
+
exports.ɵq = SeniorIconComponent;
|
|
18119
|
+
exports.ɵr = DotsIndicatorComponent;
|
|
18120
|
+
exports.ɵs = LoadingIndicatorComponent;
|
|
18121
|
+
exports.ɵt = ProgressBarDeterminateComponent;
|
|
18122
|
+
exports.ɵu = ProgressBarIndeterminateComponent;
|
|
18123
|
+
exports.ɵv = FileUploadService;
|
|
18124
|
+
exports.ɵw = FileItemComponent;
|
|
18125
|
+
exports.ɵx = LocaleService;
|
|
18126
|
+
exports.ɵy = InfoSignComponent;
|
|
18127
|
+
exports.ɵz = TableColumnsComponent;
|
|
18026
18128
|
|
|
18027
18129
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
18028
18130
|
|