@seniorsistemas/angular-components 14.5.1 → 14.6.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.
Files changed (30) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +99 -38
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/locale/pipes/localized-bignumber-impure.pipe.d.ts +6 -0
  6. package/components/locale/pipes/localized-bignumber.pipe.d.ts +9 -0
  7. package/components/locale/pipes/localized-currency-impure.pipe.d.ts +3 -0
  8. package/components/locale/pipes/localized-currency.pipe.d.ts +3 -0
  9. package/components/locale/pipes/localized-number.pipe.d.ts +3 -0
  10. package/esm2015/components/locale/locale.module.js +9 -1
  11. package/esm2015/components/locale/pipes/localized-bignumber-impure.pipe.js +16 -0
  12. package/esm2015/components/locale/pipes/localized-bignumber.pipe.js +33 -0
  13. package/esm2015/components/locale/pipes/localized-currency-impure.pipe.js +4 -1
  14. package/esm2015/components/locale/pipes/localized-currency.pipe.js +4 -1
  15. package/esm2015/components/locale/pipes/localized-number.pipe.js +4 -1
  16. package/esm2015/seniorsistemas-angular-components.js +34 -32
  17. package/esm5/components/locale/locale.module.js +9 -1
  18. package/esm5/components/locale/pipes/localized-bignumber-impure.pipe.js +21 -0
  19. package/esm5/components/locale/pipes/localized-bignumber.pipe.js +34 -0
  20. package/esm5/components/locale/pipes/localized-currency-impure.pipe.js +4 -1
  21. package/esm5/components/locale/pipes/localized-currency.pipe.js +4 -1
  22. package/esm5/components/locale/pipes/localized-number.pipe.js +4 -1
  23. package/esm5/seniorsistemas-angular-components.js +34 -32
  24. package/fesm2015/seniorsistemas-angular-components.js +58 -6
  25. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  26. package/fesm5/seniorsistemas-angular-components.js +64 -6
  27. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  28. package/package.json +2 -2
  29. package/seniorsistemas-angular-components.d.ts +33 -31
  30. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -16,10 +16,11 @@ import { Hotkey, HotkeysService, HotkeyModule } from 'angular2-hotkeys';
16
16
  import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
17
17
  import { Dialog, DialogModule } from 'primeng/dialog';
18
18
  import { Table, TableService, RowToggler, TableModule as TableModule$1 } from 'primeng/table';
19
- import { AlignmentOptions, CurrencyMaskDirective as CurrencyMaskDirective$1 } from '@seniorsistemas/ng2-currency-mask';
19
+ import { applyMask, AlignmentOptions, CurrencyMaskDirective as CurrencyMaskDirective$1 } from '@seniorsistemas/ng2-currency-mask';
20
20
  import { user } from '@seniorsistemas/senior-platform-data';
21
21
  import * as moment_ from 'moment';
22
22
  import { CookieService } from 'ngx-cookie-service';
23
+ import BigNumber, { BigNumber as BigNumber$1 } from 'bignumber.js';
23
24
  import { CurrencyMaskDirective } from 'ng2-currency-mask';
24
25
  import { ButtonModule as ButtonModule$1 } from 'primeng/button';
25
26
  import { CheckboxModule } from 'primeng/checkbox';
@@ -41,7 +42,6 @@ import * as elementResizeDetectorMaker_ from 'element-resize-detector';
41
42
  import { FocusTrapFactory, A11yModule } from '@angular/cdk/a11y';
42
43
  import { ScrollPanelModule } from 'primeng/scrollpanel';
43
44
  import { Sidebar, SidebarModule as SidebarModule$1 } from 'primeng/sidebar';
44
- import { BigNumber } from 'bignumber.js';
45
45
 
