@annalib/anna-core 4.2.18 → 4.2.19

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.
@@ -1860,6 +1860,12 @@ class AnnaNonEditableGenericTableComponent {
1860
1860
  this.tooltipRadioTextMap.set("orderSource", "Order Source");
1861
1861
  this.tooltipRadioTextMap.set("orderCategory", "Category");
1862
1862
  this.tooltipRadioTextMap.set("cashOrTrade", "C/T");
1863
+ this.tooltipRadioTextMap.set("ODImps", "OD Imps");
1864
+ this.tooltipRadioTextMap.set("UDImps", "UD Imps");
1865
+ this.tooltipRadioTextMap.set("ODGrp", "OD Grp");
1866
+ this.tooltipRadioTextMap.set("UdGrp", "UD Grp");
1867
+ this.tooltipRadioTextMap.set("overDeliveryPercent", "OD Percent");
1868
+ this.tooltipRadioTextMap.set("underDeliveryPercent", "OD Percent");
1863
1869
  }
1864
1870
  generateTableDataWrapper() {
1865
1871
  this.showSkeletonLoading = true;
@@ -4232,6 +4238,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
4232
4238
  }]
4233
4239
  }] });
4234
4240
 
4241
+ class AnnaNumberFormatService {
4242
+ static GetRoundedValueWithUnits(inputValue, digitsToRoundDecimalPoint = 2) {
4243
+ let [value, unit] = AnnaNumberFormatService.GetValueInUnits(Math.abs(inputValue));
4244
+ value = +((+value).toFixed(digitsToRoundDecimalPoint));
4245
+ if (inputValue < 0) {
4246
+ value = value * -1;
4247
+ }
4248
+ return value.toString() + unit;
4249
+ // return (Math.Round(value, digitsToRoundDecimalPoint, MidpointRounding.AwayFromZero) + unit);
4250
+ }
4251
+ static GetValueInUnits(inputValue) {
4252
+ let unit = "";
4253
+ let thousand = 1000;
4254
+ let million = 1000000;
4255
+ let billion = 1000000000;
4256
+ if (inputValue >= thousand && inputValue < million) {
4257
+ inputValue = inputValue / thousand;
4258
+ unit = "K";
4259
+ }
4260
+ else if (inputValue >= million && inputValue < billion) {
4261
+ inputValue = inputValue / million;
4262
+ unit = "M";
4263
+ }
4264
+ else if (inputValue >= billion) {
4265
+ inputValue = inputValue / billion;
4266
+ unit = "B";
4267
+ }
4268
+ return [inputValue, unit];
4269
+ }
4270
+ }
4271
+ AnnaNumberFormatService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNumberFormatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4272
+ AnnaNumberFormatService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNumberFormatService, providedIn: "root" });
4273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNumberFormatService, decorators: [{
4274
+ type: Injectable,
4275
+ args: [{
4276
+ providedIn: "root",
4277
+ }]
4278
+ }] });
4279
+
4235
4280
  ;
4236
4281
 
4237
4282
  class Constants {
@@ -4276,5 +4321,5 @@ var Days;
4276
4321
  * Generated bundle index. Do not edit.
4277
4322
  */
4278
4323
 
4279
- export { AllSelectedStatus, AnnaBuyerApprovalIconTemplateComponent, AnnaCalendarFilterComponent, AnnaConvertZeroOrNullOrUndefinedPipe, AnnaCoreModule, AnnaDateTimeFormatService, AnnaFilterSearchedTextPipe, AnnaFilterService, AnnaFixedRowSizeTableVirtualScrollStrategy, AnnaFixedRowSizeTableVirtualScrollStrategyDirective, AnnaGenericTableService, AnnaGlobalConfigService, AnnaIconColumnComponent, AnnaLiveIconTemplateComponent, AnnaNoDataComponent, AnnaNonEditableGenericTableComponent, AnnaNotifyIconTemplateComponent, AnnaPayForPerformanceIconTemplateComponent, AnnaRejectedIconTemplateComponent, AnnaReplaceCharPipe, AnnaSortComponent, AnnaSortService, AnnaTableVirtualScrollViewportComponent, AnnaTypeofDataPipe, AnnaVirtualTableDirective, AnnaWeekCalendarComponent, Constants, Days, ErrorCodes, TooltipModel, fixedSizeVirtualScrollStrategyFactory, radioButtonModel, showEllipsisTextOnHoverDirective, tooltipModelForColumnLevelFiltering };
4324
+ export { AllSelectedStatus, AnnaBuyerApprovalIconTemplateComponent, AnnaCalendarFilterComponent, AnnaConvertZeroOrNullOrUndefinedPipe, AnnaCoreModule, AnnaDateTimeFormatService, AnnaFilterSearchedTextPipe, AnnaFilterService, AnnaFixedRowSizeTableVirtualScrollStrategy, AnnaFixedRowSizeTableVirtualScrollStrategyDirective, AnnaGenericTableService, AnnaGlobalConfigService, AnnaIconColumnComponent, AnnaLiveIconTemplateComponent, AnnaNoDataComponent, AnnaNonEditableGenericTableComponent, AnnaNotifyIconTemplateComponent, AnnaNumberFormatService, AnnaPayForPerformanceIconTemplateComponent, AnnaRejectedIconTemplateComponent, AnnaReplaceCharPipe, AnnaSortComponent, AnnaSortService, AnnaTableVirtualScrollViewportComponent, AnnaTypeofDataPipe, AnnaVirtualTableDirective, AnnaWeekCalendarComponent, Constants, Days, ErrorCodes, TooltipModel, fixedSizeVirtualScrollStrategyFactory, radioButtonModel, showEllipsisTextOnHoverDirective, tooltipModelForColumnLevelFiltering };
4280
4325
  //# sourceMappingURL=annalib-anna-core.mjs.map