@indice/ng-components 0.2.173-beta.0 → 0.2.173-beta.10
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/controls/content-tile/content-tile-header/content-tile-header.component.mjs +17 -0
- package/esm2020/lib/controls/content-tile/content-tile-item/content-tile-item.component.mjs +17 -0
- package/esm2020/lib/controls/content-tile/content-tile.component.mjs +62 -0
- package/esm2020/lib/controls/progress-bar/progress-bar.component.mjs +36 -0
- package/esm2020/lib/controls/stats-grid/stats-grid.component.mjs +49 -0
- package/esm2020/lib/ng-components.module.mjs +35 -5
- package/esm2020/lib/pipes/short-number.pipe.mjs +43 -0
- package/esm2020/public-api.mjs +7 -1
- package/fesm2015/indice-ng-components.mjs +236 -5
- package/fesm2015/indice-ng-components.mjs.map +1 -1
- package/fesm2020/indice-ng-components.mjs +236 -5
- package/fesm2020/indice-ng-components.mjs.map +1 -1
- package/lib/controls/content-tile/content-tile-header/content-tile-header.component.d.ts +7 -0
- package/lib/controls/content-tile/content-tile-item/content-tile-item.component.d.ts +7 -0
- package/lib/controls/content-tile/content-tile.component.d.ts +23 -0
- package/lib/controls/progress-bar/progress-bar.component.d.ts +13 -0
- package/lib/controls/stats-grid/stats-grid.component.d.ts +16 -0
- package/lib/ng-components.module.d.ts +52 -46
- package/lib/pipes/short-number.pipe.d.ts +7 -0
- package/package.json +1 -1
- package/public-api.d.ts +6 -0
|
@@ -2548,6 +2548,172 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
2548
2548
|
type: Output
|
|
2549
2549
|
}] } });
|
|
2550
2550
|
|
|
2551
|
+
class ContentTileHeaderComponent {
|
|
2552
|
+
constructor() {
|
|
2553
|
+
this.template = undefined;
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
ContentTileHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2557
|
+
ContentTileHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.3", type: ContentTileHeaderComponent, selector: "lib-content-tile-header", queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
2558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileHeaderComponent, decorators: [{
|
|
2559
|
+
type: Component,
|
|
2560
|
+
args: [{ selector: 'lib-content-tile-header', template: '<ng-content></ng-content>' }]
|
|
2561
|
+
}], ctorParameters: function () { return []; }, propDecorators: { template: [{
|
|
2562
|
+
type: ContentChild,
|
|
2563
|
+
args: [TemplateRef]
|
|
2564
|
+
}] } });
|
|
2565
|
+
|
|
2566
|
+
class ContentTileItemComponent {
|
|
2567
|
+
constructor() {
|
|
2568
|
+
this.template = undefined;
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
ContentTileItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2572
|
+
ContentTileItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.3", type: ContentTileItemComponent, selector: "lib-content-tile-item", queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
2573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileItemComponent, decorators: [{
|
|
2574
|
+
type: Component,
|
|
2575
|
+
args: [{ selector: 'lib-content-tile-item', template: '<ng-content></ng-content>' }]
|
|
2576
|
+
}], ctorParameters: function () { return []; }, propDecorators: { template: [{
|
|
2577
|
+
type: ContentChild,
|
|
2578
|
+
args: [TemplateRef]
|
|
2579
|
+
}] } });
|
|
2580
|
+
|
|
2581
|
+
class ContentTileComponent {
|
|
2582
|
+
constructor(router) {
|
|
2583
|
+
this.router = router;
|
|
2584
|
+
this.title = undefined;
|
|
2585
|
+
this.busy = false;
|
|
2586
|
+
this.hideBtn = false;
|
|
2587
|
+
this.showFooter = true;
|
|
2588
|
+
this.actionText = 'Περισσότερα';
|
|
2589
|
+
// tslint:disable-next-line:no-output-rename
|
|
2590
|
+
this.tileAction = new EventEmitter();
|
|
2591
|
+
this.selectedIndex = 0;
|
|
2592
|
+
this.itemTemplates = [];
|
|
2593
|
+
this.header = undefined;
|
|
2594
|
+
}
|
|
2595
|
+
set items(refs) {
|
|
2596
|
+
if (refs) {
|
|
2597
|
+
this.itemTemplates = refs.toArray();
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
ngOnInit() {
|
|
2601
|
+
}
|
|
2602
|
+
emitTileAction($event) {
|
|
2603
|
+
$event.preventDefault();
|
|
2604
|
+
$event.stopPropagation();
|
|
2605
|
+
this.tileAction.emit($event);
|
|
2606
|
+
return false;
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
ContentTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
2610
|
+
ContentTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.3", type: ContentTileComponent, selector: "lib-content-tile", inputs: { title: "title", busy: "busy", hideBtn: "hideBtn", showFooter: ["show-footer", "showFooter"], actionText: ["action-text", "actionText"] }, outputs: { tileAction: "tile-action" }, queries: [{ propertyName: "header", first: true, predicate: ContentTileHeaderComponent, descendants: true }, { propertyName: "items", predicate: ContentTileItemComponent, read: ContentTileItemComponent }], ngImport: i0, template: "<div class=\"card\" [class.card-deck-busy]=\"busy\">\r\n <div class=\"card-body\">\r\n <div class=\"kpi-tile-title-container flex align-top\">\r\n <a *ngIf=\"!header\" href=\"#\"\r\n class=\"kpi-tile-action flex-1\" (click)=\"emitTileAction($event)\">{{title || '-'}}</a>\r\n <ng-container *ngIf=\"header\">\r\n <div class=\"flex-1\">\r\n <ng-template [ngTemplateOutlet]=\"header.template\"></ng-template>\r\n </div>\r\n </ng-container>\r\n <div *ngIf=\"actionText\" class=\"float-right align-top\">\r\n <a href=\"#\" class=\"text-xs\" (click)=\"emitTileAction($event)\">{{actionText}}</a>\r\n </div>\r\n </div>\r\n <div class=\"flex items-center\" *ngIf=\"itemTemplates\">\r\n <ng-template [ngTemplateOutlet]=\"itemTemplates[selectedIndex].template\"></ng-template>\r\n </div>\r\n <div class=\"tile-card-footer opacity-25 hover:opacity-75\" *ngIf=\"itemTemplates && itemTemplates.length>1\">\r\n <nav class=\"flex items-center justify-between px-4 sm:px-0\">\r\n <div class=\"flex w-0 flex-1\"></div>\r\n <div class=\"flex items-center justify-between px-2\">\r\n <ng-container *ngFor=\"let item of itemTemplates; index as i\">\r\n <button type=\"button\"\r\n (click)=\"selectedIndex=i\"\r\n [disabled]=\"selectedIndex===i\"\r\n class=\"inline-flex mx-1 items-center rounded-full border border-transparent p-1 text-white shadow-sm hover:bg-slate-700 focus:outline-none\"\r\n [class.bg-slate-500]=\"selectedIndex!==i\"\r\n [class.bg-slate-700]=\"selectedIndex===i\"\r\n [class.ring-slate-700]=\"selectedIndex===i\"\r\n [class.ring-offset-1]=\"selectedIndex===i\"\r\n [class.ring-1]=\"selectedIndex===i\">\r\n </button>\r\n </ng-container>\r\n </div>\r\n <div class=\"flex w-0 flex-1 justify-end\"></div>\r\n </nav>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
2611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileComponent, decorators: [{
|
|
2612
|
+
type: Component,
|
|
2613
|
+
args: [{ selector: 'lib-content-tile', template: "<div class=\"card\" [class.card-deck-busy]=\"busy\">\r\n <div class=\"card-body\">\r\n <div class=\"kpi-tile-title-container flex align-top\">\r\n <a *ngIf=\"!header\" href=\"#\"\r\n class=\"kpi-tile-action flex-1\" (click)=\"emitTileAction($event)\">{{title || '-'}}</a>\r\n <ng-container *ngIf=\"header\">\r\n <div class=\"flex-1\">\r\n <ng-template [ngTemplateOutlet]=\"header.template\"></ng-template>\r\n </div>\r\n </ng-container>\r\n <div *ngIf=\"actionText\" class=\"float-right align-top\">\r\n <a href=\"#\" class=\"text-xs\" (click)=\"emitTileAction($event)\">{{actionText}}</a>\r\n </div>\r\n </div>\r\n <div class=\"flex items-center\" *ngIf=\"itemTemplates\">\r\n <ng-template [ngTemplateOutlet]=\"itemTemplates[selectedIndex].template\"></ng-template>\r\n </div>\r\n <div class=\"tile-card-footer opacity-25 hover:opacity-75\" *ngIf=\"itemTemplates && itemTemplates.length>1\">\r\n <nav class=\"flex items-center justify-between px-4 sm:px-0\">\r\n <div class=\"flex w-0 flex-1\"></div>\r\n <div class=\"flex items-center justify-between px-2\">\r\n <ng-container *ngFor=\"let item of itemTemplates; index as i\">\r\n <button type=\"button\"\r\n (click)=\"selectedIndex=i\"\r\n [disabled]=\"selectedIndex===i\"\r\n class=\"inline-flex mx-1 items-center rounded-full border border-transparent p-1 text-white shadow-sm hover:bg-slate-700 focus:outline-none\"\r\n [class.bg-slate-500]=\"selectedIndex!==i\"\r\n [class.bg-slate-700]=\"selectedIndex===i\"\r\n [class.ring-slate-700]=\"selectedIndex===i\"\r\n [class.ring-offset-1]=\"selectedIndex===i\"\r\n [class.ring-1]=\"selectedIndex===i\">\r\n </button>\r\n </ng-container>\r\n </div>\r\n <div class=\"flex w-0 flex-1 justify-end\"></div>\r\n </nav>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
|
|
2614
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }]; }, propDecorators: { title: [{
|
|
2615
|
+
type: Input
|
|
2616
|
+
}], busy: [{
|
|
2617
|
+
type: Input
|
|
2618
|
+
}], hideBtn: [{
|
|
2619
|
+
type: Input
|
|
2620
|
+
}], showFooter: [{
|
|
2621
|
+
type: Input,
|
|
2622
|
+
args: ['show-footer']
|
|
2623
|
+
}], actionText: [{
|
|
2624
|
+
type: Input,
|
|
2625
|
+
args: ['action-text']
|
|
2626
|
+
}], tileAction: [{
|
|
2627
|
+
type: Output,
|
|
2628
|
+
args: ['tile-action']
|
|
2629
|
+
}], items: [{
|
|
2630
|
+
type: ContentChildren,
|
|
2631
|
+
args: [ContentTileItemComponent, { read: ContentTileItemComponent }]
|
|
2632
|
+
}], header: [{
|
|
2633
|
+
type: ContentChild,
|
|
2634
|
+
args: [ContentTileHeaderComponent]
|
|
2635
|
+
}] } });
|
|
2636
|
+
|
|
2637
|
+
class StatsGridComponent {
|
|
2638
|
+
constructor() {
|
|
2639
|
+
this.busy = false;
|
|
2640
|
+
this.count = 6;
|
|
2641
|
+
this.loader = ['', '', '', '', '', ''];
|
|
2642
|
+
this.mode = 'normal';
|
|
2643
|
+
this.labels = ['Online', 'Offline', 'Faulted'];
|
|
2644
|
+
this.values = [10, 20, 30];
|
|
2645
|
+
this.colors = [
|
|
2646
|
+
'rgb(53, 177, 201, 0.6)',
|
|
2647
|
+
'rgb(168, 162, 158, 0.2)',
|
|
2648
|
+
'rgb(233, 96, 96, 0.8)'
|
|
2649
|
+
];
|
|
2650
|
+
}
|
|
2651
|
+
ngOnChanges(changes) {
|
|
2652
|
+
if (changes.count) {
|
|
2653
|
+
this.loader = [];
|
|
2654
|
+
for (let i = 0; i <= this.count; i++) {
|
|
2655
|
+
this.loader.push('');
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
isNumber(value) {
|
|
2660
|
+
return !isNaN(Number(value));
|
|
2661
|
+
;
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
StatsGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: StatsGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2665
|
+
StatsGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.3", type: StatsGridComponent, selector: "lib-stats-grid", inputs: { busy: "busy", count: "count", mode: "mode", labels: "labels", values: "values", colors: "colors" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!busy\">\n <ul role=\"list\" class=\"grid gap-1\"\n [class.grid-cols-3]=\"mode==='normal'\"\n [class.grid-cols-5]=\"mode!=='normal'\"\n [class.grid-flow-col]=\"mode!=='normal'\">\n <ng-container *ngFor=\"let value of values; index as i\">\n <li class=\"col-span-1 flex pb-2\" *ngIf=\"mode==='normal'\">\n <div class=\"grid-cols-1 border-l-2 px-1\" [style]=\"'border-color:' + colors[i]\">\n <div class=\"text-xs text-ellipsis overflow-hidden\">{{labels[i]}}</div>\n <div *ngIf=\"isNumber(values[i])\" class=\"font-medium text-sm md:text-lg text-ellipsis overflow-hidden\">{{values[i] | number:'1.0-2':'el'}}</div>\n <div *ngIf=\"!isNumber(values[i])\" class=\"font-medium text-sm md:text-lg text-ellipsis overflow-hidden\">{{values[i]}}</div>\n </div>\n </li>\n <li class=\"col-span-1 flex pb-2\" *ngIf=\"mode!=='normal'\">\n <div class=\"grid-cols-1 border-l-2 pl-1 pr-2\" [style]=\"'border-color:' + colors[i]\">\n <div *ngIf=\"isNumber(values[i])\" class=\"font-medium text-xs lg:text-sm text-ellipsis overflow-hidden\">{{values[i] | number:'1.0-2':'el'}}</div>\n <div *ngIf=\"!isNumber(values[i])\" class=\"font-medium text-xs lg:text-sm text-ellipsis overflow-hidden\">{{values[i]}}</div>\n <div class=\"text-xs max-w-18 lg:w-auto truncate text-ellipsis overflow-hidden\">{{labels[i]}}</div>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n <div *ngIf=\"busy\">\n <ul role=\"list\" class=\"grid gap-1\"\n [class.grid-cols-3]=\"mode==='normal'\"\n [class.grid-cols-5]=\"mode!=='normal'\"\n [class.grid-flow-col]=\"mode!=='normal'\">\n <ng-container *ngFor=\"let value of values; index as i\">\n <li class=\"animate-pulse col-span-1 flex pb-2\" *ngIf=\"mode==='normal'\">\n <div class=\"grid-cols-1 border-l-2 px-1\" style=\"border-color:rgb(168, 162, 158, 0.2)\">\n <div class=\"rounded-md bg-slate-400/25 h-3 w-14\"></div>\n <div class=\"rounded-md bg-slate-400/25 mt-2 h-4 w-6\"></div>\n </div>\n </li>\n <li class=\"animate-pulse col-span-1 flex pb-2\" *ngIf=\"mode!=='normal'\">\n <div class=\"grid-cols-1 border-l-2 pl-1 pr-2\" style=\"border-color:rgb(168, 162, 158, 0.2)\">\n <div class=\"rounded-md bg-slate-400/25 h-3 w-14\"></div>\n <div class=\"rounded-md bg-slate-400/25 mt-2 h-4 w-6\"></div>\n </div>\n </li>\n </ng-container>\n </ul>\n </div> ", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] });
|
|
2666
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: StatsGridComponent, decorators: [{
|
|
2667
|
+
type: Component,
|
|
2668
|
+
args: [{ selector: 'lib-stats-grid', template: "<div *ngIf=\"!busy\">\n <ul role=\"list\" class=\"grid gap-1\"\n [class.grid-cols-3]=\"mode==='normal'\"\n [class.grid-cols-5]=\"mode!=='normal'\"\n [class.grid-flow-col]=\"mode!=='normal'\">\n <ng-container *ngFor=\"let value of values; index as i\">\n <li class=\"col-span-1 flex pb-2\" *ngIf=\"mode==='normal'\">\n <div class=\"grid-cols-1 border-l-2 px-1\" [style]=\"'border-color:' + colors[i]\">\n <div class=\"text-xs text-ellipsis overflow-hidden\">{{labels[i]}}</div>\n <div *ngIf=\"isNumber(values[i])\" class=\"font-medium text-sm md:text-lg text-ellipsis overflow-hidden\">{{values[i] | number:'1.0-2':'el'}}</div>\n <div *ngIf=\"!isNumber(values[i])\" class=\"font-medium text-sm md:text-lg text-ellipsis overflow-hidden\">{{values[i]}}</div>\n </div>\n </li>\n <li class=\"col-span-1 flex pb-2\" *ngIf=\"mode!=='normal'\">\n <div class=\"grid-cols-1 border-l-2 pl-1 pr-2\" [style]=\"'border-color:' + colors[i]\">\n <div *ngIf=\"isNumber(values[i])\" class=\"font-medium text-xs lg:text-sm text-ellipsis overflow-hidden\">{{values[i] | number:'1.0-2':'el'}}</div>\n <div *ngIf=\"!isNumber(values[i])\" class=\"font-medium text-xs lg:text-sm text-ellipsis overflow-hidden\">{{values[i]}}</div>\n <div class=\"text-xs max-w-18 lg:w-auto truncate text-ellipsis overflow-hidden\">{{labels[i]}}</div>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n <div *ngIf=\"busy\">\n <ul role=\"list\" class=\"grid gap-1\"\n [class.grid-cols-3]=\"mode==='normal'\"\n [class.grid-cols-5]=\"mode!=='normal'\"\n [class.grid-flow-col]=\"mode!=='normal'\">\n <ng-container *ngFor=\"let value of values; index as i\">\n <li class=\"animate-pulse col-span-1 flex pb-2\" *ngIf=\"mode==='normal'\">\n <div class=\"grid-cols-1 border-l-2 px-1\" style=\"border-color:rgb(168, 162, 158, 0.2)\">\n <div class=\"rounded-md bg-slate-400/25 h-3 w-14\"></div>\n <div class=\"rounded-md bg-slate-400/25 mt-2 h-4 w-6\"></div>\n </div>\n </li>\n <li class=\"animate-pulse col-span-1 flex pb-2\" *ngIf=\"mode!=='normal'\">\n <div class=\"grid-cols-1 border-l-2 pl-1 pr-2\" style=\"border-color:rgb(168, 162, 158, 0.2)\">\n <div class=\"rounded-md bg-slate-400/25 h-3 w-14\"></div>\n <div class=\"rounded-md bg-slate-400/25 mt-2 h-4 w-6\"></div>\n </div>\n </li>\n </ng-container>\n </ul>\n </div> " }]
|
|
2669
|
+
}], ctorParameters: function () { return []; }, propDecorators: { busy: [{
|
|
2670
|
+
type: Input
|
|
2671
|
+
}], count: [{
|
|
2672
|
+
type: Input
|
|
2673
|
+
}], mode: [{
|
|
2674
|
+
type: Input
|
|
2675
|
+
}], labels: [{
|
|
2676
|
+
type: Input
|
|
2677
|
+
}], values: [{
|
|
2678
|
+
type: Input
|
|
2679
|
+
}], colors: [{
|
|
2680
|
+
type: Input
|
|
2681
|
+
}] } });
|
|
2682
|
+
|
|
2683
|
+
class ProgressBarComponent {
|
|
2684
|
+
constructor() {
|
|
2685
|
+
this.value = 0;
|
|
2686
|
+
this.total = 0;
|
|
2687
|
+
this.text = undefined;
|
|
2688
|
+
this.percentage = 0;
|
|
2689
|
+
}
|
|
2690
|
+
ngOnChanges(changes) {
|
|
2691
|
+
if (changes.value || changes.total) {
|
|
2692
|
+
this.calcPercentage();
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
calcPercentage() {
|
|
2696
|
+
if (this.total > 0) {
|
|
2697
|
+
this.percentage = (this.value / this.total) * 100;
|
|
2698
|
+
}
|
|
2699
|
+
else {
|
|
2700
|
+
this.percentage = 0;
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2705
|
+
ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.3", type: ProgressBarComponent, selector: "lib-progress-bar", inputs: { value: "value", total: "total", text: "text" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"flex grid grid-cols-1\">\n <div class=\"text-xs mt-2 truncate text-ellipsis\">{{value}}/{{total}} {{text}}</div>\n <div class=\"flex mt-1 h-4 rounded-md backdrop-blur-sm bg-slate-200/25\">\n <div class=\"h-2 m-1 rounded-md bg-sky-200 transition-[width] ease duration-300 transform\" [style]=\"'width:' + percentage + '%' \"></div>\n </div>\n </div>\n " });
|
|
2706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
2707
|
+
type: Component,
|
|
2708
|
+
args: [{ selector: 'lib-progress-bar', template: "<div class=\"flex grid grid-cols-1\">\n <div class=\"text-xs mt-2 truncate text-ellipsis\">{{value}}/{{total}} {{text}}</div>\n <div class=\"flex mt-1 h-4 rounded-md backdrop-blur-sm bg-slate-200/25\">\n <div class=\"h-2 m-1 rounded-md bg-sky-200 transition-[width] ease duration-300 transform\" [style]=\"'width:' + percentage + '%' \"></div>\n </div>\n </div>\n " }]
|
|
2709
|
+
}], ctorParameters: function () { return []; }, propDecorators: { value: [{
|
|
2710
|
+
type: Input
|
|
2711
|
+
}], total: [{
|
|
2712
|
+
type: Input
|
|
2713
|
+
}], text: [{
|
|
2714
|
+
type: Input
|
|
2715
|
+
}] } });
|
|
2716
|
+
|
|
2551
2717
|
class DynamicComponentHostDirective {
|
|
2552
2718
|
constructor(viewContainerRef) {
|
|
2553
2719
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -3889,6 +4055,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
3889
4055
|
}]
|
|
3890
4056
|
}] });
|
|
3891
4057
|
|
|
4058
|
+
class ShortNumberPipe {
|
|
4059
|
+
transform(number, args) {
|
|
4060
|
+
if (isNaN(number))
|
|
4061
|
+
return null; // will only work value is a number
|
|
4062
|
+
if (number === null)
|
|
4063
|
+
return null;
|
|
4064
|
+
if (number === 0)
|
|
4065
|
+
return null;
|
|
4066
|
+
let abs = Math.abs(number);
|
|
4067
|
+
const rounder = Math.pow(10, 1);
|
|
4068
|
+
const isNegative = number < 0; // will also work for Negative numbers
|
|
4069
|
+
let key = '';
|
|
4070
|
+
const powers = [
|
|
4071
|
+
{ key: 'Q', value: Math.pow(10, 15) },
|
|
4072
|
+
{ key: 'T', value: Math.pow(10, 12) },
|
|
4073
|
+
{ key: 'B', value: Math.pow(10, 9) },
|
|
4074
|
+
{ key: 'M', value: Math.pow(10, 6) },
|
|
4075
|
+
{ key: 'K', value: 1000 }
|
|
4076
|
+
];
|
|
4077
|
+
for (let i = 0; i < powers.length; i++) {
|
|
4078
|
+
let reduced = abs / powers[i].value;
|
|
4079
|
+
reduced = Math.round(reduced * rounder) / rounder;
|
|
4080
|
+
if (reduced >= 1) {
|
|
4081
|
+
abs = reduced;
|
|
4082
|
+
key = powers[i].key;
|
|
4083
|
+
break;
|
|
4084
|
+
}
|
|
4085
|
+
}
|
|
4086
|
+
return (isNegative ? '-' : '') + abs + key;
|
|
4087
|
+
}
|
|
4088
|
+
}
|
|
4089
|
+
ShortNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ShortNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4090
|
+
ShortNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.3", ngImport: i0, type: ShortNumberPipe, name: "shortNumber", pure: false });
|
|
4091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ShortNumberPipe, decorators: [{
|
|
4092
|
+
type: Pipe,
|
|
4093
|
+
args: [{
|
|
4094
|
+
name: 'shortNumber',
|
|
4095
|
+
pure: false
|
|
4096
|
+
}]
|
|
4097
|
+
}] });
|
|
4098
|
+
|
|
3892
4099
|
class BaseListComponent {
|
|
3893
4100
|
constructor(route$, router$) {
|
|
3894
4101
|
this.route$ = route$;
|
|
@@ -4580,6 +4787,7 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4580
4787
|
DatepickerComponent,
|
|
4581
4788
|
DropDownMenuComponent,
|
|
4582
4789
|
DurationFormatPipe,
|
|
4790
|
+
ShortNumberPipe,
|
|
4583
4791
|
DynamicComponentHostDirective,
|
|
4584
4792
|
ErrorComponent,
|
|
4585
4793
|
FormLayoutComponent,
|
|
@@ -4620,7 +4828,12 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4620
4828
|
UserProfileMenuComponent,
|
|
4621
4829
|
ViewLayoutComponent,
|
|
4622
4830
|
ToggleButtonComponent,
|
|
4623
|
-
ToggleButtonsListComponent
|
|
4831
|
+
ToggleButtonsListComponent,
|
|
4832
|
+
ContentTileComponent,
|
|
4833
|
+
ContentTileItemComponent,
|
|
4834
|
+
ContentTileHeaderComponent,
|
|
4835
|
+
StatsGridComponent,
|
|
4836
|
+
ProgressBarComponent], imports: [CommonModule,
|
|
4624
4837
|
RouterModule,
|
|
4625
4838
|
IndiceAuthModule,
|
|
4626
4839
|
FormsModule], exports: [AddressPipe,
|
|
@@ -4634,6 +4847,7 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4634
4847
|
DatepickerComponent,
|
|
4635
4848
|
DropDownMenuComponent,
|
|
4636
4849
|
DurationFormatPipe,
|
|
4850
|
+
ShortNumberPipe,
|
|
4637
4851
|
ErrorComponent,
|
|
4638
4852
|
FormLayoutComponent,
|
|
4639
4853
|
KpiTileComponent,
|
|
@@ -4665,7 +4879,12 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4665
4879
|
UnauthorizedComponent,
|
|
4666
4880
|
ViewLayoutComponent,
|
|
4667
4881
|
ToggleButtonComponent,
|
|
4668
|
-
ToggleButtonsListComponent
|
|
4882
|
+
ToggleButtonsListComponent,
|
|
4883
|
+
ContentTileComponent,
|
|
4884
|
+
ContentTileItemComponent,
|
|
4885
|
+
ContentTileHeaderComponent,
|
|
4886
|
+
StatsGridComponent,
|
|
4887
|
+
ProgressBarComponent] });
|
|
4669
4888
|
IndiceComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: IndiceComponentsModule, imports: [CommonModule,
|
|
4670
4889
|
RouterModule,
|
|
4671
4890
|
IndiceAuthModule,
|
|
@@ -4686,6 +4905,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4686
4905
|
DatepickerComponent,
|
|
4687
4906
|
DropDownMenuComponent,
|
|
4688
4907
|
DurationFormatPipe,
|
|
4908
|
+
ShortNumberPipe,
|
|
4689
4909
|
DynamicComponentHostDirective,
|
|
4690
4910
|
ErrorComponent,
|
|
4691
4911
|
FormLayoutComponent,
|
|
@@ -4726,7 +4946,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4726
4946
|
UserProfileMenuComponent,
|
|
4727
4947
|
ViewLayoutComponent,
|
|
4728
4948
|
ToggleButtonComponent,
|
|
4729
|
-
ToggleButtonsListComponent
|
|
4949
|
+
ToggleButtonsListComponent,
|
|
4950
|
+
ContentTileComponent,
|
|
4951
|
+
ContentTileItemComponent,
|
|
4952
|
+
ContentTileHeaderComponent,
|
|
4953
|
+
StatsGridComponent,
|
|
4954
|
+
ProgressBarComponent
|
|
4730
4955
|
],
|
|
4731
4956
|
imports: [
|
|
4732
4957
|
CommonModule,
|
|
@@ -4746,6 +4971,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4746
4971
|
DatepickerComponent,
|
|
4747
4972
|
DropDownMenuComponent,
|
|
4748
4973
|
DurationFormatPipe,
|
|
4974
|
+
ShortNumberPipe,
|
|
4749
4975
|
ErrorComponent,
|
|
4750
4976
|
FormLayoutComponent,
|
|
4751
4977
|
KpiTileComponent,
|
|
@@ -4777,7 +5003,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4777
5003
|
UnauthorizedComponent,
|
|
4778
5004
|
ViewLayoutComponent,
|
|
4779
5005
|
ToggleButtonComponent,
|
|
4780
|
-
ToggleButtonsListComponent
|
|
5006
|
+
ToggleButtonsListComponent,
|
|
5007
|
+
ContentTileComponent,
|
|
5008
|
+
ContentTileItemComponent,
|
|
5009
|
+
ContentTileHeaderComponent,
|
|
5010
|
+
StatsGridComponent,
|
|
5011
|
+
ProgressBarComponent
|
|
4781
5012
|
]
|
|
4782
5013
|
}]
|
|
4783
5014
|
}] });
|
|
@@ -4788,5 +5019,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4788
5019
|
* Generated bundle index. Do not edit.
|
|
4789
5020
|
*/
|
|
4790
5021
|
|
|
4791
|
-
export { APP_LANGUAGES, APP_LINKS, APP_NOTIFICATIONS, AddressPipe, AuthCallbackComponent, AuthRenewComponent, AvatarInitialsComponent, BaseListComponent, BreadcrumbComponent, BreadcrumbItem, BreadcrumbRouteData, BreadcrumbService, ClickOutsideDirective, CollapsiblePanelComponent, ComboboxComponent, ComponentLoaderFactory, 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 };
|
|
5022
|
+
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, ProgressBarComponent, RouterViewAction, SCREEN_SIZE, SHELL_CONFIG, ShellFooterComponent, ShellHeaderComponent, ShellLayoutComponent, ShellLayoutType, ShellSidebarComponent, ShellSidebarHeaderComponent, ShortNumberPipe, SidePaneComponent, SidePaneOverlayType, SidePaneSize, SideViewLayoutComponent, SkeletonLoaderComponent, StatsGridComponent, StepState, StepperType, SwitchViewAction, ToastType, ToasterComponent, ToasterContainerComponent, ToasterService, ToggleButtonComponent, ToggleButtonsListComponent, ToggleComponent, UnauthorizedComponent, UserSettingsService, ViewAction, ViewLayoutComponent };
|
|
4792
5023
|
//# sourceMappingURL=indice-ng-components.mjs.map
|