46
46
  var BreadcrumbComponent = /** @class */ (function () {
47
47
  function BreadcrumbComponent(activatedRoute, router) {
@@ -1170,6 +1170,49 @@ var LocaleService = /** @class */ (function () {
1170
1170
  return LocaleService;
1171
1171
  }());
1172
1172
 
1173
+ var LocalizedBignumberPipe = /** @class */ (function () {
1174
+ function LocalizedBignumberPipe(localeService) {
1175
+ this.localeService = localeService;
1176
+ }
1177
+ LocalizedBignumberPipe.prototype.transform = function (value, options) {
1178
+ return value !== undefined && value !== null ? this.applyMask(value, options) : of(value);
1179
+ };
1180
+ LocalizedBignumberPipe.prototype.applyMask = function (value, options) {
1181
+ return this.localeService.get().pipe(map(function (localeConfig) {
1182
+ var _a;
1183
+ var configs = __assign(__assign(__assign({}, localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number), { prefix: (_a = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _a === void 0 ? void 0 : _a.currencySymbol }), options);
1184
+ var isNumber = !(new BigNumber(value).isNaN());
1185
+ return applyMask(value, configs, isNumber);
1186
+ }));
1187
+ };
1188
+ LocalizedBignumberPipe.ctorParameters = function () { return [
1189
+ { type: LocaleService }
1190
+ ]; };
1191
+ LocalizedBignumberPipe = __decorate([
1192
+ Pipe({
1193
+ name: "localizedBignumber",
1194
+ })
1195
+ ], LocalizedBignumberPipe);
1196
+ return LocalizedBignumberPipe;
1197
+ }());
1198
+
1199
+ var LocalizedBignumberImpurePipe = /** @class */ (function (_super) {
1200
+ __extends(LocalizedBignumberImpurePipe, _super);
1201
+ function LocalizedBignumberImpurePipe() {
1202
+ return _super !== null && _super.apply(this, arguments) || this;
1203
+ }
1204
+ LocalizedBignumberImpurePipe.prototype.transform = function (value, options) {
1205
+ return _super.prototype.transform.call(this, value, options);
1206
+ };
1207
+ LocalizedBignumberImpurePipe = __decorate([
1208
+ Pipe({
1209
+ name: "localizedBignumberImpure",
1210
+ pure: false,
1211
+ })
1212
+ ], LocalizedBignumberImpurePipe);
1213
+ return LocalizedBignumberImpurePipe;
1214
+ }(LocalizedBignumberPipe));
1215
+
1173
1216
  var LocalizedCurrencyPipeOptions = /** @class */ (function (_super) {
1174
1217
  __extends(LocalizedCurrencyPipeOptions, _super);
1175
1218
  function LocalizedCurrencyPipeOptions(config) {
@@ -1180,6 +1223,9 @@ var LocalizedCurrencyPipeOptions = /** @class */ (function (_super) {
1180
1223
  }
1181
1224
  return LocalizedCurrencyPipeOptions;
1182
1225
  }(NumberLocaleOptions));
1226
+ /**
1227
+ * @deprecated Should use localizedBignumberPipe instead
1228
+ */
1183
1229
  var LocalizedCurrencyPipe = /** @class */ (function () {
1184
1230
  function LocalizedCurrencyPipe(localeService) {
1185
1231
  this.localeService = localeService;
@@ -1218,6 +1264,9 @@ var LocalizedCurrencyPipe = /** @class */ (function () {
1218
1264
  return LocalizedCurrencyPipe;
1219
1265
  }());
1220
1266
 
1267
+ /**
1268
+ * @deprecated Should use localizedBignumberPipe instead
1269
+ */
1221
1270
  var LocalizedCurrencyImpurePipe = /** @class */ (function (_super) {
1222
1271
  __extends(LocalizedCurrencyImpurePipe, _super);
1223
1272
  function LocalizedCurrencyImpurePipe() {
@@ -1270,6 +1319,9 @@ var LocalizedDateImpurePipe = /** @class */ (function (_super) {
1270
1319
  return LocalizedDateImpurePipe;
1271
1320
  }(LocalizedDatePipe));
1272
1321
 
1322
+ /**
1323
+ * @deprecated Should use localizedBignumberPipe instead
1324
+ */
1273
1325
  var LocalizedNumberPipe = /** @class */ (function () {
1274
1326
  function LocalizedNumberPipe(localeService) {
1275
1327
  this.localeService = localeService;
@@ -1343,6 +1395,8 @@ var LocaleModule = /** @class */ (function () {
1343
1395
  LocalizedCurrencyImpurePipe,
1344
1396
  LocalizedDateImpurePipe,
1345
1397
  LocalizedTimeImpurePipe,
1398
+ LocalizedBignumberPipe,
1399
+ LocalizedBignumberImpurePipe
1346
1400
  ],
1347
1401
  };
1348
1402
  };
@@ -1363,6 +1417,8 @@ var LocaleModule = /** @class */ (function () {
1363
1417
  LocalizedCurrencyImpurePipe,
1364
1418
  LocalizedDateImpurePipe,
1365
1419
  LocalizedTimeImpurePipe,
1420
+ LocalizedBignumberPipe,
1421
+ LocalizedBignumberImpurePipe
1366
1422
  ],
1367
1423
  declarations: [
1368
1424
  LocalizedCurrencyPipe,
@@ -1372,6 +1428,8 @@ var LocaleModule = /** @class */ (function () {
1372
1428
  LocalizedCurrencyImpurePipe,
1373
1429
  LocalizedDateImpurePipe,
1374
1430
  LocalizedTimeImpurePipe,
1431
+ LocalizedBignumberPipe,
1432
+ LocalizedBignumberImpurePipe
1375
1433
  ],
1376
1434
  })
1377
1435
  ], LocaleModule);
@@ -6285,9 +6343,9 @@ var StatsCardComponent = /** @class */ (function () {
6285
6343
  });
6286
6344
  StatsCardComponent.prototype.updateDisplayValue = function () {
6287
6345
  var _this = this;
6288
- var previousRawValue = new BigNumber(this.previousValue.replace(/\D/g, ""));
6289
- var rawValue = new BigNumber(this.value.replace(/\D/g, ""));
6290
- var eachAnimationDuration = new BigNumber(this.ANIMATION_DURATION_MS).dividedBy(new BigNumber(this.STEP_DURATION_MS));
6346
+ var previousRawValue = new BigNumber$1(this.previousValue.replace(/\D/g, ""));
6347
+ var rawValue = new BigNumber$1(this.value.replace(/\D/g, ""));
6348
+ var eachAnimationDuration = new BigNumber$1(this.ANIMATION_DURATION_MS).dividedBy(new BigNumber$1(this.STEP_DURATION_MS));
6291
6349
  var incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(eachAnimationDuration).dp(0, 7);
6292
6350
  var incremental = previousRawValue.isLessThan(rawValue);
6293
6351
  clearInterval(this.intervalId);
@@ -6905,5 +6963,5 @@ var AngularComponentsModule = /** @class */ (function () {
6905
6963
  * Generated bundle index. Do not edit.
6906
6964
  */
6907
6965
 
6908
- export { AngularComponentsModule, AutocompleteField, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FormField, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, ProductHeaderComponent, ProductHeaderModule, RadioButtonField, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TextAreaField, TextField, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, TokenListModule as ɵb, HeaderComponent as ɵba, FooterComponent as ɵbb, InfoSignComponent as ɵbc, NumberLocaleOptions as ɵbd, ThumbnailService as ɵbe, InfiniteScrollModule as ɵbf, InfiniteScrollDirective as ɵbg, TableColumnsComponent as ɵc, InfoSignModule as ɵd, AutocompleteFieldComponent as ɵe, BooleanFieldComponent as ɵf, CalendarFieldComponent as ɵg, ChipsFieldComponent as ɵh, CurrencyFieldComponent as ɵi, BaseFieldComponent as ɵj, DynamicFieldComponent as ɵk, DynamicFormDirective as ɵl, FieldsetComponent as ɵm, FileUploadComponent$1 as ɵn, LookupFieldComponent as ɵo, NumberFieldComponent as ɵp, BignumberFieldComponent as ɵq, RadioButtonComponent as ɵr, RowComponent as ɵs, SectionComponent as ɵt, SelectFieldComponent as ɵu, TextAreaFieldComponent as ɵv, TextFieldComponent as ɵw, DecimalField as ɵy, StructureModule as ɵz };
6966
+ export { AngularComponentsModule, AutocompleteField, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FormField, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, ProductHeaderComponent, ProductHeaderModule, RadioButtonField, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TextAreaField, TextField, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, LocalizedBignumberPipe as ɵb, DecimalField as ɵba, StructureModule as ɵbb, HeaderComponent as ɵbc, FooterComponent as ɵbd, InfoSignComponent as ɵbe, NumberLocaleOptions as ɵbf, ThumbnailService as ɵbg, InfiniteScrollModule as ɵbh, InfiniteScrollDirective as ɵbi, LocalizedBignumberImpurePipe as ɵc, TokenListModule as ɵd, TableColumnsComponent as ɵe, InfoSignModule as ɵf, AutocompleteFieldComponent as ɵg, BooleanFieldComponent as ɵh, CalendarFieldComponent as ɵi, ChipsFieldComponent as ɵj, CurrencyFieldComponent as ɵk, BaseFieldComponent as ɵl, DynamicFieldComponent as ɵm, DynamicFormDirective as ɵn, FieldsetComponent as ɵo, FileUploadComponent$1 as ɵp, LookupFieldComponent as ɵq, NumberFieldComponent as ɵr, BignumberFieldComponent as ɵs, RadioButtonComponent as ɵt, RowComponent as ɵu, SectionComponent as ɵv, SelectFieldComponent as ɵw, TextAreaFieldComponent as ɵx, TextFieldComponent as ɵy };
6909
6967
  //# sourceMappingURL=seniorsistemas-angular-components.js.map