ng-prime-tools 1.0.99 → 1.1.0
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.
|
@@ -7649,6 +7649,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
7649
7649
|
}]
|
|
7650
7650
|
}] });
|
|
7651
7651
|
|
|
7652
|
+
// src/lib/components/pt-metric-panel/pt-metric-panel.component.ts
|
|
7652
7653
|
class PTMetricPanelComponent {
|
|
7653
7654
|
set loading(value) {
|
|
7654
7655
|
const previousLoading = this.dashboardLoading;
|
|
@@ -7693,8 +7694,8 @@ class PTMetricPanelComponent {
|
|
|
7693
7694
|
}
|
|
7694
7695
|
getDefaultCardConfig() {
|
|
7695
7696
|
return {
|
|
7696
|
-
backgroundColor: '#
|
|
7697
|
-
borderColor: '#
|
|
7697
|
+
backgroundColor: '#FFFFFF',
|
|
7698
|
+
borderColor: '#E7EAF0',
|
|
7698
7699
|
borderWidth: '1px',
|
|
7699
7700
|
padding: '16px',
|
|
7700
7701
|
margin: '10px 0',
|
|
@@ -7708,14 +7709,15 @@ class PTMetricPanelComponent {
|
|
|
7708
7709
|
: this.panelData.title || '';
|
|
7709
7710
|
}
|
|
7710
7711
|
getTitleStyles() {
|
|
7711
|
-
if (
|
|
7712
|
-
return {
|
|
7713
|
-
color: this.panelData.title.color || '#2c1476',
|
|
7714
|
-
fontSize: this.panelData.title.fontSize || '1.15rem',
|
|
7715
|
-
textAlign: this.panelData.title.position || 'left',
|
|
7716
|
-
};
|
|
7712
|
+
if (!this.isTitleObject()) {
|
|
7713
|
+
return {};
|
|
7717
7714
|
}
|
|
7718
|
-
|
|
7715
|
+
const title = this.panelData.title;
|
|
7716
|
+
return {
|
|
7717
|
+
color: title.color || '#2C1476',
|
|
7718
|
+
fontSize: title.fontSize || '1.15rem',
|
|
7719
|
+
textAlign: title.position || 'left',
|
|
7720
|
+
};
|
|
7719
7721
|
}
|
|
7720
7722
|
getTitleIconStyles() {
|
|
7721
7723
|
if (!this.isTitleObject()) {
|
|
@@ -7725,9 +7727,19 @@ class PTMetricPanelComponent {
|
|
|
7725
7727
|
const icon = title.icon;
|
|
7726
7728
|
const iconColor = title.color ||
|
|
7727
7729
|
(typeof icon === 'object' && icon !== null ? icon.color : undefined) ||
|
|
7728
|
-
'#
|
|
7730
|
+
'#6734C9';
|
|
7731
|
+
const iconBackgroundColor = typeof icon === 'object' && icon !== null
|
|
7732
|
+
? icon.backgroundColor || '#F0E7FF'
|
|
7733
|
+
: '#F0E7FF';
|
|
7734
|
+
const iconFontSize = typeof icon === 'object' && icon !== null
|
|
7735
|
+
? icon.fontSize || '1.05rem'
|
|
7736
|
+
: '1.05rem';
|
|
7737
|
+
const iconShape = typeof icon === 'object' && icon !== null ? icon.shape : undefined;
|
|
7729
7738
|
return {
|
|
7730
7739
|
color: iconColor,
|
|
7740
|
+
backgroundColor: iconBackgroundColor,
|
|
7741
|
+
fontSize: iconFontSize,
|
|
7742
|
+
borderRadius: iconShape === 'circular' ? '50%' : '12px',
|
|
7731
7743
|
};
|
|
7732
7744
|
}
|
|
7733
7745
|
getIconClass(icon) {
|
|
@@ -7737,9 +7749,9 @@ class PTMetricPanelComponent {
|
|
|
7737
7749
|
if (typeof icon === 'object' && icon !== null) {
|
|
7738
7750
|
const iconStyle = icon;
|
|
7739
7751
|
return {
|
|
7740
|
-
color: iconStyle.color || '#
|
|
7752
|
+
color: iconStyle.color || '#6734C9',
|
|
7741
7753
|
fontSize: iconStyle.fontSize || '1.1rem',
|
|
7742
|
-
backgroundColor: iconStyle.backgroundColor || '#
|
|
7754
|
+
backgroundColor: iconStyle.backgroundColor || '#F0E7FF',
|
|
7743
7755
|
borderRadius: iconStyle.shape === 'circular' ? '50%' : '12px',
|
|
7744
7756
|
padding: '10px',
|
|
7745
7757
|
display: 'inline-flex',
|
|
@@ -7752,7 +7764,7 @@ class PTMetricPanelComponent {
|
|
|
7752
7764
|
getValueStyles(value) {
|
|
7753
7765
|
if (this.isTitleStyle(value)) {
|
|
7754
7766
|
return {
|
|
7755
|
-
color: value.color || '#
|
|
7767
|
+
color: value.color || '#1F2937',
|
|
7756
7768
|
fontSize: value.fontSize || '0.95rem',
|
|
7757
7769
|
fontWeight: value.fontWeight || '700',
|
|
7758
7770
|
};
|