@annalib/anna-core 4.2.25 → 4.2.26
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 +11 -10
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/annalib-anna-core.mjs +59 -10
- package/fesm2015/annalib-anna-core.mjs.map +1 -1
- package/fesm2020/annalib-anna-core.mjs +59 -10
- 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 %");
|
|
1913
|
+
this.tooltipRadioTextMap.set("udGrpPercent", "UD GRP %");
|
|
1914
|
+
this.tooltipRadioTextMap.set("odImpsPercent", "OD IMPS %");
|
|
1915
|
+
this.tooltipRadioTextMap.set("odGrpPercent", "OD GRP %");
|
|
1899
1916
|
}
|
|
1900
1917
|
generateTableDataWrapper() {
|
|
1901
1918
|
this.showSkeletonLoading = true;
|
|
@@ -2024,17 +2041,10 @@ class AnnaNonEditableGenericTableComponent {
|
|
|
2024
2041
|
}
|
|
2025
2042
|
else {
|
|
2026
2043
|
let values = this.tableData.map((u) => u[item]);
|
|
2027
|
-
|
|
2028
|
-
let activeAndLastlyAppliedHeader = false;
|
|
2029
|
-
if (this.annaFilterService.appliedFiltersArray.length > 0 &&
|
|
2030
|
-
this.annaFilterService.appliedFiltersArray[this.annaFilterService.appliedFiltersArray.length - 1] == item) {
|
|
2031
|
-
activeAndLastlyAppliedHeader = true;
|
|
2032
|
-
}
|
|
2033
|
-
if (header.filter == "CHECKBOX" && (uniq(values).filter(n => n != null).length > 1 || activeAndLastlyAppliedHeader)) {
|
|
2044
|
+
if (header.filter == "CHECKBOX" && uniq(values).filter(n => n != null).length > 1) {
|
|
2034
2045
|
enabledHeaders.push(item);
|
|
2035
2046
|
}
|
|
2036
|
-
else if (header.filter != "CHECKBOX" &&
|
|
2037
|
-
(uniq(values).filter(n => n != null && n != "-").length > 1 || activeAndLastlyAppliedHeader)) {
|
|
2047
|
+
else if (header.filter != "CHECKBOX" && uniq(values).filter(n => n != null && n != "-").length > 1) {
|
|
2038
2048
|
enabledHeaders.push(item);
|
|
2039
2049
|
}
|
|
2040
2050
|
}
|
|
@@ -4300,6 +4310,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
|
|
|
4300
4310
|
}]
|
|
4301
4311
|
}] });
|
|
4302
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
|
+
|
|
4303
4352
|
;
|
|
4304
4353
|
|
|
4305
4354
|
class Constants {
|
|
@@ -4344,5 +4393,5 @@ var Days;
|
|
|
4344
4393
|
* Generated bundle index. Do not edit.
|
|
4345
4394
|
*/
|
|
4346
4395
|
|
|
4347
|
-
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 };
|
|
4348
4397
|
//# sourceMappingURL=annalib-anna-core.mjs.map
|