@annalib/anna-core 4.2.22 → 4.2.24
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/esm2020/lib/anna-core-shared-lib/services/anna-filter.service.mjs +10 -1
- package/esm2020/lib/anna-core-shared-lib/services/anna-number-format.service.mjs +41 -0
- package/esm2020/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +9 -1
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/annalib-anna-core.mjs +57 -1
- package/fesm2015/annalib-anna-core.mjs.map +1 -1
- package/fesm2020/annalib-anna-core.mjs +57 -1
- package/fesm2020/annalib-anna-core.mjs.map +1 -1
- package/lib/anna-core-shared-lib/services/anna-number-format.service.d.ts +7 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1257,6 +1257,15 @@ class AnnaFilterService {
|
|
|
1257
1257
|
"udDeficitValue",
|
|
1258
1258
|
"bookedValue",
|
|
1259
1259
|
"bookedSpots",
|
|
1260
|
+
"userChanges",
|
|
1261
|
+
"UDGrp",
|
|
1262
|
+
"UDImps",
|
|
1263
|
+
"ODGrp",
|
|
1264
|
+
"ODImps",
|
|
1265
|
+
"udImpsPercent",
|
|
1266
|
+
"udGrpPercent",
|
|
1267
|
+
"odImpsPercent",
|
|
1268
|
+
"odGrpPercent",
|
|
1260
1269
|
"userADUs",
|
|
1261
1270
|
"buyerChanges",
|
|
1262
1271
|
"userChanges",
|
|
@@ -1896,6 +1905,14 @@ class AnnaNonEditableGenericTableComponent {
|
|
|
1896
1905
|
this.tooltipRadioTextMap.set("orderCategory", "Category");
|
|
1897
1906
|
this.tooltipRadioTextMap.set("cashOrTrade", "C/T");
|
|
1898
1907
|
this.tooltipRadioTextMap.set("revisionStartDate", "Revision Start Date");
|
|
1908
|
+
this.tooltipRadioTextMap.set("ODImps", "OD IMPS");
|
|
1909
|
+
this.tooltipRadioTextMap.set("UDImps", "UD IMPS");
|
|
1910
|
+
this.tooltipRadioTextMap.set("ODGrp", "OD GRP");
|
|
1911
|
+
this.tooltipRadioTextMap.set("UDGrp", "UD GRP");
|
|
1912
|
+
this.tooltipRadioTextMap.set("udImpsPercent", "UD IMPS Percent");
|
|
1913
|
+
this.tooltipRadioTextMap.set("udGrpPercent", "UD GRP Percent");
|
|
1914
|
+
this.tooltipRadioTextMap.set("odImpsPercent", "OD IMPS Percent");
|
|
1915
|
+
this.tooltipRadioTextMap.set("odGrpPercent", "OD GRP Percent");
|
|
1899
1916
|
}
|
|
1900
1917
|
generateTableDataWrapper() {
|
|
1901
1918
|
this.showSkeletonLoading = true;
|
|
@@ -4293,6 +4310,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
|
|
|
4293
4310
|
}]
|
|
4294
4311
|
}] });
|
|
4295
4312
|
|
|
4313
|
+
class AnnaNumberFormatService {
|
|
4314
|
+
static GetRoundedValueWithUnits(inputValue, digitsToRoundDecimalPoint = 2) {
|
|
4315
|
+
let [value, unit] = AnnaNumberFormatService.GetValueInUnits(Math.abs(inputValue));
|
|
4316
|
+
value = +((+value).toFixed(digitsToRoundDecimalPoint));
|
|
4317
|
+
if (inputValue < 0) {
|
|
4318
|
+
value = value * -1;
|
|
4319
|
+
}
|
|
4320
|
+
return value.toString() + unit;
|
|
4321
|
+
// return (Math.Round(value, digitsToRoundDecimalPoint, MidpointRounding.AwayFromZero) + unit);
|
|
4322
|
+
}
|
|
4323
|
+
static GetValueInUnits(inputValue) {
|
|
4324
|
+
let unit = "";
|
|
4325
|
+
let thousand = 1000;
|
|
4326
|
+
let million = 1000000;
|
|
4327
|
+
let billion = 1000000000;
|
|
4328
|
+
if (inputValue >= thousand && inputValue < million) {
|
|
4329
|
+
inputValue = inputValue / thousand;
|
|
4330
|
+
unit = "K";
|
|
4331
|
+
}
|
|
4332
|
+
else if (inputValue >= million && inputValue < billion) {
|
|
4333
|
+
inputValue = inputValue / million;
|
|
4334
|
+
unit = "M";
|
|
4335
|
+
}
|
|
4336
|
+
else if (inputValue >= billion) {
|
|
4337
|
+
inputValue = inputValue / billion;
|
|
4338
|
+
unit = "B";
|
|
4339
|
+
}
|
|
4340
|
+
return [inputValue, unit];
|
|
4341
|
+
}
|
|
4342
|
+
}
|
|
4343
|
+
AnnaNumberFormatService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNumberFormatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4344
|
+
AnnaNumberFormatService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNumberFormatService, providedIn: "root" });
|
|
4345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNumberFormatService, decorators: [{
|
|
4346
|
+
type: Injectable,
|
|
4347
|
+
args: [{
|
|
4348
|
+
providedIn: "root",
|
|
4349
|
+
}]
|
|
4350
|
+
}] });
|
|
4351
|
+
|
|
4296
4352
|
;
|
|
4297
4353
|
|
|
4298
4354
|
class Constants {
|
|
@@ -4337,5 +4393,5 @@ var Days;
|
|
|
4337
4393
|
* Generated bundle index. Do not edit.
|
|
4338
4394
|
*/
|
|
4339
4395
|
|
|
4340
|
-
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 };
|
|
4396
|
+
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 };
|
|
4341
4397
|
//# sourceMappingURL=annalib-anna-core.mjs.map
|