ng-prime-tools 1.0.23 → 1.0.25
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/README.md +9 -0
- package/esm2022/lib/models/chart-config.model.mjs +1 -1
- package/esm2022/lib/models/metric-indicateur-data.model.mjs +2 -0
- package/esm2022/lib/models/metric-panel-data.model.mjs +2 -0
- package/esm2022/lib/models/public-api.mjs +3 -1
- package/esm2022/lib/pt-chart-comparison/index.mjs +2 -0
- package/esm2022/lib/pt-chart-comparison/pt-chart-comparison.component.mjs +153 -0
- package/esm2022/lib/pt-chart-comparison/pt-chart-comparison.module.mjs +18 -0
- package/esm2022/lib/pt-chart-comparison/public-api.mjs +3 -0
- package/esm2022/lib/pt-group/index.mjs +2 -0
- package/esm2022/lib/pt-group/pt-group.component.mjs +39 -0
- package/esm2022/lib/pt-group/pt-group.module.mjs +19 -0
- package/esm2022/lib/pt-group/public-api.mjs +3 -0
- package/esm2022/lib/pt-metric-panel/index.mjs +2 -0
- package/esm2022/lib/pt-metric-panel/pt-metric-panel.component.mjs +93 -0
- package/esm2022/lib/pt-metric-panel/pt-metric-panel.module.mjs +19 -0
- package/esm2022/lib/pt-metric-panel/public-api.mjs +3 -0
- package/esm2022/public-api.mjs +4 -1
- package/fesm2022/ng-prime-tools.mjs +326 -10
- package/fesm2022/ng-prime-tools.mjs.map +1 -1
- package/lib/models/chart-config.model.d.ts +15 -0
- package/lib/models/chart-config.model.d.ts.map +1 -1
- package/lib/models/metric-indicateur-data.model.d.ts +9 -0
- package/lib/models/metric-indicateur-data.model.d.ts.map +1 -0
- package/lib/models/metric-panel-data.model.d.ts +7 -0
- package/lib/models/metric-panel-data.model.d.ts.map +1 -0
- package/lib/models/public-api.d.ts +2 -0
- package/lib/models/public-api.d.ts.map +1 -1
- package/lib/pt-chart-comparison/index.d.ts +2 -0
- package/lib/pt-chart-comparison/index.d.ts.map +1 -0
- package/lib/pt-chart-comparison/pt-chart-comparison.component.d.ts +42 -0
- package/lib/pt-chart-comparison/pt-chart-comparison.component.d.ts.map +1 -0
- package/lib/pt-chart-comparison/pt-chart-comparison.module.d.ts +9 -0
- package/lib/pt-chart-comparison/pt-chart-comparison.module.d.ts.map +1 -0
- package/lib/pt-chart-comparison/public-api.d.ts +3 -0
- package/lib/pt-chart-comparison/public-api.d.ts.map +1 -0
- package/lib/pt-group/index.d.ts +2 -0
- package/lib/pt-group/index.d.ts.map +1 -0
- package/lib/pt-group/pt-group.component.d.ts +12 -0
- package/lib/pt-group/pt-group.component.d.ts.map +1 -0
- package/lib/pt-group/pt-group.module.d.ts +10 -0
- package/lib/pt-group/pt-group.module.d.ts.map +1 -0
- package/lib/pt-group/public-api.d.ts +3 -0
- package/lib/pt-group/public-api.d.ts.map +1 -0
- package/lib/pt-metric-panel/index.d.ts +2 -0
- package/lib/pt-metric-panel/index.d.ts.map +1 -0
- package/lib/pt-metric-panel/pt-metric-panel.component.d.ts +55 -0
- package/lib/pt-metric-panel/pt-metric-panel.component.d.ts.map +1 -0
- package/lib/pt-metric-panel/pt-metric-panel.module.d.ts +10 -0
- package/lib/pt-metric-panel/pt-metric-panel.module.d.ts.map +1 -0
- package/lib/pt-metric-panel/public-api.d.ts +3 -0
- package/lib/pt-metric-panel/public-api.d.ts.map +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/public-api.d.ts.map +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Pipe, EventEmitter, Component, Input, Output, ViewChild, NgModule, Injectable, HostListener } from '@angular/core';
|
2
|
+
import { Pipe, EventEmitter, Component, Input, Output, ViewChild, NgModule, Injectable, HostListener, HostBinding } from '@angular/core';
|
3
3
|
import * as i1 from '@angular/common';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
import * as i2$1 from '@angular/forms';
|
@@ -41,13 +41,13 @@ import * as i3$5 from 'primeng/dropdown';
|
|
41
41
|
import { DropdownModule } from 'primeng/dropdown';
|
42
42
|
import { Chart, registerables } from 'chart.js';
|
43
43
|
import ChartDataLabels from 'chartjs-plugin-datalabels';
|
44
|
-
import * as
|
44
|
+
import * as i1$2 from '@angular/router';
|
45
45
|
import { RouterModule, NavigationEnd } from '@angular/router';
|
46
46
|
import { filter } from 'rxjs/operators';
|
47
47
|
import { BehaviorSubject } from 'rxjs';
|
48
48
|
import * as i3$6 from 'primeng/breadcrumb';
|
49
49
|
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
50
|
-
import * as i2$
|
50
|
+
import * as i2$2 from 'primeng/toast';
|
51
51
|
import { ToastModule } from 'primeng/toast';
|
52
52
|
import * as i3$7 from 'primeng/confirmdialog';
|
53
53
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
@@ -2676,7 +2676,7 @@ class PTNavbarMenuComponent {
|
|
2676
2676
|
};
|
2677
2677
|
}
|
2678
2678
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTNavbarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
2679
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTNavbarMenuComponent, selector: "pt-nav-bar-menu", inputs: { navBarMenuConfig: "navBarMenuConfig" }, outputs: { toggleSidebar: "toggleSidebar" }, ngImport: i0, template: "<div class=\"pt-nav-bar-menu\" [ngStyle]=\"getNavbarStyles()\">\n <div class=\"navbar-left\">\n <a\n [routerLink]=\"\n isImageStyle(navBarMenuConfig.logo)\n ? navBarMenuConfig.logo.routerLink\n : '/'\n \"\n class=\"logo-link\"\n >\n <img\n [src]=\"getLogoUrl()\"\n [alt]=\"getLogoAltText()\"\n [ngStyle]=\"getLogoStyles()\"\n class=\"navbar-logo\"\n />\n <span class=\"navbar-title\" [ngStyle]=\"getAppNameStyles()\">\n {{ getAppName() }}\n </span>\n </a>\n <!-- Toggle Button -->\n <a (click)=\"toggleMenu()\" class=\"toggle-btn\">\n <i\n [class]=\"getToggleButtonIcon()\"\n [ngStyle]=\"getToggleButtonStyles()\"\n ></i>\n </a>\n </div>\n <div class=\"navbar-right\">\n <pt-menu-fancy\n *ngFor=\"let menuConfig of navBarMenuConfig.menus\"\n [config]=\"menuConfig\"\n ></pt-menu-fancy>\n </div>\n</div>\n", styles: [".pt-nav-bar-menu{display:flex;justify-content:space-between;align-items:center;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;background-size:cover;background-position:center}.pt-nav-bar-menu .navbar-left{display:flex;align-items:center}.pt-nav-bar-menu .logo-link{display:flex;align-items:center;text-decoration:none;color:inherit}.pt-nav-bar-menu .navbar-logo{margin-left:10px;margin-right:20px}.pt-nav-bar-menu .navbar-right{display:flex;align-items:center}.pt-nav-bar-menu .navbar-right a{margin-left:20px;color:#333;text-decoration:none;font-size:20px;cursor:pointer}.pt-nav-bar-menu .navbar-right a:hover{color:#000;cursor:pointer}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{font-size:1.5rem;color:#333}.pt-nav-bar-menu .toggle-btn:hover{background-color:#f1f1f1}.pt-nav-bar-menu .toggle-btn{margin-left:2rem;cursor:pointer;padding:7px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type:
|
2679
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTNavbarMenuComponent, selector: "pt-nav-bar-menu", inputs: { navBarMenuConfig: "navBarMenuConfig" }, outputs: { toggleSidebar: "toggleSidebar" }, ngImport: i0, template: "<div class=\"pt-nav-bar-menu\" [ngStyle]=\"getNavbarStyles()\">\n <div class=\"navbar-left\">\n <a\n [routerLink]=\"\n isImageStyle(navBarMenuConfig.logo)\n ? navBarMenuConfig.logo.routerLink\n : '/'\n \"\n class=\"logo-link\"\n >\n <img\n [src]=\"getLogoUrl()\"\n [alt]=\"getLogoAltText()\"\n [ngStyle]=\"getLogoStyles()\"\n class=\"navbar-logo\"\n />\n <span class=\"navbar-title\" [ngStyle]=\"getAppNameStyles()\">\n {{ getAppName() }}\n </span>\n </a>\n <!-- Toggle Button -->\n <a (click)=\"toggleMenu()\" class=\"toggle-btn\">\n <i\n [class]=\"getToggleButtonIcon()\"\n [ngStyle]=\"getToggleButtonStyles()\"\n ></i>\n </a>\n </div>\n <div class=\"navbar-right\">\n <pt-menu-fancy\n *ngFor=\"let menuConfig of navBarMenuConfig.menus\"\n [config]=\"menuConfig\"\n ></pt-menu-fancy>\n </div>\n</div>\n", styles: [".pt-nav-bar-menu{display:flex;justify-content:space-between;align-items:center;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;background-size:cover;background-position:center}.pt-nav-bar-menu .navbar-left{display:flex;align-items:center}.pt-nav-bar-menu .logo-link{display:flex;align-items:center;text-decoration:none;color:inherit}.pt-nav-bar-menu .navbar-logo{margin-left:10px;margin-right:20px}.pt-nav-bar-menu .navbar-right{display:flex;align-items:center}.pt-nav-bar-menu .navbar-right a{margin-left:20px;color:#333;text-decoration:none;font-size:20px;cursor:pointer}.pt-nav-bar-menu .navbar-right a:hover{color:#000;cursor:pointer}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{font-size:1.5rem;color:#333}.pt-nav-bar-menu .toggle-btn:hover{background-color:#f1f1f1}.pt-nav-bar-menu .toggle-btn{margin-left:2rem;cursor:pointer;padding:7px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: PTMenuFancyComponent, selector: "pt-menu-fancy", inputs: ["config"] }] }); }
|
2680
2680
|
}
|
2681
2681
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTNavbarMenuComponent, decorators: [{
|
2682
2682
|
type: Component,
|
@@ -2910,7 +2910,7 @@ class PTSideBarMenuComponent {
|
|
2910
2910
|
});
|
2911
2911
|
}
|
2912
2912
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTSideBarMenuComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
2913
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTSideBarMenuComponent, selector: "pt-side-bar-menu", inputs: { menuConfig: "menuConfig" }, ngImport: i0, template: "<div class=\"pt-side-bar-menu\">\n <pt-card\n *ngIf=\"menuConfig.searchable\"\n [config]=\"searchCardConfig\"\n [ngClass]=\"{ 'sidebar-hidden': !menuConfig.isVisible }\"\n >\n <div class=\"search-input\">\n <pt-text-input [formGroup]=\"formGroup\" [formField]=\"searchField\">\n </pt-text-input>\n </div>\n </pt-card>\n\n <pt-card\n [config]=\"cardConfig\"\n [ngClass]=\"{ 'sidebar-hidden': !menuConfig.isVisible }\"\n >\n <ul class=\"menu-list\">\n <li\n *ngFor=\"let item of filteredMenus\"\n class=\"menu-item\"\n [ngClass]=\"{ 'menu-item-expanded': item.isExpanded }\"\n [ngStyle]=\"getMenuItemStyles()\"\n >\n <!-- Main menu items without children -->\n <a\n *ngIf=\"!item.children?.length\"\n [routerLink]=\"item.url\"\n class=\"menu-link\"\n [ngStyle]=\"getMenuLinkStyles()\"\n >\n <i [ngClass]=\"item.icon\"></i>\n <span>{{ item.label }}</span>\n <span\n *ngIf=\"item.badge\"\n [ngStyle]=\"getBadgeStyles(item.badge)\"\n class=\"badge\"\n >\n {{ item.badge.count }}\n </span>\n </a>\n\n <!-- Menu items with children -->\n <a\n *ngIf=\"item.children?.length\"\n class=\"menu-link\"\n (click)=\"toggleMenu(item, $event)\"\n [ngStyle]=\"getMenuLinkStyles()\"\n >\n <i [ngClass]=\"item.icon\"></i>\n <span>{{ item.label }}</span>\n <span\n *ngIf=\"item.badge\"\n [ngStyle]=\"getBadgeStyles(item.badge)\"\n class=\"badge\"\n >\n {{ item.badge.count }}\n </span>\n <i [ngClass]=\"getChevronClass(item)\" class=\"chevron\"></i>\n </a>\n\n <!-- Submenu -->\n <ul class=\"submenu-list\">\n <li *ngFor=\"let child of item.children\" class=\"submenu-item\">\n <a\n [routerLink]=\"child.url\"\n class=\"submenu-link\"\n [ngStyle]=\"getSubMenuLinkStyles()\"\n >\n <i [ngClass]=\"child.icon\"></i>\n <span class=\"submenu-title\">{{ child.label }}</span>\n <span\n *ngIf=\"child.badge\"\n [ngStyle]=\"getBadgeStyles(child.badge)\"\n class=\"badge\"\n >\n {{ child.badge.count }}\n </span>\n </a>\n </li>\n </ul>\n </li>\n </ul>\n </pt-card>\n</div>\n", styles: [".pt-side-bar-menu .badge{background-color:#38bdf8;border-radius:5px;color:#fff;font-size:12px;margin-left:auto;padding:2px 8px}.pt-side-bar-menu .chevron{color:#8c8c8c;cursor:pointer;margin-left:auto}.pt-side-bar-menu .menu-item{position:relative}.pt-side-bar-menu .menu-item-expanded .submenu-list{max-height:500px;padding-bottom:5px;padding-top:5px}.pt-side-bar-menu .menu-link{align-items:center;border-radius:8px;color:#333;cursor:pointer;display:flex;font-size:16px;margin-bottom:15px;padding:10px 15px;text-decoration:none;transition:background-color .2s,color .2s}.pt-side-bar-menu .menu-link:hover{background-color:#f1f1f1;color:#111}.pt-side-bar-menu .menu-link i{margin-right:10px}.pt-side-bar-menu .menu-list{list-style-type:none;padding:0}.pt-side-bar-menu pt-card{transition:transform .3s ease-in-out,opacity .3s ease-in-out;display:block}.pt-side-bar-menu .sidebar-hidden{transform:translate(-100%);opacity:0}.pt-side-bar-menu .sidebar-menu{margin:0;padding:0;transition:transform .3s ease-in-out;width:250px}.pt-side-bar-menu .submenu-item{padding:5px 0;position:relative}.pt-side-bar-menu .submenu-item:before{background-color:#e5e7eb;content:\"\";height:1px;left:-25px;position:absolute;top:50%;transform:translateY(-50%);width:25px}.pt-side-bar-menu .submenu-item:last-child:after{content:none}.pt-side-bar-menu .submenu-link{align-items:center;border-radius:5px;color:#666;display:flex;font-size:14px;padding:5px 10px;text-decoration:none;transition:background-color .2s,color .2s}.pt-side-bar-menu .submenu-link:hover{background-color:#f1f1f1;color:#000}.pt-side-bar-menu .submenu-list{border-left:1px solid #e5e7eb;list-style-type:none;margin-left:23px;margin-top:5px;max-height:0;overflow:hidden;padding-left:25px;position:relative;transition:max-height .3s ease-out,padding .3s ease-out}.pt-side-bar-menu .submenu-list:after{background-color:#e5e7eb;bottom:0;content:\"\";left:-1px;position:absolute;top:0;width:1px}.pt-side-bar-menu .submenu-title{margin-left:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type:
|
2913
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTSideBarMenuComponent, selector: "pt-side-bar-menu", inputs: { menuConfig: "menuConfig" }, ngImport: i0, template: "<div class=\"pt-side-bar-menu\">\n <pt-card\n *ngIf=\"menuConfig.searchable\"\n [config]=\"searchCardConfig\"\n [ngClass]=\"{ 'sidebar-hidden': !menuConfig.isVisible }\"\n >\n <div class=\"search-input\">\n <pt-text-input [formGroup]=\"formGroup\" [formField]=\"searchField\">\n </pt-text-input>\n </div>\n </pt-card>\n\n <pt-card\n [config]=\"cardConfig\"\n [ngClass]=\"{ 'sidebar-hidden': !menuConfig.isVisible }\"\n >\n <ul class=\"menu-list\">\n <li\n *ngFor=\"let item of filteredMenus\"\n class=\"menu-item\"\n [ngClass]=\"{ 'menu-item-expanded': item.isExpanded }\"\n [ngStyle]=\"getMenuItemStyles()\"\n >\n <!-- Main menu items without children -->\n <a\n *ngIf=\"!item.children?.length\"\n [routerLink]=\"item.url\"\n class=\"menu-link\"\n [ngStyle]=\"getMenuLinkStyles()\"\n >\n <i [ngClass]=\"item.icon\"></i>\n <span>{{ item.label }}</span>\n <span\n *ngIf=\"item.badge\"\n [ngStyle]=\"getBadgeStyles(item.badge)\"\n class=\"badge\"\n >\n {{ item.badge.count }}\n </span>\n </a>\n\n <!-- Menu items with children -->\n <a\n *ngIf=\"item.children?.length\"\n class=\"menu-link\"\n (click)=\"toggleMenu(item, $event)\"\n [ngStyle]=\"getMenuLinkStyles()\"\n >\n <i [ngClass]=\"item.icon\"></i>\n <span>{{ item.label }}</span>\n <span\n *ngIf=\"item.badge\"\n [ngStyle]=\"getBadgeStyles(item.badge)\"\n class=\"badge\"\n >\n {{ item.badge.count }}\n </span>\n <i [ngClass]=\"getChevronClass(item)\" class=\"chevron\"></i>\n </a>\n\n <!-- Submenu -->\n <ul class=\"submenu-list\">\n <li *ngFor=\"let child of item.children\" class=\"submenu-item\">\n <a\n [routerLink]=\"child.url\"\n class=\"submenu-link\"\n [ngStyle]=\"getSubMenuLinkStyles()\"\n >\n <i [ngClass]=\"child.icon\"></i>\n <span class=\"submenu-title\">{{ child.label }}</span>\n <span\n *ngIf=\"child.badge\"\n [ngStyle]=\"getBadgeStyles(child.badge)\"\n class=\"badge\"\n >\n {{ child.badge.count }}\n </span>\n </a>\n </li>\n </ul>\n </li>\n </ul>\n </pt-card>\n</div>\n", styles: [".pt-side-bar-menu .badge{background-color:#38bdf8;border-radius:5px;color:#fff;font-size:12px;margin-left:auto;padding:2px 8px}.pt-side-bar-menu .chevron{color:#8c8c8c;cursor:pointer;margin-left:auto}.pt-side-bar-menu .menu-item{position:relative}.pt-side-bar-menu .menu-item-expanded .submenu-list{max-height:500px;padding-bottom:5px;padding-top:5px}.pt-side-bar-menu .menu-link{align-items:center;border-radius:8px;color:#333;cursor:pointer;display:flex;font-size:16px;margin-bottom:15px;padding:10px 15px;text-decoration:none;transition:background-color .2s,color .2s}.pt-side-bar-menu .menu-link:hover{background-color:#f1f1f1;color:#111}.pt-side-bar-menu .menu-link i{margin-right:10px}.pt-side-bar-menu .menu-list{list-style-type:none;padding:0}.pt-side-bar-menu pt-card{transition:transform .3s ease-in-out,opacity .3s ease-in-out;display:block}.pt-side-bar-menu .sidebar-hidden{transform:translate(-100%);opacity:0}.pt-side-bar-menu .sidebar-menu{margin:0;padding:0;transition:transform .3s ease-in-out;width:250px}.pt-side-bar-menu .submenu-item{padding:5px 0;position:relative}.pt-side-bar-menu .submenu-item:before{background-color:#e5e7eb;content:\"\";height:1px;left:-25px;position:absolute;top:50%;transform:translateY(-50%);width:25px}.pt-side-bar-menu .submenu-item:last-child:after{content:none}.pt-side-bar-menu .submenu-link{align-items:center;border-radius:5px;color:#666;display:flex;font-size:14px;padding:5px 10px;text-decoration:none;transition:background-color .2s,color .2s}.pt-side-bar-menu .submenu-link:hover{background-color:#f1f1f1;color:#000}.pt-side-bar-menu .submenu-list{border-left:1px solid #e5e7eb;list-style-type:none;margin-left:23px;margin-top:5px;max-height:0;overflow:hidden;padding-left:25px;position:relative;transition:max-height .3s ease-out,padding .3s ease-out}.pt-side-bar-menu .submenu-list:after{background-color:#e5e7eb;bottom:0;content:\"\";left:-1px;position:absolute;top:0;width:1px}.pt-side-bar-menu .submenu-title{margin-left:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }, { kind: "component", type: PTTextInputComponent, selector: "pt-text-input", inputs: ["formGroup", "formField"] }] }); }
|
2914
2914
|
}
|
2915
2915
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTSideBarMenuComponent, decorators: [{
|
2916
2916
|
type: Component,
|
@@ -3047,7 +3047,7 @@ class PTBreadCrumbService {
|
|
3047
3047
|
}
|
3048
3048
|
return breadcrumbs;
|
3049
3049
|
}
|
3050
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbService, deps: [{ token:
|
3050
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbService, deps: [{ token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
3051
3051
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbService, providedIn: 'root' }); }
|
3052
3052
|
}
|
3053
3053
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbService, decorators: [{
|
@@ -3055,7 +3055,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
3055
3055
|
args: [{
|
3056
3056
|
providedIn: 'root',
|
3057
3057
|
}]
|
3058
|
-
}], ctorParameters: () => [{ type:
|
3058
|
+
}], ctorParameters: () => [{ type: i1$2.Router }] });
|
3059
3059
|
|
3060
3060
|
class PTBreadCrumbComponent {
|
3061
3061
|
constructor(breadcrumbService, renderer, el) {
|
@@ -3139,7 +3139,7 @@ class PTPageSkeletonComponent {
|
|
3139
3139
|
};
|
3140
3140
|
}
|
3141
3141
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTPageSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
3142
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTPageSkeletonComponent, selector: "pt-page-skeleton", inputs: { pageSkeletonConfig: "pageSkeletonConfig" }, outputs: { toggleSidebar: "toggleSidebar" }, ngImport: i0, template: "<pt-card [config]=\"pageSkeletonConfig.backgroundCardConfig!\">\n <!-- Navbar -->\n <pt-nav-bar-menu\n [navBarMenuConfig]=\"pageSkeletonConfig.navBarMenuConfig\"\n (toggleSidebar)=\"onToggleSidebar()\"\n ></pt-nav-bar-menu>\n\n <div class=\"main-content\">\n <!-- Sidebar (use *ngIf to toggle visibility) -->\n <pt-side-bar-menu\n *ngIf=\"isSidebarVisible\"\n [menuConfig]=\"pageSkeletonConfig.sideMenuBarConfig\"\n class=\"sidebar\"\n ></pt-side-bar-menu>\n\n <!-- Main View Area -->\n <div class=\"content-area\" [ngClass]=\"{ 'full-width': !isSidebarVisible }\">\n <!-- Content Card Wrapper -->\n <pt-card [config]=\"pageSkeletonConfig.contentCardConfig\">\n <!-- Breadcrumb -->\n <pt-bread-crumb\n *ngIf=\"pageSkeletonConfig.breadCrumbConfig\"\n [breadCrumbConfig]=\"pageSkeletonConfig.breadCrumbConfig\"\n class=\"bread-crumb\"\n ></pt-bread-crumb>\n\n <!-- Background Card -->\n\n <router-outlet></router-outlet>\n </pt-card>\n </div>\n </div>\n\n <!-- Footer -->\n <pt-footer\n *ngIf=\"pageSkeletonConfig.footerConfig\"\n [footerConfig]=\"pageSkeletonConfig.footerConfig\"\n class=\"pt-footer\"\n ></pt-footer>\n</pt-card>\n", styles: [".bread-crumb{margin-bottom:15px}.app-container{display:flex;flex-direction:column;height:100vh}.main-content{display:flex;flex-grow:1;transition:all .3s ease-in-out}.content-area{flex-grow:1;display:flex;justify-content:center;align-items:flex-start;transition:all .3s ease-in-out;margin-left:14px;width:100%;overflow-x:hidden}.sidebar{width:300px;transition:all .3s ease-in-out}.content-area.full-width{margin-left:0;width:100%}pt-card{width:100%;height:100%;max-width:100%;overflow:hidden}pt-card .card-body-scrollable{overflow-x:auto}.pt-footer{margin-top:0}.footer-card{width:100%;background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PTNavbarMenuComponent, selector: "pt-nav-bar-menu", inputs: ["navBarMenuConfig"], outputs: ["toggleSidebar"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }, { kind: "component", type: PTSideBarMenuComponent, selector: "pt-side-bar-menu", inputs: ["menuConfig"] }, { kind: "directive", type:
|
3142
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTPageSkeletonComponent, selector: "pt-page-skeleton", inputs: { pageSkeletonConfig: "pageSkeletonConfig" }, outputs: { toggleSidebar: "toggleSidebar" }, ngImport: i0, template: "<pt-card [config]=\"pageSkeletonConfig.backgroundCardConfig!\">\n <!-- Navbar -->\n <pt-nav-bar-menu\n [navBarMenuConfig]=\"pageSkeletonConfig.navBarMenuConfig\"\n (toggleSidebar)=\"onToggleSidebar()\"\n ></pt-nav-bar-menu>\n\n <div class=\"main-content\">\n <!-- Sidebar (use *ngIf to toggle visibility) -->\n <pt-side-bar-menu\n *ngIf=\"isSidebarVisible\"\n [menuConfig]=\"pageSkeletonConfig.sideMenuBarConfig\"\n class=\"sidebar\"\n ></pt-side-bar-menu>\n\n <!-- Main View Area -->\n <div class=\"content-area\" [ngClass]=\"{ 'full-width': !isSidebarVisible }\">\n <!-- Content Card Wrapper -->\n <pt-card [config]=\"pageSkeletonConfig.contentCardConfig\">\n <!-- Breadcrumb -->\n <pt-bread-crumb\n *ngIf=\"pageSkeletonConfig.breadCrumbConfig\"\n [breadCrumbConfig]=\"pageSkeletonConfig.breadCrumbConfig\"\n class=\"bread-crumb\"\n ></pt-bread-crumb>\n\n <!-- Background Card -->\n\n <router-outlet></router-outlet>\n </pt-card>\n </div>\n </div>\n\n <!-- Footer -->\n <pt-footer\n *ngIf=\"pageSkeletonConfig.footerConfig\"\n [footerConfig]=\"pageSkeletonConfig.footerConfig\"\n class=\"pt-footer\"\n ></pt-footer>\n</pt-card>\n", styles: [".bread-crumb{margin-bottom:15px}.app-container{display:flex;flex-direction:column;height:100vh}.main-content{display:flex;flex-grow:1;transition:all .3s ease-in-out}.content-area{flex-grow:1;display:flex;justify-content:center;align-items:flex-start;transition:all .3s ease-in-out;margin-left:14px;width:100%;overflow-x:hidden}.sidebar{width:300px;transition:all .3s ease-in-out}.content-area.full-width{margin-left:0;width:100%}pt-card{width:100%;height:100%;max-width:100%;overflow:hidden}pt-card .card-body-scrollable{overflow-x:auto}.pt-footer{margin-top:0}.footer-card{width:100%;background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PTNavbarMenuComponent, selector: "pt-nav-bar-menu", inputs: ["navBarMenuConfig"], outputs: ["toggleSidebar"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }, { kind: "component", type: PTSideBarMenuComponent, selector: "pt-side-bar-menu", inputs: ["menuConfig"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: PTFooterComponent, selector: "pt-footer", inputs: ["footerConfig"] }, { kind: "component", type: PTBreadCrumbComponent, selector: "pt-bread-crumb", inputs: ["breadCrumbConfig"] }] }); }
|
3143
3143
|
}
|
3144
3144
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTPageSkeletonComponent, decorators: [{
|
3145
3145
|
type: Component,
|
@@ -3572,7 +3572,7 @@ class PTDialogComponent {
|
|
3572
3572
|
return buttonConfig?.styleClass || 'p-button-sm'; // Default to small button style
|
3573
3573
|
}
|
3574
3574
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDialogComponent, deps: [{ token: i1$1.ConfirmationService }, { token: i1$1.MessageService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
3575
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTDialogComponent, selector: "pt-dialog", inputs: { dialogModel: "dialogModel" }, outputs: { confirm: "confirm", cancel: "cancel" }, providers: [ConfirmationService, MessageService], usesOnChanges: true, ngImport: i0, template: "<div>\n <p-toast></p-toast>\n <p-confirmDialog>\n <ng-template pTemplate=\"message\" let-message>\n <div\n class=\"flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border\"\n >\n <i [class]=\"dialogModel.header?.icon || 'pi pi-exclamation-circle'\"></i>\n <p>{{ message.message }}</p>\n </div>\n </ng-template>\n </p-confirmDialog>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$
|
3575
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTDialogComponent, selector: "pt-dialog", inputs: { dialogModel: "dialogModel" }, outputs: { confirm: "confirm", cancel: "cancel" }, providers: [ConfirmationService, MessageService], usesOnChanges: true, ngImport: i0, template: "<div>\n <p-toast></p-toast>\n <p-confirmDialog>\n <ng-template pTemplate=\"message\" let-message>\n <div\n class=\"flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border\"\n >\n <i [class]=\"dialogModel.header?.icon || 'pi pi-exclamation-circle'\"></i>\n <p>{{ message.message }}</p>\n </div>\n </ng-template>\n </p-confirmDialog>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$2.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "component", type: i3$7.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }] }); }
|
3576
3576
|
}
|
3577
3577
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDialogComponent, decorators: [{
|
3578
3578
|
type: Component,
|
@@ -3846,6 +3846,271 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
3846
3846
|
}]
|
3847
3847
|
}] });
|
3848
3848
|
|
3849
|
+
class PTMetricPanelComponent {
|
3850
|
+
constructor(router) {
|
3851
|
+
this.router = router;
|
3852
|
+
this.cardConfig = this.getDefaultCardConfig();
|
3853
|
+
}
|
3854
|
+
ngOnInit() { }
|
3855
|
+
getDefaultCardConfig() {
|
3856
|
+
return {
|
3857
|
+
backgroundColor: '#fff',
|
3858
|
+
borderColor: '#ddd',
|
3859
|
+
borderWidth: '1px',
|
3860
|
+
padding: '20px',
|
3861
|
+
margin: '10px 0',
|
3862
|
+
borderRadius: '8px',
|
3863
|
+
boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
|
3864
|
+
};
|
3865
|
+
}
|
3866
|
+
getTitleText() {
|
3867
|
+
return typeof this.panelData.title === 'object'
|
3868
|
+
? this.panelData.title.text
|
3869
|
+
: this.panelData.title || '';
|
3870
|
+
}
|
3871
|
+
getTitleStyles() {
|
3872
|
+
if (typeof this.panelData.title === 'object') {
|
3873
|
+
return {
|
3874
|
+
color: this.panelData.title.color || '#333',
|
3875
|
+
fontSize: this.panelData.title.fontSize || '1.5rem',
|
3876
|
+
textAlign: this.panelData.title.position || 'left',
|
3877
|
+
};
|
3878
|
+
}
|
3879
|
+
return {};
|
3880
|
+
}
|
3881
|
+
getIconClass(icon) {
|
3882
|
+
return icon ? icon : '';
|
3883
|
+
}
|
3884
|
+
getIconStyles(icon) {
|
3885
|
+
if (typeof icon === 'object') {
|
3886
|
+
return {
|
3887
|
+
color: icon.color || '#333',
|
3888
|
+
fontSize: icon.fontSize || '1.2rem',
|
3889
|
+
backgroundColor: icon.backgroundColor || 'transparent',
|
3890
|
+
borderRadius: icon.shape === 'circular' ? '50%' : '8px',
|
3891
|
+
padding: '6px',
|
3892
|
+
display: 'inline-block',
|
3893
|
+
};
|
3894
|
+
}
|
3895
|
+
return {};
|
3896
|
+
}
|
3897
|
+
getValueStyles(value) {
|
3898
|
+
if (typeof value === 'object' && 'text' in value) {
|
3899
|
+
return {
|
3900
|
+
color: value.color || '#2d3748',
|
3901
|
+
fontSize: value.fontSize || '1rem',
|
3902
|
+
fontWeight: value.fontWeight || 'bold',
|
3903
|
+
};
|
3904
|
+
}
|
3905
|
+
return {};
|
3906
|
+
}
|
3907
|
+
isTitleObject() {
|
3908
|
+
return typeof this.panelData.title === 'object';
|
3909
|
+
}
|
3910
|
+
getTitleIcon() {
|
3911
|
+
if (this.isTitleObject()) {
|
3912
|
+
const icon = this.panelData.title.icon;
|
3913
|
+
return typeof icon === 'string' ? icon : icon?.code;
|
3914
|
+
}
|
3915
|
+
return undefined;
|
3916
|
+
}
|
3917
|
+
isTitleStyle(value) {
|
3918
|
+
return typeof value === 'object' && value !== null && 'text' in value;
|
3919
|
+
}
|
3920
|
+
handleClick(url) {
|
3921
|
+
if (url) {
|
3922
|
+
this.router.navigate([url]);
|
3923
|
+
}
|
3924
|
+
}
|
3925
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricPanelComponent, deps: [{ token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
3926
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTMetricPanelComponent, selector: "pt-metric-panel", inputs: { panelData: "panelData", cardConfig: "cardConfig" }, ngImport: i0, template: "<pt-card [config]=\"cardConfig\">\n <!-- Panel Title -->\n <div class=\"panel-header\" [ngStyle]=\"getTitleStyles()\">\n <i\n *ngIf=\"getTitleIcon()\"\n [ngClass]=\"getIconClass(getTitleIcon())\"\n [ngStyle]=\"getIconStyles(getTitleIcon())\"\n ></i>\n <span>{{ getTitleText() }}</span>\n </div>\n\n <hr />\n\n <!-- Metric Indicators -->\n <div class=\"metric-list\">\n <div\n *ngFor=\"let item of panelData.indicators\"\n class=\"metric-item\"\n [ngStyle]=\"{ cursor: item?.url ? 'pointer' : 'default' }\"\n (click)=\"handleClick(item?.url)\"\n [attr.title]=\"item?.url ? 'Go to ' + item.url : ''\"\n >\n <i\n *ngIf=\"item.icon\"\n [ngClass]=\"getIconClass(item.icon.code)\"\n [ngStyle]=\"getIconStyles(item.icon)\"\n ></i>\n <span class=\"metric-title\">\n {{ isTitleStyle(item.title) ? item.title.text : item.title }}\n </span>\n\n <span class=\"metric-value\" [ngStyle]=\"getValueStyles(item.value)\">\n {{ isTitleStyle(item.value) ? item.value.text : item.value }}\n </span>\n </div>\n </div>\n</pt-card>\n", styles: [".panel-header{display:flex;align-items:center;font-size:1.3rem;font-weight:700;color:#333;gap:10px}hr{border:0;height:1px;background:#ddd;margin:10px 0}.metric-list{display:flex;flex-direction:column;gap:12px}.metric-item{display:flex;justify-content:space-between;align-items:center;padding:8px;border-radius:5px;background:#fff;transition:.3s ease-in-out}.metric-item:hover{background:#f1f1f1}.metric-title{flex-grow:1;font-size:1rem;color:#333}.metric-value{font-size:1rem;font-weight:700;color:#2d3748}.metric-item[ngStyle]{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }] }); }
|
3927
|
+
}
|
3928
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricPanelComponent, decorators: [{
|
3929
|
+
type: Component,
|
3930
|
+
args: [{ selector: 'pt-metric-panel', template: "<pt-card [config]=\"cardConfig\">\n <!-- Panel Title -->\n <div class=\"panel-header\" [ngStyle]=\"getTitleStyles()\">\n <i\n *ngIf=\"getTitleIcon()\"\n [ngClass]=\"getIconClass(getTitleIcon())\"\n [ngStyle]=\"getIconStyles(getTitleIcon())\"\n ></i>\n <span>{{ getTitleText() }}</span>\n </div>\n\n <hr />\n\n <!-- Metric Indicators -->\n <div class=\"metric-list\">\n <div\n *ngFor=\"let item of panelData.indicators\"\n class=\"metric-item\"\n [ngStyle]=\"{ cursor: item?.url ? 'pointer' : 'default' }\"\n (click)=\"handleClick(item?.url)\"\n [attr.title]=\"item?.url ? 'Go to ' + item.url : ''\"\n >\n <i\n *ngIf=\"item.icon\"\n [ngClass]=\"getIconClass(item.icon.code)\"\n [ngStyle]=\"getIconStyles(item.icon)\"\n ></i>\n <span class=\"metric-title\">\n {{ isTitleStyle(item.title) ? item.title.text : item.title }}\n </span>\n\n <span class=\"metric-value\" [ngStyle]=\"getValueStyles(item.value)\">\n {{ isTitleStyle(item.value) ? item.value.text : item.value }}\n </span>\n </div>\n </div>\n</pt-card>\n", styles: [".panel-header{display:flex;align-items:center;font-size:1.3rem;font-weight:700;color:#333;gap:10px}hr{border:0;height:1px;background:#ddd;margin:10px 0}.metric-list{display:flex;flex-direction:column;gap:12px}.metric-item{display:flex;justify-content:space-between;align-items:center;padding:8px;border-radius:5px;background:#fff;transition:.3s ease-in-out}.metric-item:hover{background:#f1f1f1}.metric-title{flex-grow:1;font-size:1rem;color:#333}.metric-value{font-size:1rem;font-weight:700;color:#2d3748}.metric-item[ngStyle]{cursor:pointer}\n"] }]
|
3931
|
+
}], ctorParameters: () => [{ type: i1$2.Router }], propDecorators: { panelData: [{
|
3932
|
+
type: Input
|
3933
|
+
}], cardConfig: [{
|
3934
|
+
type: Input
|
3935
|
+
}] } });
|
3936
|
+
|
3937
|
+
class PTMetricPanelModule {
|
3938
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
3939
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTMetricPanelModule, declarations: [PTMetricPanelComponent], imports: [CommonModule, PTCardModule], exports: [PTMetricPanelComponent] }); }
|
3940
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricPanelModule, imports: [CommonModule, PTCardModule] }); }
|
3941
|
+
}
|
3942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricPanelModule, decorators: [{
|
3943
|
+
type: NgModule,
|
3944
|
+
args: [{
|
3945
|
+
declarations: [PTMetricPanelComponent],
|
3946
|
+
imports: [CommonModule, PTCardModule],
|
3947
|
+
exports: [PTMetricPanelComponent],
|
3948
|
+
}]
|
3949
|
+
}] });
|
3950
|
+
|
3951
|
+
class PTChartComparisonComponent {
|
3952
|
+
constructor() {
|
3953
|
+
this.medianTitle = 'Médiane';
|
3954
|
+
this.xAxisTitle = 'Time';
|
3955
|
+
this.yAxisTitle = 'Value';
|
3956
|
+
// Chart dimension inputs
|
3957
|
+
this.chartHeight = '400px';
|
3958
|
+
this.chartWidth = '1200px';
|
3959
|
+
Chart.register(...registerables, ChartDataLabels);
|
3960
|
+
}
|
3961
|
+
ngOnInit() {
|
3962
|
+
this.initializeChart();
|
3963
|
+
}
|
3964
|
+
ngOnDestroy() {
|
3965
|
+
this.destroyChart();
|
3966
|
+
}
|
3967
|
+
/**
|
3968
|
+
* Initializes the chart with median and datasets
|
3969
|
+
*/
|
3970
|
+
initializeChart() {
|
3971
|
+
const canvas = this.canvasRef.nativeElement;
|
3972
|
+
this.destroyChart();
|
3973
|
+
const config = {
|
3974
|
+
type: this.chartConfig.type || 'line',
|
3975
|
+
data: this.getFormattedChartData(), // Get data with median
|
3976
|
+
options: this.getChartOptions(),
|
3977
|
+
};
|
3978
|
+
this.chart = new Chart(canvas, config);
|
3979
|
+
}
|
3980
|
+
/**
|
3981
|
+
* Computes median values and adds them to the dataset
|
3982
|
+
*/
|
3983
|
+
getFormattedChartData() {
|
3984
|
+
const medianValues = this.calculateMedian();
|
3985
|
+
return {
|
3986
|
+
labels: this.chartConfig.data.labels,
|
3987
|
+
datasets: [
|
3988
|
+
// Add median line dataset
|
3989
|
+
{
|
3990
|
+
label: this.medianTitle || 'Médiane',
|
3991
|
+
data: medianValues,
|
3992
|
+
borderColor: '#0000FF', // Blue color
|
3993
|
+
borderWidth: 2,
|
3994
|
+
backgroundColor: 'transparent',
|
3995
|
+
pointRadius: 0,
|
3996
|
+
fill: false,
|
3997
|
+
tension: 0.1,
|
3998
|
+
borderDash: [5, 5], // Dashed line
|
3999
|
+
},
|
4000
|
+
// Keep existing datasets
|
4001
|
+
...this.chartConfig.data.datasets,
|
4002
|
+
],
|
4003
|
+
};
|
4004
|
+
}
|
4005
|
+
/**
|
4006
|
+
* Computes median values from all datasets at each time point
|
4007
|
+
*/
|
4008
|
+
calculateMedian() {
|
4009
|
+
const datasets = this.chartConfig.data.datasets;
|
4010
|
+
return this.chartConfig.data.labels.map((_, index) => {
|
4011
|
+
const valuesAtTime = datasets
|
4012
|
+
.map((dataset) => dataset.data[index])
|
4013
|
+
.filter((val) => val !== undefined);
|
4014
|
+
if (valuesAtTime.length === 0)
|
4015
|
+
return 0;
|
4016
|
+
valuesAtTime.sort((a, b) => a - b);
|
4017
|
+
const middle = Math.floor(valuesAtTime.length / 2);
|
4018
|
+
return valuesAtTime.length % 2 === 0
|
4019
|
+
? (valuesAtTime[middle - 1] + valuesAtTime[middle]) / 2
|
4020
|
+
: valuesAtTime[middle];
|
4021
|
+
});
|
4022
|
+
}
|
4023
|
+
/**
|
4024
|
+
* Defines chart options including Y-axis scaling
|
4025
|
+
*/
|
4026
|
+
getChartOptions() {
|
4027
|
+
return {
|
4028
|
+
responsive: true,
|
4029
|
+
maintainAspectRatio: false,
|
4030
|
+
plugins: {
|
4031
|
+
legend: { display: true, position: 'top' },
|
4032
|
+
tooltip: { mode: 'index', intersect: false },
|
4033
|
+
},
|
4034
|
+
scales: {
|
4035
|
+
x: {
|
4036
|
+
title: { display: true, text: this.chartConfig.xAxisTitle || 'Time' },
|
4037
|
+
ticks: { font: { size: 12 } },
|
4038
|
+
},
|
4039
|
+
y: {
|
4040
|
+
title: {
|
4041
|
+
display: true,
|
4042
|
+
text: this.chartConfig.yAxisTitle || 'Value',
|
4043
|
+
},
|
4044
|
+
min: this.chartConfig.scales?.y?.min,
|
4045
|
+
max: this.chartConfig.scales?.y?.max,
|
4046
|
+
ticks: {
|
4047
|
+
stepSize: this.chartConfig.scales?.y?.ticks?.stepSize,
|
4048
|
+
font: { size: 16, weight: 'bold' },
|
4049
|
+
color: '#333',
|
4050
|
+
},
|
4051
|
+
grid: {
|
4052
|
+
color: 'rgba(0,0,0,0.1)',
|
4053
|
+
},
|
4054
|
+
border: {
|
4055
|
+
display: true,
|
4056
|
+
color: '#000',
|
4057
|
+
},
|
4058
|
+
},
|
4059
|
+
},
|
4060
|
+
};
|
4061
|
+
}
|
4062
|
+
/**
|
4063
|
+
* Destroys the existing chart instance if present
|
4064
|
+
*/
|
4065
|
+
destroyChart() {
|
4066
|
+
if (this.chart) {
|
4067
|
+
this.chart.destroy();
|
4068
|
+
this.chart = undefined;
|
4069
|
+
}
|
4070
|
+
}
|
4071
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTChartComparisonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
4072
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTChartComparisonComponent, selector: "pt-chart-comparison", inputs: { chartConfig: "chartConfig", medianTitle: "medianTitle", xAxisTitle: "xAxisTitle", yAxisTitle: "yAxisTitle", yMin: "yMin", yMax: "yMax", yStepSize: "yStepSize", chartHeight: "chartHeight", chartWidth: "chartWidth" }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["chartCanvas"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"chart-scroll-container\">\n <div\n class=\"chart-inner\"\n [style.width]=\"chartConfig.chartWidth || '1200px'\"\n [style.height]=\"chartConfig.chartHeight || '400px'\"\n >\n <canvas #chartCanvas></canvas>\n </div>\n</div>\n", styles: [".chart-scroll-container{width:100%;overflow-x:auto;white-space:nowrap;padding-bottom:10px}.chart-inner{display:inline-block}\n"] }); }
|
4073
|
+
}
|
4074
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTChartComparisonComponent, decorators: [{
|
4075
|
+
type: Component,
|
4076
|
+
args: [{ selector: 'pt-chart-comparison', template: "<div class=\"chart-scroll-container\">\n <div\n class=\"chart-inner\"\n [style.width]=\"chartConfig.chartWidth || '1200px'\"\n [style.height]=\"chartConfig.chartHeight || '400px'\"\n >\n <canvas #chartCanvas></canvas>\n </div>\n</div>\n", styles: [".chart-scroll-container{width:100%;overflow-x:auto;white-space:nowrap;padding-bottom:10px}.chart-inner{display:inline-block}\n"] }]
|
4077
|
+
}], ctorParameters: () => [], propDecorators: { chartConfig: [{
|
4078
|
+
type: Input
|
4079
|
+
}], medianTitle: [{
|
4080
|
+
type: Input
|
4081
|
+
}], xAxisTitle: [{
|
4082
|
+
type: Input
|
4083
|
+
}], yAxisTitle: [{
|
4084
|
+
type: Input
|
4085
|
+
}], yMin: [{
|
4086
|
+
type: Input
|
4087
|
+
}], yMax: [{
|
4088
|
+
type: Input
|
4089
|
+
}], yStepSize: [{
|
4090
|
+
type: Input
|
4091
|
+
}], chartHeight: [{
|
4092
|
+
type: Input
|
4093
|
+
}], chartWidth: [{
|
4094
|
+
type: Input
|
4095
|
+
}], canvasRef: [{
|
4096
|
+
type: ViewChild,
|
4097
|
+
args: ['chartCanvas', { static: true }]
|
4098
|
+
}] } });
|
4099
|
+
|
4100
|
+
class PTChartComparisonModule {
|
4101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTChartComparisonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
4102
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTChartComparisonModule, declarations: [PTChartComparisonComponent], imports: [CommonModule], exports: [PTChartComparisonComponent] }); }
|
4103
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTChartComparisonModule, imports: [CommonModule] }); }
|
4104
|
+
}
|
4105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTChartComparisonModule, decorators: [{
|
4106
|
+
type: NgModule,
|
4107
|
+
args: [{
|
4108
|
+
declarations: [PTChartComparisonComponent],
|
4109
|
+
imports: [CommonModule],
|
4110
|
+
exports: [PTChartComparisonComponent],
|
4111
|
+
}]
|
4112
|
+
}] });
|
4113
|
+
|
3849
4114
|
class PTLineChartComponent {
|
3850
4115
|
constructor() {
|
3851
4116
|
this.config = {
|
@@ -3962,9 +4227,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
3962
4227
|
|
3963
4228
|
// Advanced table
|
3964
4229
|
|
4230
|
+
class PTGroupComponent {
|
4231
|
+
constructor() {
|
4232
|
+
this.gap = '16px';
|
4233
|
+
this.justify = 'flex-start';
|
4234
|
+
this.display = 'flex';
|
4235
|
+
this.flexWrap = 'wrap';
|
4236
|
+
}
|
4237
|
+
get gapSize() {
|
4238
|
+
return this.gap;
|
4239
|
+
}
|
4240
|
+
get justifyContent() {
|
4241
|
+
return this.justify;
|
4242
|
+
}
|
4243
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
4244
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTGroupComponent, selector: "pt-group", inputs: { gap: "gap", justify: "justify" }, host: { properties: { "style.display": "this.display", "style.flexWrap": "this.flexWrap", "style.gap": "this.gapSize", "style.justifyContent": "this.justifyContent" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{width:100%;display:flex;flex-wrap:wrap;gap:var(--gap, 16px);justify-content:var(--justify, flex-start)}\n"] }); }
|
4245
|
+
}
|
4246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTGroupComponent, decorators: [{
|
4247
|
+
type: Component,
|
4248
|
+
args: [{ selector: 'pt-group', template: "<ng-content></ng-content>\n", styles: [":host{width:100%;display:flex;flex-wrap:wrap;gap:var(--gap, 16px);justify-content:var(--justify, flex-start)}\n"] }]
|
4249
|
+
}], propDecorators: { gap: [{
|
4250
|
+
type: Input
|
4251
|
+
}], justify: [{
|
4252
|
+
type: Input
|
4253
|
+
}], display: [{
|
4254
|
+
type: HostBinding,
|
4255
|
+
args: ['style.display']
|
4256
|
+
}], flexWrap: [{
|
4257
|
+
type: HostBinding,
|
4258
|
+
args: ['style.flexWrap']
|
4259
|
+
}], gapSize: [{
|
4260
|
+
type: HostBinding,
|
4261
|
+
args: ['style.gap']
|
4262
|
+
}], justifyContent: [{
|
4263
|
+
type: HostBinding,
|
4264
|
+
args: ['style.justifyContent']
|
4265
|
+
}] } });
|
4266
|
+
|
4267
|
+
class PTGroupModule {
|
4268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
4269
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTGroupModule, declarations: [PTGroupComponent], imports: [CommonModule, PTCardModule], exports: [PTGroupComponent] }); }
|
4270
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTGroupModule, imports: [CommonModule, PTCardModule] }); }
|
4271
|
+
}
|
4272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTGroupModule, decorators: [{
|
4273
|
+
type: NgModule,
|
4274
|
+
args: [{
|
4275
|
+
declarations: [PTGroupComponent],
|
4276
|
+
imports: [CommonModule, PTCardModule],
|
4277
|
+
exports: [PTGroupComponent],
|
4278
|
+
}]
|
4279
|
+
}] });
|
4280
|
+
|
3965
4281
|
/**
|
3966
4282
|
* Generated bundle index. Do not edit.
|
3967
4283
|
*/
|
3968
4284
|
|
3969
|
-
export { BadgeType, BadgeTypeStyles, ButtonColorEnum, FormInputTypeEnum, InputValidationEnum, MultiSearchCriteriaComponent, MultiSearchCriteriaModule, NgPrimeToolsModule, PTAdvancedPrimeTableComponent, PTAdvancedPrimeTableModule, PTBreadCrumbComponent, PTBreadCrumbModule, PTButtonComponent, PTButtonModule, PTCardComponent, PTCardModule, PTChartComponent, PTChartModule, PTCheckBoxInputComponent, PTCheckBoxInputModule, PTDateInputComponent, PTDateInputModule, PTDialogComponent, PTDialogModule, PTDropdownComponent, PTDropdownModule, PTFooterComponent, PTFooterModule, PTFormBuilderComponent, PTFormBuilderModule, PTLineChartComponent, PTLineChartModule, PTLoginPageComponent, PTLoginPageModule, PTMenuComponent, PTMenuFancyComponent, PTMenuFancyModule, PTMenuModule, PTMetricCardComponent, PTMetricCardGroupComponent, PTMetricCardGroupModule, PTMetricCardModule, PTNavbarMenuComponent, PTNavbarMenuModule, PTNumberInputComponent, PTNumberInputModule, PTPageSkeletonComponent, PTPageSkeletonModule, PTSideBarMenuComponent, PTSideBarMenuModule, PTSwitchInputComponent, PTSwitchInputModule, PTTextAreaInputComponent, PTTextAreaInputModule, PTTextInputComponent, PTTextInputModule, SearchCriteriaTypeEnum, TableTypeEnum };
|
4285
|
+
export { BadgeType, BadgeTypeStyles, ButtonColorEnum, FormInputTypeEnum, InputValidationEnum, MultiSearchCriteriaComponent, MultiSearchCriteriaModule, NgPrimeToolsModule, PTAdvancedPrimeTableComponent, PTAdvancedPrimeTableModule, PTBreadCrumbComponent, PTBreadCrumbModule, PTButtonComponent, PTButtonModule, PTCardComponent, PTCardModule, PTChartComparisonComponent, PTChartComparisonModule, PTChartComponent, PTChartModule, PTCheckBoxInputComponent, PTCheckBoxInputModule, PTDateInputComponent, PTDateInputModule, PTDialogComponent, PTDialogModule, PTDropdownComponent, PTDropdownModule, PTFooterComponent, PTFooterModule, PTFormBuilderComponent, PTFormBuilderModule, PTGroupComponent, PTGroupModule, PTLineChartComponent, PTLineChartModule, PTLoginPageComponent, PTLoginPageModule, PTMenuComponent, PTMenuFancyComponent, PTMenuFancyModule, PTMenuModule, PTMetricCardComponent, PTMetricCardGroupComponent, PTMetricCardGroupModule, PTMetricCardModule, PTMetricPanelComponent, PTMetricPanelModule, PTNavbarMenuComponent, PTNavbarMenuModule, PTNumberInputComponent, PTNumberInputModule, PTPageSkeletonComponent, PTPageSkeletonModule, PTSideBarMenuComponent, PTSideBarMenuModule, PTSwitchInputComponent, PTSwitchInputModule, PTTextAreaInputComponent, PTTextAreaInputModule, PTTextInputComponent, PTTextInputModule, SearchCriteriaTypeEnum, TableTypeEnum };
|
3970
4286
|
//# sourceMappingURL=ng-prime-tools.mjs.map
|