@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
|
@@ -2506,6 +2506,172 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
2506
2506
|
type: Output
|
|
2507
2507
|
}] } });
|
|
2508
2508
|
|
|
2509
|
+
class ContentTileHeaderComponent {
|
|
2510
|
+
constructor() {
|
|
2511
|
+
this.template = undefined;
|
|
2512
|
+
}
|
|
2513
|
+
}
|
|
2514
|
+
ContentTileHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2515
|
+
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 });
|
|
2516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileHeaderComponent, decorators: [{
|
|
2517
|
+
type: Component,
|
|
2518
|
+
args: [{ selector: 'lib-content-tile-header', template: '<ng-content></ng-content>' }]
|
|
2519
|
+
}], ctorParameters: function () { return []; }, propDecorators: { template: [{
|
|
2520
|
+
type: ContentChild,
|
|
2521
|
+
args: [TemplateRef]
|
|
2522
|
+
}] } });
|
|
2523
|
+
|
|
2524
|
+
class ContentTileItemComponent {
|
|
2525
|
+
constructor() {
|
|
2526
|
+
this.template = undefined;
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
ContentTileItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2530
|
+
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 });
|
|
2531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileItemComponent, decorators: [{
|
|
2532
|
+
type: Component,
|
|
2533
|
+
args: [{ selector: 'lib-content-tile-item', template: '<ng-content></ng-content>' }]
|
|
2534
|
+
}], ctorParameters: function () { return []; }, propDecorators: { template: [{
|
|
2535
|
+
type: ContentChild,
|
|
2536
|
+
args: [TemplateRef]
|
|
2537
|
+
}] } });
|
|
2538
|
+
|
|
2539
|
+
class ContentTileComponent {
|
|
2540
|
+
constructor(router) {
|
|
2541
|
+
this.router = router;
|
|
2542
|
+
this.title = undefined;
|
|
2543
|
+
this.busy = false;
|
|
2544
|
+
this.hideBtn = false;
|
|
2545
|
+
this.showFooter = true;
|
|
2546
|
+
this.actionText = 'Περισσότερα';
|
|
2547
|
+
// tslint:disable-next-line:no-output-rename
|
|
2548
|
+
this.tileAction = new EventEmitter();
|
|
2549
|
+
this.selectedIndex = 0;
|
|
2550
|
+
this.itemTemplates = [];
|
|
2551
|
+
this.header = undefined;
|
|
2552
|
+
}
|
|
2553
|
+
set items(refs) {
|
|
2554
|
+
if (refs) {
|
|
2555
|
+
this.itemTemplates = refs.toArray();
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
ngOnInit() {
|
|
2559
|
+
}
|
|
2560
|
+
emitTileAction($event) {
|
|
2561
|
+
$event.preventDefault();
|
|
2562
|
+
$event.stopPropagation();
|
|
2563
|
+
this.tileAction.emit($event);
|
|
2564
|
+
return false;
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
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 });
|
|
2568
|
+
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"] }] });
|
|
2569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ContentTileComponent, decorators: [{
|
|
2570
|
+
type: Component,
|
|
2571
|
+
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" }]
|
|
2572
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }]; }, propDecorators: { title: [{
|
|
2573
|
+
type: Input
|
|
2574
|
+
}], busy: [{
|
|
2575
|
+
type: Input
|
|
2576
|
+
}], hideBtn: [{
|
|
2577
|
+
type: Input
|
|
2578
|
+
}], showFooter: [{
|
|
2579
|
+
type: Input,
|
|
2580
|
+
args: ['show-footer']
|
|
2581
|
+
}], actionText: [{
|
|
2582
|
+
type: Input,
|
|
2583
|
+
args: ['action-text']
|
|
2584
|
+
}], tileAction: [{
|
|
2585
|
+
type: Output,
|
|
2586
|
+
args: ['tile-action']
|
|
2587
|
+
}], items: [{
|
|
2588
|
+
type: ContentChildren,
|
|
2589
|
+
args: [ContentTileItemComponent, { read: ContentTileItemComponent }]
|
|
2590
|
+
}], header: [{
|
|
2591
|
+
type: ContentChild,
|
|
2592
|
+
args: [ContentTileHeaderComponent]
|
|
2593
|
+
}] } });
|
|
2594
|
+
|
|
2595
|
+
class StatsGridComponent {
|
|
2596
|
+
constructor() {
|
|
2597
|
+
this.busy = false;
|
|
2598
|
+
this.count = 6;
|
|
2599
|
+
this.loader = ['', '', '', '', '', ''];
|
|
2600
|
+
this.mode = 'normal';
|
|
2601
|
+
this.labels = ['Online', 'Offline', 'Faulted'];
|
|
2602
|
+
this.values = [10, 20, 30];
|
|
2603
|
+
this.colors = [
|
|
2604
|
+
'rgb(53, 177, 201, 0.6)',
|
|
2605
|
+
'rgb(168, 162, 158, 0.2)',
|
|
2606
|
+
'rgb(233, 96, 96, 0.8)'
|
|
2607
|
+
];
|
|
2608
|
+
}
|
|
2609
|
+
ngOnChanges(changes) {
|
|
2610
|
+
if (changes.count) {
|
|
2611
|
+
this.loader = [];
|
|
2612
|
+
for (let i = 0; i <= this.count; i++) {
|
|
2613
|
+
this.loader.push('');
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
isNumber(value) {
|
|
2618
|
+
return !isNaN(Number(value));
|
|
2619
|
+
;
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
StatsGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: StatsGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2623
|
+
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" }] });
|
|
2624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: StatsGridComponent, decorators: [{
|
|
2625
|
+
type: Component,
|
|
2626
|
+
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> " }]
|
|
2627
|
+
}], ctorParameters: function () { return []; }, propDecorators: { busy: [{
|
|
2628
|
+
type: Input
|
|
2629
|
+
}], count: [{
|
|
2630
|
+
type: Input
|
|
2631
|
+
}], mode: [{
|
|
2632
|
+
type: Input
|
|
2633
|
+
}], labels: [{
|
|
2634
|
+
type: Input
|
|
2635
|
+
}], values: [{
|
|
2636
|
+
type: Input
|
|
2637
|
+
}], colors: [{
|
|
2638
|
+
type: Input
|
|
2639
|
+
}] } });
|
|
2640
|
+
|
|
2641
|
+
class ProgressBarComponent {
|
|
2642
|
+
constructor() {
|
|
2643
|
+
this.value = 0;
|
|
2644
|
+
this.total = 0;
|
|
2645
|
+
this.text = undefined;
|
|
2646
|
+
this.percentage = 0;
|
|
2647
|
+
}
|
|
2648
|
+
ngOnChanges(changes) {
|
|
2649
|
+
if (changes.value || changes.total) {
|
|
2650
|
+
this.calcPercentage();
|
|
2651
|
+
}
|
|
2652
|
+
}
|
|
2653
|
+
calcPercentage() {
|
|
2654
|
+
if (this.total > 0) {
|
|
2655
|
+
this.percentage = (this.value / this.total) * 100;
|
|
2656
|
+
}
|
|
2657
|
+
else {
|
|
2658
|
+
this.percentage = 0;
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
}
|
|
2662
|
+
ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2663
|
+
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 " });
|
|
2664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
2665
|
+
type: Component,
|
|
2666
|
+
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 " }]
|
|
2667
|
+
}], ctorParameters: function () { return []; }, propDecorators: { value: [{
|
|
2668
|
+
type: Input
|
|
2669
|
+
}], total: [{
|
|
2670
|
+
type: Input
|
|
2671
|
+
}], text: [{
|
|
2672
|
+
type: Input
|
|
2673
|
+
}] } });
|
|
2674
|
+
|
|
2509
2675
|
class DynamicComponentHostDirective {
|
|
2510
2676
|
constructor(viewContainerRef) {
|
|
2511
2677
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -3809,6 +3975,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
3809
3975
|
}]
|
|
3810
3976
|
}] });
|
|
3811
3977
|
|
|
3978
|
+
class ShortNumberPipe {
|
|
3979
|
+
transform(number, args) {
|
|
3980
|
+
if (isNaN(number))
|
|
3981
|
+
return null; // will only work value is a number
|
|
3982
|
+
if (number === null)
|
|
3983
|
+
return null;
|
|
3984
|
+
if (number === 0)
|
|
3985
|
+
return null;
|
|
3986
|
+
let abs = Math.abs(number);
|
|
3987
|
+
const rounder = Math.pow(10, 1);
|
|
3988
|
+
const isNegative = number < 0; // will also work for Negative numbers
|
|
3989
|
+
let key = '';
|
|
3990
|
+
const powers = [
|
|
3991
|
+
{ key: 'Q', value: Math.pow(10, 15) },
|
|
3992
|
+
{ key: 'T', value: Math.pow(10, 12) },
|
|
3993
|
+
{ key: 'B', value: Math.pow(10, 9) },
|
|
3994
|
+
{ key: 'M', value: Math.pow(10, 6) },
|
|
3995
|
+
{ key: 'K', value: 1000 }
|
|
3996
|
+
];
|
|
3997
|
+
for (let i = 0; i < powers.length; i++) {
|
|
3998
|
+
let reduced = abs / powers[i].value;
|
|
3999
|
+
reduced = Math.round(reduced * rounder) / rounder;
|
|
4000
|
+
if (reduced >= 1) {
|
|
4001
|
+
abs = reduced;
|
|
4002
|
+
key = powers[i].key;
|
|
4003
|
+
break;
|
|
4004
|
+
}
|
|
4005
|
+
}
|
|
4006
|
+
return (isNegative ? '-' : '') + abs + key;
|
|
4007
|
+
}
|
|
4008
|
+
}
|
|
4009
|
+
ShortNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ShortNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4010
|
+
ShortNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.3", ngImport: i0, type: ShortNumberPipe, name: "shortNumber", pure: false });
|
|
4011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: ShortNumberPipe, decorators: [{
|
|
4012
|
+
type: Pipe,
|
|
4013
|
+
args: [{
|
|
4014
|
+
name: 'shortNumber',
|
|
4015
|
+
pure: false
|
|
4016
|
+
}]
|
|
4017
|
+
}] });
|
|
4018
|
+
|
|
3812
4019
|
class BaseListComponent {
|
|
3813
4020
|
constructor(route$, router$) {
|
|
3814
4021
|
this.route$ = route$;
|
|
@@ -4494,6 +4701,7 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4494
4701
|
DatepickerComponent,
|
|
4495
4702
|
DropDownMenuComponent,
|
|
4496
4703
|
DurationFormatPipe,
|
|
4704
|
+
ShortNumberPipe,
|
|
4497
4705
|
DynamicComponentHostDirective,
|
|
4498
4706
|
ErrorComponent,
|
|
4499
4707
|
FormLayoutComponent,
|
|
@@ -4534,7 +4742,12 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4534
4742
|
UserProfileMenuComponent,
|
|
4535
4743
|
ViewLayoutComponent,
|
|
4536
4744
|
ToggleButtonComponent,
|
|
4537
|
-
ToggleButtonsListComponent
|
|
4745
|
+
ToggleButtonsListComponent,
|
|
4746
|
+
ContentTileComponent,
|
|
4747
|
+
ContentTileItemComponent,
|
|
4748
|
+
ContentTileHeaderComponent,
|
|
4749
|
+
StatsGridComponent,
|
|
4750
|
+
ProgressBarComponent], imports: [CommonModule,
|
|
4538
4751
|
RouterModule,
|
|
4539
4752
|
IndiceAuthModule,
|
|
4540
4753
|
FormsModule], exports: [AddressPipe,
|
|
@@ -4548,6 +4761,7 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4548
4761
|
DatepickerComponent,
|
|
4549
4762
|
DropDownMenuComponent,
|
|
4550
4763
|
DurationFormatPipe,
|
|
4764
|
+
ShortNumberPipe,
|
|
4551
4765
|
ErrorComponent,
|
|
4552
4766
|
FormLayoutComponent,
|
|
4553
4767
|
KpiTileComponent,
|
|
@@ -4579,7 +4793,12 @@ IndiceComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
4579
4793
|
UnauthorizedComponent,
|
|
4580
4794
|
ViewLayoutComponent,
|
|
4581
4795
|
ToggleButtonComponent,
|
|
4582
|
-
ToggleButtonsListComponent
|
|
4796
|
+
ToggleButtonsListComponent,
|
|
4797
|
+
ContentTileComponent,
|
|
4798
|
+
ContentTileItemComponent,
|
|
4799
|
+
ContentTileHeaderComponent,
|
|
4800
|
+
StatsGridComponent,
|
|
4801
|
+
ProgressBarComponent] });
|
|
4583
4802
|
IndiceComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: IndiceComponentsModule, imports: [CommonModule,
|
|
4584
4803
|
RouterModule,
|
|
4585
4804
|
IndiceAuthModule,
|
|
@@ -4600,6 +4819,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4600
4819
|
DatepickerComponent,
|
|
4601
4820
|
DropDownMenuComponent,
|
|
4602
4821
|
DurationFormatPipe,
|
|
4822
|
+
ShortNumberPipe,
|
|
4603
4823
|
DynamicComponentHostDirective,
|
|
4604
4824
|
ErrorComponent,
|
|
4605
4825
|
FormLayoutComponent,
|
|
@@ -4640,7 +4860,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4640
4860
|
UserProfileMenuComponent,
|
|
4641
4861
|
ViewLayoutComponent,
|
|
4642
4862
|
ToggleButtonComponent,
|
|
4643
|
-
ToggleButtonsListComponent
|
|
4863
|
+
ToggleButtonsListComponent,
|
|
4864
|
+
ContentTileComponent,
|
|
4865
|
+
ContentTileItemComponent,
|
|
4866
|
+
ContentTileHeaderComponent,
|
|
4867
|
+
StatsGridComponent,
|
|
4868
|
+
ProgressBarComponent
|
|
4644
4869
|
],
|
|
4645
4870
|
imports: [
|
|
4646
4871
|
CommonModule,
|
|
@@ -4660,6 +4885,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4660
4885
|
DatepickerComponent,
|
|
4661
4886
|
DropDownMenuComponent,
|
|
4662
4887
|
DurationFormatPipe,
|
|
4888
|
+
ShortNumberPipe,
|
|
4663
4889
|
ErrorComponent,
|
|
4664
4890
|
FormLayoutComponent,
|
|
4665
4891
|
KpiTileComponent,
|
|
@@ -4691,7 +4917,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4691
4917
|
UnauthorizedComponent,
|
|
4692
4918
|
ViewLayoutComponent,
|
|
4693
4919
|
ToggleButtonComponent,
|
|
4694
|
-
ToggleButtonsListComponent
|
|
4920
|
+
ToggleButtonsListComponent,
|
|
4921
|
+
ContentTileComponent,
|
|
4922
|
+
ContentTileItemComponent,
|
|
4923
|
+
ContentTileHeaderComponent,
|
|
4924
|
+
StatsGridComponent,
|
|
4925
|
+
ProgressBarComponent
|
|
4695
4926
|
]
|
|
4696
4927
|
}]
|
|
4697
4928
|
}] });
|
|
@@ -4702,5 +4933,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImpor
|
|
|
4702
4933
|
* Generated bundle index. Do not edit.
|
|
4703
4934
|
*/
|
|
4704
4935
|
|
|
4705
|
-
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 };
|
|
4936
|
+
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 };
|
|
4706
4937
|
//# sourceMappingURL=indice-ng-components.mjs.map
|