@indice/ng-components 0.2.173-beta.1 → 0.2.173-beta.6
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/ng-components.module.mjs +22 -5
- package/esm2020/lib/pipes/short-number.pipe.mjs +43 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/indice-ng-components.mjs +60 -5
- package/fesm2015/indice-ng-components.mjs.map +1 -1
- package/fesm2020/indice-ng-components.mjs +60 -5
- package/fesm2020/indice-ng-components.mjs.map +1 -1
- package/lib/ng-components.module.d.ts +50 -47
- package/lib/pipes/short-number.pipe.d.ts +7 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -3895,6 +3895,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
3895
3895
|
}]
|
|
3896
3896
|
}] });
|
|
3897
3897
|
|
|
3898
|
+
class ShortNumberPipe {
|
|
3899
|
+
transform(number, args) {
|
|
3900
|
+
if (isNaN(number))
|
|
3901
|
+
return null; // will only work value is a number
|
|
3902
|
+
if (number === null)
|
|
3903
|
+
return null;
|
|
3904
|
+
if (number === 0)
|
|
3905
|
+
return null;
|
|
3906
|
+
let abs = Math.abs(number);
|
|
3907
|
+
const rounder = Math.pow(10, 1);
|
|
3908
|
+
const isNegative = number < 0; // will also work for Negative numbers
|
|
3909
|
+
let key = '';
|
|
3910
|
+
const powers = [
|
|
3911
|
+
{ key: 'Q', value: Math.pow(10, 15) },
|
|
3912
|
+
{ key: 'T', value: Math.pow(10, 12) },
|
|
3913
|
+
{ key: 'B', value: Math.pow(10, 9) },
|
|
3914
|
+
{ key: 'M', value: Math.pow(10, 6) },
|
|
3915
|
+
{ key: 'K', value: 1000 }
|
|
3916
|
+
];
|
|
3917
|
+
for (let i = 0; i < powers.length; i++) {
|
|
3918
|
+
let reduced = abs / powers[i].value;
|
|
3919
|
+
reduced = Math.round(reduced * rounder) / rounder;
|
|
3920
|
+
if (reduced >= 1) {
|
|
3921
|
+
abs = reduced;
|
|
3922
|
+
key = powers[i].key;
|
|
3923
|
+
break;
|
|
3924
|
+
}
|
|
3925
|
+
}
|
|
3926
|
+
return (isNegative ? '-' : '') + abs + key;
|
|
3927
|
+
}
|
|
3928
|
+
}
|
|
3929
|
+
ShortNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ShortNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3930
|
+
ShortNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.3", ngImport: i0, type: ShortNumberPipe, name: "shortNumber", pure: false });
|
|
3931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ShortNumberPipe, decorators: [{
|
|
3932
|
+
type: Pipe,
|
|
3933
|
+
args: [{
|
|
3934
|
+
name: 'shortNumber',
|
|
3935
|
+
pure: false
|
|
3936
|
+
}]
|
|
3937
|
+
}] });
|
|
3938
|
+
|
|
3898
3939
|
class BaseListComponent {
|
|
3899
3940
|
constructor(route$, router$) {
|
|
3900
3941
|
this.route$ = route$;
|
|
@@ -4580,6 +4621,7 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4580
4621
|
DatepickerComponent,
|
|
4581
4622
|
DropDownMenuComponent,
|
|
4582
4623
|
DurationFormatPipe,
|
|
4624
|
+
ShortNumberPipe,
|
|
4583
4625
|
DynamicComponentHostDirective,
|
|
4584
4626
|
ErrorComponent,
|
|
4585
4627
|
FormLayoutComponent,
|
|
@@ -4621,7 +4663,9 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4621
4663
|
ViewLayoutComponent,
|
|
4622
4664
|
ToggleButtonComponent,
|
|
4623
4665
|
ToggleButtonsListComponent,
|
|
4624
|
-
ContentTileComponent
|
|
4666
|
+
ContentTileComponent,
|
|
4667
|
+
ContentTileItemComponent,
|
|
4668
|
+
ContentTileHeaderComponent], imports: [CommonModule,
|
|
4625
4669
|
RouterModule,
|
|
4626
4670
|
IndiceAuthModule,
|
|
4627
4671
|
FormsModule], exports: [AddressPipe,
|
|
@@ -4635,6 +4679,7 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4635
4679
|
DatepickerComponent,
|
|
4636
4680
|
DropDownMenuComponent,
|
|
4637
4681
|
DurationFormatPipe,
|
|
4682
|
+
ShortNumberPipe,
|
|
4638
4683
|
ErrorComponent,
|
|
4639
4684
|
FormLayoutComponent,
|
|
4640
4685
|
KpiTileComponent,
|
|
@@ -4666,7 +4711,10 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4666
4711
|
UnauthorizedComponent,
|
|
4667
4712
|
ViewLayoutComponent,
|
|
4668
4713
|
ToggleButtonComponent,
|
|
4669
|
-
ToggleButtonsListComponent
|
|
4714
|
+
ToggleButtonsListComponent,
|
|
4715
|
+
ContentTileComponent,
|
|
4716
|
+
ContentTileItemComponent,
|
|
4717
|
+
ContentTileHeaderComponent] });
|
|
4670
4718
|
IndiceComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: IndiceComponentsModule, imports: [CommonModule,
|
|
4671
4719
|
RouterModule,
|
|
4672
4720
|
IndiceAuthModule,
|
|
@@ -4687,6 +4735,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4687
4735
|
DatepickerComponent,
|
|
4688
4736
|
DropDownMenuComponent,
|
|
4689
4737
|
DurationFormatPipe,
|
|
4738
|
+
ShortNumberPipe,
|
|
4690
4739
|
DynamicComponentHostDirective,
|
|
4691
4740
|
ErrorComponent,
|
|
4692
4741
|
FormLayoutComponent,
|
|
@@ -4728,7 +4777,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4728
4777
|
ViewLayoutComponent,
|
|
4729
4778
|
ToggleButtonComponent,
|
|
4730
4779
|
ToggleButtonsListComponent,
|
|
4731
|
-
ContentTileComponent
|
|
4780
|
+
ContentTileComponent,
|
|
4781
|
+
ContentTileItemComponent,
|
|
4782
|
+
ContentTileHeaderComponent
|
|
4732
4783
|
],
|
|
4733
4784
|
imports: [
|
|
4734
4785
|
CommonModule,
|
|
@@ -4748,6 +4799,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4748
4799
|
DatepickerComponent,
|
|
4749
4800
|
DropDownMenuComponent,
|
|
4750
4801
|
DurationFormatPipe,
|
|
4802
|
+
ShortNumberPipe,
|
|
4751
4803
|
ErrorComponent,
|
|
4752
4804
|
FormLayoutComponent,
|
|
4753
4805
|
KpiTileComponent,
|
|
@@ -4779,7 +4831,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4779
4831
|
UnauthorizedComponent,
|
|
4780
4832
|
ViewLayoutComponent,
|
|
4781
4833
|
ToggleButtonComponent,
|
|
4782
|
-
ToggleButtonsListComponent
|
|
4834
|
+
ToggleButtonsListComponent,
|
|
4835
|
+
ContentTileComponent,
|
|
4836
|
+
ContentTileItemComponent,
|
|
4837
|
+
ContentTileHeaderComponent
|
|
4783
4838
|
]
|
|
4784
4839
|
}]
|
|
4785
4840
|
}] });
|
|
@@ -4790,5 +4845,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4790
4845
|
* Generated bundle index. Do not edit.
|
|
4791
4846
|
*/
|
|
4792
4847
|
|
|
4793
|
-
export { APP_LANGUAGES, APP_LINKS, APP_NOTIFICATIONS, AddressPipe, AuthCallbackComponent, AuthRenewComponent, AvatarInitialsComponent, BaseListComponent, BreadcrumbComponent, BreadcrumbItem, BreadcrumbRouteData, BreadcrumbService, ClickOutsideDirective, CollapsiblePanelComponent, ComboboxComponent, ComponentLoaderFactory, ContentTileComponent, ContentTileHeaderComponent, ContentTileItemComponent, DatepickerComponent, DefaultShellConfig, DropDownMenuComponent, DurationFormatPipe, ErrorComponent, ExternalNavLink, FormLayoutComponent, FragmentNavLink, HeaderMetaItem, Icons, IndiceComponentsModule, KpiTileComponent, LIBSTEPPER_ACCESSOR, LIBTABGROUP_ACCESSOR, LibStepComponent, LibStepInfoDirective, LibStepLabelDirective, LibStepperComponent, LibTabComponent, LibTabGroupComponent, LibTabLabelDirective, ListColumnComponent, ListDetailsSectionComponent, ListTileComponent, ListViewComponent, ListViewEmptyStateComponent, ListViewType, LoggedOutComponent, MODAL_CONFIG_DEFAULT_OVERRIDE, MenuOption, Modal, ModalOptions, ModalService, ModelViewLayoutComponent, NULL_TOAST, NavLink, NavLinksListComponent, NotificationNavLink, PageNotFoundComponent, PagerComponent, PagerPosition, RouterViewAction, SCREEN_SIZE, SHELL_CONFIG, ShellFooterComponent, ShellHeaderComponent, ShellLayoutComponent, ShellLayoutType, ShellSidebarComponent, ShellSidebarHeaderComponent, SidePaneComponent, SidePaneOverlayType, SidePaneSize, SideViewLayoutComponent, SkeletonLoaderComponent, StepState, StepperType, SwitchViewAction, ToastType, ToasterComponent, ToasterContainerComponent, ToasterService, ToggleButtonComponent, ToggleButtonsListComponent, ToggleComponent, UnauthorizedComponent, UserSettingsService, ViewAction, ViewLayoutComponent };
|
|
4848
|
+
export { APP_LANGUAGES, APP_LINKS, APP_NOTIFICATIONS, AddressPipe, AuthCallbackComponent, AuthRenewComponent, AvatarInitialsComponent, BaseListComponent, BreadcrumbComponent, BreadcrumbItem, BreadcrumbRouteData, BreadcrumbService, ClickOutsideDirective, CollapsiblePanelComponent, ComboboxComponent, ComponentLoaderFactory, ContentTileComponent, ContentTileHeaderComponent, ContentTileItemComponent, DatepickerComponent, DefaultShellConfig, DropDownMenuComponent, DurationFormatPipe, ErrorComponent, ExternalNavLink, FormLayoutComponent, FragmentNavLink, HeaderMetaItem, Icons, IndiceComponentsModule, KpiTileComponent, LIBSTEPPER_ACCESSOR, LIBTABGROUP_ACCESSOR, LibStepComponent, LibStepInfoDirective, LibStepLabelDirective, LibStepperComponent, LibTabComponent, LibTabGroupComponent, LibTabLabelDirective, ListColumnComponent, ListDetailsSectionComponent, ListTileComponent, ListViewComponent, ListViewEmptyStateComponent, ListViewType, LoggedOutComponent, MODAL_CONFIG_DEFAULT_OVERRIDE, MenuOption, Modal, ModalOptions, ModalService, ModelViewLayoutComponent, NULL_TOAST, NavLink, NavLinksListComponent, NotificationNavLink, PageNotFoundComponent, PagerComponent, PagerPosition, RouterViewAction, SCREEN_SIZE, SHELL_CONFIG, ShellFooterComponent, ShellHeaderComponent, ShellLayoutComponent, ShellLayoutType, ShellSidebarComponent, ShellSidebarHeaderComponent, ShortNumberPipe, SidePaneComponent, SidePaneOverlayType, SidePaneSize, SideViewLayoutComponent, SkeletonLoaderComponent, StepState, StepperType, SwitchViewAction, ToastType, ToasterComponent, ToasterContainerComponent, ToasterService, ToggleButtonComponent, ToggleButtonsListComponent, ToggleComponent, UnauthorizedComponent, UserSettingsService, ViewAction, ViewLayoutComponent };
|
|
4794
4849
|
//# sourceMappingURL=indice-ng-components.mjs.map
|