@ruc-lib/metered-progress-bar 2.0.1 → 3.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.
- package/README.md +58 -27
- package/fesm2022/ruc-lib-metered-progress-bar.mjs +233 -0
- package/fesm2022/ruc-lib-metered-progress-bar.mjs.map +1 -0
- package/index.d.ts +87 -3
- package/package.json +6 -18
- package/esm2020/index.mjs +0 -4
- package/esm2020/lib/enums/lable-position.enum.mjs +0 -9
- package/esm2020/lib/model/metered-bar.config.mjs +0 -5
- package/esm2020/lib/ruc-metered-progress-bar/ruc-metered-progress-bar.component.mjs +0 -194
- package/esm2020/lib/ruclib-metered-progress-bar.module.mjs +0 -20
- package/esm2020/ruc-lib-metered-progress-bar.mjs +0 -5
- package/fesm2015/ruc-lib-metered-progress-bar.mjs +0 -231
- package/fesm2015/ruc-lib-metered-progress-bar.mjs.map +0 -1
- package/fesm2020/ruc-lib-metered-progress-bar.mjs +0 -230
- package/fesm2020/ruc-lib-metered-progress-bar.mjs.map +0 -1
- package/lib/enums/lable-position.enum.d.ts +0 -7
- package/lib/model/metered-bar.config.d.ts +0 -19
- package/lib/ruc-metered-progress-bar/ruc-metered-progress-bar.component.d.ts +0 -58
- package/lib/ruclib-metered-progress-bar.module.d.ts +0 -10
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { MeteredBarConfig } from '../model/metered-bar.config';
|
|
3
|
-
import { LablePositionEnums } from '../enums/lable-position.enum';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/common";
|
|
6
|
-
import * as i2 from "@angular/material/card";
|
|
7
|
-
export class RucMeteredProgressBarComponent {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.hoveredCategoryDetail = null;
|
|
10
|
-
this.hoverLabelStyle = { left: '0px', top: '-28px', display: 'none', transform: 'translateX(-50%)' };
|
|
11
|
-
this.progressPercentage = 0;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Calculates the total value of all categories.
|
|
15
|
-
* @returns The sum of all category values.
|
|
16
|
-
*/
|
|
17
|
-
get totalValue() {
|
|
18
|
-
return this.rucInputData.categories.reduce((sum, category) => sum + category.value, 0);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Calculates the overall progress percentage of the bar based on total value, min, and max.
|
|
22
|
-
* @returns The progress as a percentage (0-100).
|
|
23
|
-
*/
|
|
24
|
-
get progress() {
|
|
25
|
-
return ((this.totalValue - this.rucInputData.min) / (this.rucInputData.max - this.rucInputData.min)) * 100;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Determines if the progress bar is oriented vertically.
|
|
29
|
-
* @returns True if the orientation is 'vertical', false otherwise.
|
|
30
|
-
*/
|
|
31
|
-
get isVertical() {
|
|
32
|
-
return this.rucInputData.orientation === 'vertical';
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Generates the CSS linear-gradient string for the progress bar.
|
|
36
|
-
* The gradient is composed of segments based on category values and colors.
|
|
37
|
-
* If no categories or total value is zero, it returns a transparent gradient.
|
|
38
|
-
* @returns A CSS linear-gradient string.
|
|
39
|
-
*/
|
|
40
|
-
get progressStyles() {
|
|
41
|
-
const direction = this.isVertical ? 'to bottom' : 'to right';
|
|
42
|
-
if (!this.rucInputData || !this.rucInputData.categories) {
|
|
43
|
-
return { background: 'transparent' };
|
|
44
|
-
}
|
|
45
|
-
const total = this.totalValue;
|
|
46
|
-
const colorStops = [];
|
|
47
|
-
let cumulativePercentage = 0;
|
|
48
|
-
if (total > 0) {
|
|
49
|
-
this.rucInputData.categories.forEach(category => {
|
|
50
|
-
if (category.value <= 0)
|
|
51
|
-
return; // Skip categories with zero or negative contribution
|
|
52
|
-
const segmentPercentage = (category.value / total) * 100;
|
|
53
|
-
const color = category.color;
|
|
54
|
-
// Add start of the segment using the previous cumulative percentage
|
|
55
|
-
colorStops.push(`${color} ${cumulativePercentage}%`);
|
|
56
|
-
// Update cumulative percentage for the end of this segment
|
|
57
|
-
cumulativePercentage += segmentPercentage;
|
|
58
|
-
// Add end of the segment
|
|
59
|
-
// Use Math.min to cap at 100% in case of floating point overshoot on the last segment
|
|
60
|
-
colorStops.push(`${color} ${Math.min(cumulativePercentage, 100)}%`);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
if (colorStops.length === 0) {
|
|
64
|
-
return { background: 'transparent' };
|
|
65
|
-
}
|
|
66
|
-
const baseGradient = `linear-gradient(${direction}, ${colorStops.join(', ')})`;
|
|
67
|
-
const styles = {};
|
|
68
|
-
const barStyle = this.rucInputData?.barStyle;
|
|
69
|
-
switch (barStyle) {
|
|
70
|
-
case 'stripe':
|
|
71
|
-
// This uses multiple backgrounds for an overlay effect, as requested.
|
|
72
|
-
styles['background'] = `repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(0, 0, 0, 0.1) 5px, rgba(0, 0, 0, 0.1) 10px), ${baseGradient}`;
|
|
73
|
-
break;
|
|
74
|
-
case 'circle': {
|
|
75
|
-
// This uses a mask. The background is the color, the mask cuts out the shape.
|
|
76
|
-
styles['background'] = baseGradient;
|
|
77
|
-
// A repeating pattern of circles. Each circle has a diameter of 8px, with a 4px gap.
|
|
78
|
-
const circleMask = 'radial-gradient(circle, black 4px, transparent 4px) 0 0 / 12px 12px';
|
|
79
|
-
styles['-webkit-mask'] = circleMask;
|
|
80
|
-
styles['mask'] = circleMask;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
case 'rectangle': {
|
|
84
|
-
styles['background'] = baseGradient;
|
|
85
|
-
// For vertical bar, create horizontal rectangles (0deg). For horizontal bar, create vertical rectangles (90deg).
|
|
86
|
-
const rectDirection = this.isVertical ? '0deg' : '90deg';
|
|
87
|
-
// A repeating pattern of bars. Each bar is 6px wide with a 6px gap.
|
|
88
|
-
const rectangleMask = `repeating-linear-gradient(${rectDirection}, black, black 6px, transparent 6px, transparent 12px)`;
|
|
89
|
-
styles['-webkit-mask'] = rectangleMask;
|
|
90
|
-
styles['mask'] = rectangleMask;
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
default: // 'solid' or undefined
|
|
94
|
-
styles['background'] = baseGradient;
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
return styles;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Handles mouse movement over the progress bar to display category-specific hover details.
|
|
101
|
-
* It calculates the hovered segment based on mouse position and updates the hover label.
|
|
102
|
-
* @param event The MouseEvent object.
|
|
103
|
-
*/
|
|
104
|
-
onProgressMouseMove(event) {
|
|
105
|
-
const progressBarElement = event.target;
|
|
106
|
-
let currentCumulativeGradientPct = 0;
|
|
107
|
-
let foundCategoryForHover = null;
|
|
108
|
-
let hoverPercentage_onFilledBar = 0;
|
|
109
|
-
let mousePositionWithinProgressDiv = 0;
|
|
110
|
-
if (this.isVertical) {
|
|
111
|
-
mousePositionWithinProgressDiv = event.offsetY; // Y position within the .progress div
|
|
112
|
-
const filledHeightPx = progressBarElement.offsetHeight;
|
|
113
|
-
if (filledHeightPx <= 0) { // Avoid division by zero if element has no height
|
|
114
|
-
this.onProgressMouseLeave();
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
hoverPercentage_onFilledBar = (mousePositionWithinProgressDiv / filledHeightPx) * 100;
|
|
118
|
-
}
|
|
119
|
-
else { // Horizontal
|
|
120
|
-
mousePositionWithinProgressDiv = event.offsetX; // X position within the .progress div
|
|
121
|
-
const filledWidthPx = progressBarElement.offsetWidth;
|
|
122
|
-
if (filledWidthPx <= 0) { // Avoid division by zero if element has no width
|
|
123
|
-
this.onProgressMouseLeave();
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
hoverPercentage_onFilledBar = (mousePositionWithinProgressDiv / filledWidthPx) * 100;
|
|
127
|
-
}
|
|
128
|
-
if (this.totalValue > 0) {
|
|
129
|
-
for (const category of this.rucInputData.categories) {
|
|
130
|
-
if (category.value <= 0)
|
|
131
|
-
continue; // Skip categories with zero or negative contribution
|
|
132
|
-
const segmentGradientPct = (category.value / this.totalValue) * 100;
|
|
133
|
-
const segmentStartGradientPct = currentCumulativeGradientPct;
|
|
134
|
-
const segmentEndGradientPct = currentCumulativeGradientPct + segmentGradientPct;
|
|
135
|
-
// Ensure hoverPercentage is within the segment, handling potential floating point inaccuracies for the last segment
|
|
136
|
-
if (hoverPercentage_onFilledBar >= segmentStartGradientPct && // Check if mouse is within or at the start of the segment
|
|
137
|
-
(hoverPercentage_onFilledBar < segmentEndGradientPct ||
|
|
138
|
-
(segmentEndGradientPct >= 99.99 && hoverPercentage_onFilledBar <= 100.01))) { // Tolerate slight overshoot for last segment
|
|
139
|
-
foundCategoryForHover = category;
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
currentCumulativeGradientPct = segmentEndGradientPct;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
if (foundCategoryForHover) {
|
|
146
|
-
const percentageOfMax = (foundCategoryForHover.value / this.rucInputData.max) * 100; // Calculate percentage relative to max value
|
|
147
|
-
this.hoveredCategoryDetail = { category: foundCategoryForHover, percentageText: percentageOfMax.toFixed(0) + '%' };
|
|
148
|
-
if (this.isVertical) {
|
|
149
|
-
this.hoverLabelStyle = {
|
|
150
|
-
left: 'calc(100% + 5px)',
|
|
151
|
-
top: mousePositionWithinProgressDiv + 'px',
|
|
152
|
-
display: 'block',
|
|
153
|
-
transform: 'translateY(-50%)' // Vertically center label on mouse Y
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
this.hoverLabelStyle = {
|
|
158
|
-
left: mousePositionWithinProgressDiv + 'px',
|
|
159
|
-
top: '-28px',
|
|
160
|
-
display: 'block',
|
|
161
|
-
transform: 'translateX(-50%)' // Horizontally center label on mouse X
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
this.hoveredCategoryDetail = null;
|
|
167
|
-
this.hoverLabelStyle = { ...this.hoverLabelStyle, display: 'none' };
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Hides the hover label when the mouse leaves the progress bar.
|
|
172
|
-
*/
|
|
173
|
-
onProgressMouseLeave() {
|
|
174
|
-
this.hoveredCategoryDetail = null;
|
|
175
|
-
this.hoverLabelStyle = { ...this.hoverLabelStyle, display: 'none' };
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* get the label position string value
|
|
179
|
-
*/
|
|
180
|
-
get LablePositionEnums() {
|
|
181
|
-
return LablePositionEnums;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
RucMeteredProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucMeteredProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
185
|
-
RucMeteredProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RucMeteredProgressBarComponent, selector: "uxp-ruc-metered-progress-bar", inputs: { rucInputData: "rucInputData", customTheme: "customTheme" }, ngImport: i0, template: "<div class=\"progress-container\" class={{customTheme}} [class.vertical]=\"isVertical\" [class.horizontal]=\"!isVertical\">\r\n <div class=\"progress-bar\">\r\n <!-- Removed (mouseenter) and (mouseleave) from progress-bar if only category hover is needed -->\r\n <div *ngIf=\"rucInputData.barLabels\" class=\"progress-label-container {{rucInputData.orientation}}\">\r\n <p class=\"progress-label\">{{progress | number:'1.0-0'}}% of {{rucInputData.max}} {{rucInputData.unitType}}\r\n Used</p>\r\n </div>\r\n <!-- <mat-progress-bar> -->\r\n <div class=\"progress\" [style.width]=\"isVertical ? '100%' : progress + '%'\"\r\n [style.height]=\"isVertical ? progress + '%' : '100%'\"\r\n [style.transition]=\"rucInputData.orientation === 'vertical' ? 'height 0.3s ease' : 'width 0.3s ease'\"\r\n [ngStyle]=\"progressStyles\">\r\n <!-- This div is now only for displaying the colored bar -->\r\n </div>\r\n <!-- </mat-progress-bar> -->\r\n <!-- The hover label is now a sibling to .progress, positioned absolutely within .progress-bar -->\r\n <div class=\"hover-label\" *ngIf=\"hoveredCategoryDetail\" [ngStyle]=\"hoverLabelStyle\">\r\n {{hoveredCategoryDetail.category.label}}: {{hoveredCategoryDetail.percentageText}}\r\n </div>\r\n <!-- This overlay is now a sibling to .progress, sized to match it, to reliably capture mouse events -->\r\n <div class=\"progress-event-overlay\" [style.width]=\"isVertical ? '100%' : progress + '%'\"\r\n [style.height]=\"isVertical ? progress + '%' : '100%'\" (mousemove)=\"onProgressMouseMove($event)\"\r\n (mouseleave)=\"onProgressMouseLeave()\"></div>\r\n </div>\r\n <div class=\"categories-container\" *ngIf=\"rucInputData.categories.length > 0\">\r\n <div *ngIf=\"rucInputData.showCategoryLabels && rucInputData.categoryLabelStyle === 'basic'\" [ngClass]=\"{\r\n 'categories-block-top': !isVertical && (rucInputData.categoryLabelsOrientation === 'top' || rucInputData.categoryLabelsOrientation === 'same'),\r\n 'categories-block-left': isVertical && (rucInputData.categoryLabelsOrientation === 'left' || rucInputData.categoryLabelsOrientation === 'same'),\r\n 'categories-block-right': isVertical && !(rucInputData.categoryLabelsOrientation === 'left' || rucInputData.categoryLabelsOrientation === 'same')\r\n }\" class=\"categories\">\r\n <div class=\"category\" *ngFor=\"let category of rucInputData.categories\" [style.color]=\"category.color\">\r\n <ng-container *ngIf=\"category.icon !== undefined\">\r\n <div *ngIf=\"category.icon; else colorDotBasic\" class=\"category-icon-wrapper\">\r\n <i class=\"material-icons\" [style.color]=\"category.color\">{{ category.icon }}</i>\r\n </div>\r\n <ng-template #colorDotBasic>\r\n <div class=\"category-color\">\r\n <div class=\"color-gradient\"\r\n [style.background]=\"category.color ? 'linear-gradient(to right, ' + category.color + ', ' + category.color + ')' : ''\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <span class=\"category-label\">{{category.label}}</span>\r\n <p class=\"category-value\">({{(category.value / rucInputData.max * 100) | number:'1.0-0' }}%)</p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"rucInputData.showCategoryLabels && rucInputData.categoryLabelStyle === 'widget'\"\r\n class=\"categories widget-style\" [ngClass]=\"{\r\n 'categories-block-top': !isVertical && (rucInputData.categoryLabelsOrientation === LablePositionEnums.top || rucInputData.categoryLabelsOrientation === LablePositionEnums.same),\r\n 'categories-block-left': isVertical && (rucInputData.categoryLabelsOrientation === LablePositionEnums.left || rucInputData.categoryLabelsOrientation === LablePositionEnums.same),\r\n 'categories-block-right': isVertical && !(rucInputData.categoryLabelsOrientation === LablePositionEnums.left || rucInputData.categoryLabelsOrientation === LablePositionEnums.same)\r\n }\">\r\n <ng-container *ngFor=\"let category of rucInputData.categories\">\r\n <mat-card>\r\n <div class=\"widget-category\">\r\n <div class=\"widget-content\">\r\n <div class=\"widget-icon-box\">\r\n <ng-container *ngIf=\"category.icon !== undefined\">\r\n <div *ngIf=\"category.icon; else colorDotWidget\" class=\"widget-icon\">\r\n <i class=\"material-icons\" [style.color]=\"category.color\">{{ category.icon }}</i>\r\n </div>\r\n <ng-template #colorDotWidget>\r\n <div class=\"category-color\">\r\n <div class=\"color-gradient\"\r\n [style.background]=\"category.color ? 'linear-gradient(to right, ' + category.color + ', ' + category.color + ')' : ''\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <div class=\"widget-label\">{{category.label}}</div>\r\n </div>\r\n </div>\r\n <div class=\"widget-value\">\r\n <div>{{category.value}}</div>\r\n </div>\r\n </div>\r\n </mat-card>\r\n\r\n\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".progress-container{position:relative;margin:20px 0}.progress-container.horizontal{width:100%;height:35px}.progress-container.horizontal .progress-bar{width:100%;height:42%}.progress-container.vertical{width:60px;height:320px;margin:0 auto}.progress-container.vertical .progress-bar{width:24%;height:100%}.progress-label-container{position:absolute;z-index:2;width:100%;height:100%;pointer-events:none;display:flex}.progress-label-container.horizontal{justify-content:right;align-items:flex-end;bottom:15px}.progress-label-container.vertical{justify-content:flex-start;align-items:flex-end;left:35px}.progress-label{padding:2px 5px;font-size:12px;white-space:nowrap}.progress-label-container.horizontal .progress-label{margin-top:5px;margin-right:5px}.progress-label-container.vertical .progress-label{transform:rotate(-90deg);transform-origin:bottom left;margin-right:5px}.progress-bar{position:relative;border:1px solid #e0e0e0;border-radius:4px}.progress-bar .hover-label{position:absolute;top:-28px;left:50%;transform:translate(-50%);background-color:#000c;color:#fff;padding:4px 8px;border-radius:4px;font-size:.8em;z-index:5;white-space:nowrap;pointer-events:none}.progress-event-overlay{position:absolute;top:0;left:0;z-index:4}.progress{position:relative;background:#2196F3;transition:width .3s ease,height .3s ease}.progress-bar.horizontal .progress{width:100%;height:100%}.progress-bar.vertical .progress{width:100%;height:0}.icons-container{position:absolute;display:flex;justify-content:space-between;width:100%;height:100%;align-items:center}.icons-container i{position:absolute;font-size:1.2em;color:#fff}.start-icon{left:0}.end-icon{right:0}.above-threshold{color:gold}.categories-container{width:100%;box-sizing:border-box}.categories{display:flex;flex-direction:row;flex-wrap:wrap;gap:1px}.categories-block-top,.categories-block-bottom,.categories-block-left,.categories-block-right{position:absolute;z-index:1}.categories-block-top{bottom:100%;left:0;padding-bottom:8px}.categories-block-bottom{top:100%;left:0;padding-top:10px}.categories-block-left{right:100%;top:0;padding-right:8px;width:200px}.categories-block-left .categories{flex-direction:inherit;align-items:flex-start;gap:0px}.categories-block-right{left:100%;top:0;padding-left:8px;width:200px}.categories-block-right .categories{flex-direction:inherit;align-items:flex-start;gap:0px}.category{display:flex;align-items:center;gap:6px;padding:8px;border-radius:4px}.category-label{font-weight:500}.category-value{font-size:.9em}.category-color{width:10px;height:10px;border-radius:50%;overflow:hidden;flex-shrink:0}.category-icon-wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.color-gradient{width:100%;height:100%}.categories.widget-style{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start;align-items:flex-start;margin:10px 0}.categories.widget-style .widget-category{width:calc(25% - 7.5px);min-width:159px;box-sizing:border-box;flex-shrink:0;flex-grow:0}@media (max-width: 1200px){.categories.widget-style .widget-category{width:calc(33.33% - 6.66px)}}@media (max-width: 768px){.categories.widget-style .widget-category{width:calc(50% - 5px)}}@media (max-width: 480px){.categories.widget-style .widget-category{width:100%}}.categories-block-left,.categories-block-right{flex-direction:inherit;align-items:flex-start;gap:10px}.categories-block-left .widget-category,.categories-block-right .widget-category{width:100%;max-width:none}.widget-category{padding:10px 15px}.widget-content{display:flex;width:100%;align-items:center;margin:0}.widget-icon{border:1px solid #ddd;border-radius:10px;width:35px;height:35px;line-height:45px;text-align:center;background-color:#fdfdfd}.widget-content .category-color{margin-right:35px}.widget-icon,.widget-color{margin-right:8px;flex-shrink:0}.widget-color{width:24px;height:24px;border-radius:50%}.widget-label{flex-grow:1;text-align:left;display:block}.widget-value{font-weight:700;flex-shrink:0;margin-left:45px;text-align:left;margin-top:5px}.widget-icon-box{display:flex;align-items:center}\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: i2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] });
|
|
186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucMeteredProgressBarComponent, decorators: [{
|
|
187
|
-
type: Component,
|
|
188
|
-
args: [{ selector: 'uxp-ruc-metered-progress-bar', template: "<div class=\"progress-container\" class={{customTheme}} [class.vertical]=\"isVertical\" [class.horizontal]=\"!isVertical\">\r\n <div class=\"progress-bar\">\r\n <!-- Removed (mouseenter) and (mouseleave) from progress-bar if only category hover is needed -->\r\n <div *ngIf=\"rucInputData.barLabels\" class=\"progress-label-container {{rucInputData.orientation}}\">\r\n <p class=\"progress-label\">{{progress | number:'1.0-0'}}% of {{rucInputData.max}} {{rucInputData.unitType}}\r\n Used</p>\r\n </div>\r\n <!-- <mat-progress-bar> -->\r\n <div class=\"progress\" [style.width]=\"isVertical ? '100%' : progress + '%'\"\r\n [style.height]=\"isVertical ? progress + '%' : '100%'\"\r\n [style.transition]=\"rucInputData.orientation === 'vertical' ? 'height 0.3s ease' : 'width 0.3s ease'\"\r\n [ngStyle]=\"progressStyles\">\r\n <!-- This div is now only for displaying the colored bar -->\r\n </div>\r\n <!-- </mat-progress-bar> -->\r\n <!-- The hover label is now a sibling to .progress, positioned absolutely within .progress-bar -->\r\n <div class=\"hover-label\" *ngIf=\"hoveredCategoryDetail\" [ngStyle]=\"hoverLabelStyle\">\r\n {{hoveredCategoryDetail.category.label}}: {{hoveredCategoryDetail.percentageText}}\r\n </div>\r\n <!-- This overlay is now a sibling to .progress, sized to match it, to reliably capture mouse events -->\r\n <div class=\"progress-event-overlay\" [style.width]=\"isVertical ? '100%' : progress + '%'\"\r\n [style.height]=\"isVertical ? progress + '%' : '100%'\" (mousemove)=\"onProgressMouseMove($event)\"\r\n (mouseleave)=\"onProgressMouseLeave()\"></div>\r\n </div>\r\n <div class=\"categories-container\" *ngIf=\"rucInputData.categories.length > 0\">\r\n <div *ngIf=\"rucInputData.showCategoryLabels && rucInputData.categoryLabelStyle === 'basic'\" [ngClass]=\"{\r\n 'categories-block-top': !isVertical && (rucInputData.categoryLabelsOrientation === 'top' || rucInputData.categoryLabelsOrientation === 'same'),\r\n 'categories-block-left': isVertical && (rucInputData.categoryLabelsOrientation === 'left' || rucInputData.categoryLabelsOrientation === 'same'),\r\n 'categories-block-right': isVertical && !(rucInputData.categoryLabelsOrientation === 'left' || rucInputData.categoryLabelsOrientation === 'same')\r\n }\" class=\"categories\">\r\n <div class=\"category\" *ngFor=\"let category of rucInputData.categories\" [style.color]=\"category.color\">\r\n <ng-container *ngIf=\"category.icon !== undefined\">\r\n <div *ngIf=\"category.icon; else colorDotBasic\" class=\"category-icon-wrapper\">\r\n <i class=\"material-icons\" [style.color]=\"category.color\">{{ category.icon }}</i>\r\n </div>\r\n <ng-template #colorDotBasic>\r\n <div class=\"category-color\">\r\n <div class=\"color-gradient\"\r\n [style.background]=\"category.color ? 'linear-gradient(to right, ' + category.color + ', ' + category.color + ')' : ''\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <span class=\"category-label\">{{category.label}}</span>\r\n <p class=\"category-value\">({{(category.value / rucInputData.max * 100) | number:'1.0-0' }}%)</p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"rucInputData.showCategoryLabels && rucInputData.categoryLabelStyle === 'widget'\"\r\n class=\"categories widget-style\" [ngClass]=\"{\r\n 'categories-block-top': !isVertical && (rucInputData.categoryLabelsOrientation === LablePositionEnums.top || rucInputData.categoryLabelsOrientation === LablePositionEnums.same),\r\n 'categories-block-left': isVertical && (rucInputData.categoryLabelsOrientation === LablePositionEnums.left || rucInputData.categoryLabelsOrientation === LablePositionEnums.same),\r\n 'categories-block-right': isVertical && !(rucInputData.categoryLabelsOrientation === LablePositionEnums.left || rucInputData.categoryLabelsOrientation === LablePositionEnums.same)\r\n }\">\r\n <ng-container *ngFor=\"let category of rucInputData.categories\">\r\n <mat-card>\r\n <div class=\"widget-category\">\r\n <div class=\"widget-content\">\r\n <div class=\"widget-icon-box\">\r\n <ng-container *ngIf=\"category.icon !== undefined\">\r\n <div *ngIf=\"category.icon; else colorDotWidget\" class=\"widget-icon\">\r\n <i class=\"material-icons\" [style.color]=\"category.color\">{{ category.icon }}</i>\r\n </div>\r\n <ng-template #colorDotWidget>\r\n <div class=\"category-color\">\r\n <div class=\"color-gradient\"\r\n [style.background]=\"category.color ? 'linear-gradient(to right, ' + category.color + ', ' + category.color + ')' : ''\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <div class=\"widget-label\">{{category.label}}</div>\r\n </div>\r\n </div>\r\n <div class=\"widget-value\">\r\n <div>{{category.value}}</div>\r\n </div>\r\n </div>\r\n </mat-card>\r\n\r\n\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".progress-container{position:relative;margin:20px 0}.progress-container.horizontal{width:100%;height:35px}.progress-container.horizontal .progress-bar{width:100%;height:42%}.progress-container.vertical{width:60px;height:320px;margin:0 auto}.progress-container.vertical .progress-bar{width:24%;height:100%}.progress-label-container{position:absolute;z-index:2;width:100%;height:100%;pointer-events:none;display:flex}.progress-label-container.horizontal{justify-content:right;align-items:flex-end;bottom:15px}.progress-label-container.vertical{justify-content:flex-start;align-items:flex-end;left:35px}.progress-label{padding:2px 5px;font-size:12px;white-space:nowrap}.progress-label-container.horizontal .progress-label{margin-top:5px;margin-right:5px}.progress-label-container.vertical .progress-label{transform:rotate(-90deg);transform-origin:bottom left;margin-right:5px}.progress-bar{position:relative;border:1px solid #e0e0e0;border-radius:4px}.progress-bar .hover-label{position:absolute;top:-28px;left:50%;transform:translate(-50%);background-color:#000c;color:#fff;padding:4px 8px;border-radius:4px;font-size:.8em;z-index:5;white-space:nowrap;pointer-events:none}.progress-event-overlay{position:absolute;top:0;left:0;z-index:4}.progress{position:relative;background:#2196F3;transition:width .3s ease,height .3s ease}.progress-bar.horizontal .progress{width:100%;height:100%}.progress-bar.vertical .progress{width:100%;height:0}.icons-container{position:absolute;display:flex;justify-content:space-between;width:100%;height:100%;align-items:center}.icons-container i{position:absolute;font-size:1.2em;color:#fff}.start-icon{left:0}.end-icon{right:0}.above-threshold{color:gold}.categories-container{width:100%;box-sizing:border-box}.categories{display:flex;flex-direction:row;flex-wrap:wrap;gap:1px}.categories-block-top,.categories-block-bottom,.categories-block-left,.categories-block-right{position:absolute;z-index:1}.categories-block-top{bottom:100%;left:0;padding-bottom:8px}.categories-block-bottom{top:100%;left:0;padding-top:10px}.categories-block-left{right:100%;top:0;padding-right:8px;width:200px}.categories-block-left .categories{flex-direction:inherit;align-items:flex-start;gap:0px}.categories-block-right{left:100%;top:0;padding-left:8px;width:200px}.categories-block-right .categories{flex-direction:inherit;align-items:flex-start;gap:0px}.category{display:flex;align-items:center;gap:6px;padding:8px;border-radius:4px}.category-label{font-weight:500}.category-value{font-size:.9em}.category-color{width:10px;height:10px;border-radius:50%;overflow:hidden;flex-shrink:0}.category-icon-wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.color-gradient{width:100%;height:100%}.categories.widget-style{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start;align-items:flex-start;margin:10px 0}.categories.widget-style .widget-category{width:calc(25% - 7.5px);min-width:159px;box-sizing:border-box;flex-shrink:0;flex-grow:0}@media (max-width: 1200px){.categories.widget-style .widget-category{width:calc(33.33% - 6.66px)}}@media (max-width: 768px){.categories.widget-style .widget-category{width:calc(50% - 5px)}}@media (max-width: 480px){.categories.widget-style .widget-category{width:100%}}.categories-block-left,.categories-block-right{flex-direction:inherit;align-items:flex-start;gap:10px}.categories-block-left .widget-category,.categories-block-right .widget-category{width:100%;max-width:none}.widget-category{padding:10px 15px}.widget-content{display:flex;width:100%;align-items:center;margin:0}.widget-icon{border:1px solid #ddd;border-radius:10px;width:35px;height:35px;line-height:45px;text-align:center;background-color:#fdfdfd}.widget-content .category-color{margin-right:35px}.widget-icon,.widget-color{margin-right:8px;flex-shrink:0}.widget-color{width:24px;height:24px;border-radius:50%}.widget-label{flex-grow:1;text-align:left;display:block}.widget-value{font-weight:700;flex-shrink:0;margin-left:45px;text-align:left;margin-top:5px}.widget-icon-box{display:flex;align-items:center}\n"] }]
|
|
189
|
-
}], propDecorators: { rucInputData: [{
|
|
190
|
-
type: Input
|
|
191
|
-
}], customTheme: [{
|
|
192
|
-
type: Input
|
|
193
|
-
}] } });
|
|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gIDxkaXYgY2xhc3M9XCJjYXRlZ29yeS1jb2xvclwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNvbG9yLWdyYWRpZW50XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgW3N0eWxlLmJhY2tncm91bmRdPVwiY2F0ZWdvcnkuY29sb3IgPyAnbGluZWFyLWdyYWRpZW50KHRvIHJpZ2h0LCAnICsgY2F0ZWdvcnkuY29sb3IgKyAnLCAnICsgY2F0ZWdvcnkuY29sb3IgKyAnKScgOiAnJ1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgIDwvbmctdGVtcGxhdGU+XHJcbiAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ3aWRnZXQtbGFiZWxcIj57e2NhdGVnb3J5LmxhYmVsfX08L2Rpdj5cclxuICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ3aWRnZXQtdmFsdWVcIj5cclxuICAgICAgICAgICAgICA8ZGl2Pnt7Y2F0ZWdvcnkudmFsdWV9fTwvZGl2PlxyXG4gICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgIDwvbWF0LWNhcmQ+XHJcblxyXG5cclxuICAgICAgPC9uZy1jb250YWluZXI+XHJcbiAgICA8L2Rpdj5cclxuXHJcbiAgPC9kaXY+XHJcbjwvZGl2PiJdfQ==
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
4
|
-
import { RucMeteredProgressBarComponent } from './ruc-metered-progress-bar/ruc-metered-progress-bar.component';
|
|
5
|
-
import { MatCardModule } from '@angular/material/card';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export class RuclibMeteredProgressBarModule {
|
|
8
|
-
}
|
|
9
|
-
RuclibMeteredProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10
|
-
RuclibMeteredProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, declarations: [RucMeteredProgressBarComponent], imports: [CommonModule, MatIconModule, MatCardModule], exports: [RucMeteredProgressBarComponent] });
|
|
11
|
-
RuclibMeteredProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, imports: [CommonModule, MatIconModule, MatCardModule] });
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, decorators: [{
|
|
13
|
-
type: NgModule,
|
|
14
|
-
args: [{
|
|
15
|
-
imports: [CommonModule, MatIconModule, MatCardModule],
|
|
16
|
-
declarations: [RucMeteredProgressBarComponent],
|
|
17
|
-
exports: [RucMeteredProgressBarComponent],
|
|
18
|
-
}]
|
|
19
|
-
}] });
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVjbGliLW1ldGVyZWQtcHJvZ3Jlc3MtYmFyLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvcnVjbGliLW1ldGVyZWQtcHJvZ3Jlc3MtYmFyLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx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mVkLXByb2dyZXNzLWJhci5jb21wb25lbnQnO1xyXG5pbXBvcnQgeyBNYXRDYXJkTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvbWF0ZXJpYWwvY2FyZCc7XHJcblxyXG5cclxuQE5nTW9kdWxlKHtcclxuICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlLE1hdEljb25Nb2R1bGUsTWF0Q2FyZE1vZHVsZV0sXHJcbiAgZGVjbGFyYXRpb25zOiBbUnVjTWV0ZXJlZFByb2dyZXNzQmFyQ29tcG9uZW50XSxcclxuICBleHBvcnRzOiBbUnVjTWV0ZXJlZFByb2dyZXNzQmFyQ29tcG9uZW50XSxcclxufSlcclxuZXhwb3J0IGNsYXNzIFJ1Y2xpYk1ldGVyZWRQcm9ncmVzc0Jhck1vZHVsZSB7fVxyXG4iXX0=
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVjLWxpYi1tZXRlcmVkLXByb2dyZXNzLWJhci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWMtbGliLW1ldGVyZWQtcHJvZ3Jlc3MtYmFyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
6
|
-
import * as i2 from '@angular/material/card';
|
|
7
|
-
import { MatCardModule } from '@angular/material/card';
|
|
8
|
-
|
|
9
|
-
var LablePositionEnums;
|
|
10
|
-
(function (LablePositionEnums) {
|
|
11
|
-
LablePositionEnums["left"] = "left";
|
|
12
|
-
LablePositionEnums["right"] = "right";
|
|
13
|
-
LablePositionEnums["same"] = "same";
|
|
14
|
-
LablePositionEnums["top"] = "top";
|
|
15
|
-
LablePositionEnums["bottom"] = "bottom";
|
|
16
|
-
})(LablePositionEnums || (LablePositionEnums = {}));
|
|
17
|
-
|
|
18
|
-
class RucMeteredProgressBarComponent {
|
|
19
|
-
constructor() {
|
|
20
|
-
this.hoveredCategoryDetail = null;
|
|
21
|
-
this.hoverLabelStyle = { left: '0px', top: '-28px', display: 'none', transform: 'translateX(-50%)' };
|
|
22
|
-
this.progressPercentage = 0;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Calculates the total value of all categories.
|
|
26
|
-
* @returns The sum of all category values.
|
|
27
|
-
*/
|
|
28
|
-
get totalValue() {
|
|
29
|
-
return this.rucInputData.categories.reduce((sum, category) => sum + category.value, 0);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Calculates the overall progress percentage of the bar based on total value, min, and max.
|
|
33
|
-
* @returns The progress as a percentage (0-100).
|
|
34
|
-
*/
|
|
35
|
-
get progress() {
|
|
36
|
-
return ((this.totalValue - this.rucInputData.min) / (this.rucInputData.max - this.rucInputData.min)) * 100;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Determines if the progress bar is oriented vertically.
|
|
40
|
-
* @returns True if the orientation is 'vertical', false otherwise.
|
|
41
|
-
*/
|
|
42
|
-
get isVertical() {
|
|
43
|
-
return this.rucInputData.orientation === 'vertical';
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Generates the CSS linear-gradient string for the progress bar.
|
|
47
|
-
* The gradient is composed of segments based on category values and colors.
|
|
48
|
-
* If no categories or total value is zero, it returns a transparent gradient.
|
|
49
|
-
* @returns A CSS linear-gradient string.
|
|
50
|
-
*/
|
|
51
|
-
get progressStyles() {
|
|
52
|
-
var _a;
|
|
53
|
-
const direction = this.isVertical ? 'to bottom' : 'to right';
|
|
54
|
-
if (!this.rucInputData || !this.rucInputData.categories) {
|
|
55
|
-
return { background: 'transparent' };
|
|
56
|
-
}
|
|
57
|
-
const total = this.totalValue;
|
|
58
|
-
const colorStops = [];
|
|
59
|
-
let cumulativePercentage = 0;
|
|
60
|
-
if (total > 0) {
|
|
61
|
-
this.rucInputData.categories.forEach(category => {
|
|
62
|
-
if (category.value <= 0)
|
|
63
|
-
return; // Skip categories with zero or negative contribution
|
|
64
|
-
const segmentPercentage = (category.value / total) * 100;
|
|
65
|
-
const color = category.color;
|
|
66
|
-
// Add start of the segment using the previous cumulative percentage
|
|
67
|
-
colorStops.push(`${color} ${cumulativePercentage}%`);
|
|
68
|
-
// Update cumulative percentage for the end of this segment
|
|
69
|
-
cumulativePercentage += segmentPercentage;
|
|
70
|
-
// Add end of the segment
|
|
71
|
-
// Use Math.min to cap at 100% in case of floating point overshoot on the last segment
|
|
72
|
-
colorStops.push(`${color} ${Math.min(cumulativePercentage, 100)}%`);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
if (colorStops.length === 0) {
|
|
76
|
-
return { background: 'transparent' };
|
|
77
|
-
}
|
|
78
|
-
const baseGradient = `linear-gradient(${direction}, ${colorStops.join(', ')})`;
|
|
79
|
-
const styles = {};
|
|
80
|
-
const barStyle = (_a = this.rucInputData) === null || _a === void 0 ? void 0 : _a.barStyle;
|
|
81
|
-
switch (barStyle) {
|
|
82
|
-
case 'stripe':
|
|
83
|
-
// This uses multiple backgrounds for an overlay effect, as requested.
|
|
84
|
-
styles['background'] = `repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(0, 0, 0, 0.1) 5px, rgba(0, 0, 0, 0.1) 10px), ${baseGradient}`;
|
|
85
|
-
break;
|
|
86
|
-
case 'circle': {
|
|
87
|
-
// This uses a mask. The background is the color, the mask cuts out the shape.
|
|
88
|
-
styles['background'] = baseGradient;
|
|
89
|
-
// A repeating pattern of circles. Each circle has a diameter of 8px, with a 4px gap.
|
|
90
|
-
const circleMask = 'radial-gradient(circle, black 4px, transparent 4px) 0 0 / 12px 12px';
|
|
91
|
-
styles['-webkit-mask'] = circleMask;
|
|
92
|
-
styles['mask'] = circleMask;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
case 'rectangle': {
|
|
96
|
-
styles['background'] = baseGradient;
|
|
97
|
-
// For vertical bar, create horizontal rectangles (0deg). For horizontal bar, create vertical rectangles (90deg).
|
|
98
|
-
const rectDirection = this.isVertical ? '0deg' : '90deg';
|
|
99
|
-
// A repeating pattern of bars. Each bar is 6px wide with a 6px gap.
|
|
100
|
-
const rectangleMask = `repeating-linear-gradient(${rectDirection}, black, black 6px, transparent 6px, transparent 12px)`;
|
|
101
|
-
styles['-webkit-mask'] = rectangleMask;
|
|
102
|
-
styles['mask'] = rectangleMask;
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
default: // 'solid' or undefined
|
|
106
|
-
styles['background'] = baseGradient;
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
return styles;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Handles mouse movement over the progress bar to display category-specific hover details.
|
|
113
|
-
* It calculates the hovered segment based on mouse position and updates the hover label.
|
|
114
|
-
* @param event The MouseEvent object.
|
|
115
|
-
*/
|
|
116
|
-
onProgressMouseMove(event) {
|
|
117
|
-
const progressBarElement = event.target;
|
|
118
|
-
let currentCumulativeGradientPct = 0;
|
|
119
|
-
let foundCategoryForHover = null;
|
|
120
|
-
let hoverPercentage_onFilledBar = 0;
|
|
121
|
-
let mousePositionWithinProgressDiv = 0;
|
|
122
|
-
if (this.isVertical) {
|
|
123
|
-
mousePositionWithinProgressDiv = event.offsetY; // Y position within the .progress div
|
|
124
|
-
const filledHeightPx = progressBarElement.offsetHeight;
|
|
125
|
-
if (filledHeightPx <= 0) { // Avoid division by zero if element has no height
|
|
126
|
-
this.onProgressMouseLeave();
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
hoverPercentage_onFilledBar = (mousePositionWithinProgressDiv / filledHeightPx) * 100;
|
|
130
|
-
}
|
|
131
|
-
else { // Horizontal
|
|
132
|
-
mousePositionWithinProgressDiv = event.offsetX; // X position within the .progress div
|
|
133
|
-
const filledWidthPx = progressBarElement.offsetWidth;
|
|
134
|
-
if (filledWidthPx <= 0) { // Avoid division by zero if element has no width
|
|
135
|
-
this.onProgressMouseLeave();
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
hoverPercentage_onFilledBar = (mousePositionWithinProgressDiv / filledWidthPx) * 100;
|
|
139
|
-
}
|
|
140
|
-
if (this.totalValue > 0) {
|
|
141
|
-
for (const category of this.rucInputData.categories) {
|
|
142
|
-
if (category.value <= 0)
|
|
143
|
-
continue; // Skip categories with zero or negative contribution
|
|
144
|
-
const segmentGradientPct = (category.value / this.totalValue) * 100;
|
|
145
|
-
const segmentStartGradientPct = currentCumulativeGradientPct;
|
|
146
|
-
const segmentEndGradientPct = currentCumulativeGradientPct + segmentGradientPct;
|
|
147
|
-
// Ensure hoverPercentage is within the segment, handling potential floating point inaccuracies for the last segment
|
|
148
|
-
if (hoverPercentage_onFilledBar >= segmentStartGradientPct && // Check if mouse is within or at the start of the segment
|
|
149
|
-
(hoverPercentage_onFilledBar < segmentEndGradientPct ||
|
|
150
|
-
(segmentEndGradientPct >= 99.99 && hoverPercentage_onFilledBar <= 100.01))) { // Tolerate slight overshoot for last segment
|
|
151
|
-
foundCategoryForHover = category;
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
currentCumulativeGradientPct = segmentEndGradientPct;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
if (foundCategoryForHover) {
|
|
158
|
-
const percentageOfMax = (foundCategoryForHover.value / this.rucInputData.max) * 100; // Calculate percentage relative to max value
|
|
159
|
-
this.hoveredCategoryDetail = { category: foundCategoryForHover, percentageText: percentageOfMax.toFixed(0) + '%' };
|
|
160
|
-
if (this.isVertical) {
|
|
161
|
-
this.hoverLabelStyle = {
|
|
162
|
-
left: 'calc(100% + 5px)',
|
|
163
|
-
top: mousePositionWithinProgressDiv + 'px',
|
|
164
|
-
display: 'block',
|
|
165
|
-
transform: 'translateY(-50%)' // Vertically center label on mouse Y
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
this.hoverLabelStyle = {
|
|
170
|
-
left: mousePositionWithinProgressDiv + 'px',
|
|
171
|
-
top: '-28px',
|
|
172
|
-
display: 'block',
|
|
173
|
-
transform: 'translateX(-50%)' // Horizontally center label on mouse X
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
this.hoveredCategoryDetail = null;
|
|
179
|
-
this.hoverLabelStyle = Object.assign(Object.assign({}, this.hoverLabelStyle), { display: 'none' });
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Hides the hover label when the mouse leaves the progress bar.
|
|
184
|
-
*/
|
|
185
|
-
onProgressMouseLeave() {
|
|
186
|
-
this.hoveredCategoryDetail = null;
|
|
187
|
-
this.hoverLabelStyle = Object.assign(Object.assign({}, this.hoverLabelStyle), { display: 'none' });
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* get the label position string value
|
|
191
|
-
*/
|
|
192
|
-
get LablePositionEnums() {
|
|
193
|
-
return LablePositionEnums;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
RucMeteredProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucMeteredProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
197
|
-
RucMeteredProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RucMeteredProgressBarComponent, selector: "uxp-ruc-metered-progress-bar", inputs: { rucInputData: "rucInputData", customTheme: "customTheme" }, ngImport: i0, template: "<div class=\"progress-container\" class={{customTheme}} [class.vertical]=\"isVertical\" [class.horizontal]=\"!isVertical\">\r\n <div class=\"progress-bar\">\r\n <!-- Removed (mouseenter) and (mouseleave) from progress-bar if only category hover is needed -->\r\n <div *ngIf=\"rucInputData.barLabels\" class=\"progress-label-container {{rucInputData.orientation}}\">\r\n <p class=\"progress-label\">{{progress | number:'1.0-0'}}% of {{rucInputData.max}} {{rucInputData.unitType}}\r\n Used</p>\r\n </div>\r\n <!-- <mat-progress-bar> -->\r\n <div class=\"progress\" [style.width]=\"isVertical ? '100%' : progress + '%'\"\r\n [style.height]=\"isVertical ? progress + '%' : '100%'\"\r\n [style.transition]=\"rucInputData.orientation === 'vertical' ? 'height 0.3s ease' : 'width 0.3s ease'\"\r\n [ngStyle]=\"progressStyles\">\r\n <!-- This div is now only for displaying the colored bar -->\r\n </div>\r\n <!-- </mat-progress-bar> -->\r\n <!-- The hover label is now a sibling to .progress, positioned absolutely within .progress-bar -->\r\n <div class=\"hover-label\" *ngIf=\"hoveredCategoryDetail\" [ngStyle]=\"hoverLabelStyle\">\r\n {{hoveredCategoryDetail.category.label}}: {{hoveredCategoryDetail.percentageText}}\r\n </div>\r\n <!-- This overlay is now a sibling to .progress, sized to match it, to reliably capture mouse events -->\r\n <div class=\"progress-event-overlay\" [style.width]=\"isVertical ? '100%' : progress + '%'\"\r\n [style.height]=\"isVertical ? progress + '%' : '100%'\" (mousemove)=\"onProgressMouseMove($event)\"\r\n (mouseleave)=\"onProgressMouseLeave()\"></div>\r\n </div>\r\n <div class=\"categories-container\" *ngIf=\"rucInputData.categories.length > 0\">\r\n <div *ngIf=\"rucInputData.showCategoryLabels && rucInputData.categoryLabelStyle === 'basic'\" [ngClass]=\"{\r\n 'categories-block-top': !isVertical && (rucInputData.categoryLabelsOrientation === 'top' || rucInputData.categoryLabelsOrientation === 'same'),\r\n 'categories-block-left': isVertical && (rucInputData.categoryLabelsOrientation === 'left' || rucInputData.categoryLabelsOrientation === 'same'),\r\n 'categories-block-right': isVertical && !(rucInputData.categoryLabelsOrientation === 'left' || rucInputData.categoryLabelsOrientation === 'same')\r\n }\" class=\"categories\">\r\n <div class=\"category\" *ngFor=\"let category of rucInputData.categories\" [style.color]=\"category.color\">\r\n <ng-container *ngIf=\"category.icon !== undefined\">\r\n <div *ngIf=\"category.icon; else colorDotBasic\" class=\"category-icon-wrapper\">\r\n <i class=\"material-icons\" [style.color]=\"category.color\">{{ category.icon }}</i>\r\n </div>\r\n <ng-template #colorDotBasic>\r\n <div class=\"category-color\">\r\n <div class=\"color-gradient\"\r\n [style.background]=\"category.color ? 'linear-gradient(to right, ' + category.color + ', ' + category.color + ')' : ''\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <span class=\"category-label\">{{category.label}}</span>\r\n <p class=\"category-value\">({{(category.value / rucInputData.max * 100) | number:'1.0-0' }}%)</p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"rucInputData.showCategoryLabels && rucInputData.categoryLabelStyle === 'widget'\"\r\n class=\"categories widget-style\" [ngClass]=\"{\r\n 'categories-block-top': !isVertical && (rucInputData.categoryLabelsOrientation === LablePositionEnums.top || rucInputData.categoryLabelsOrientation === LablePositionEnums.same),\r\n 'categories-block-left': isVertical && (rucInputData.categoryLabelsOrientation === LablePositionEnums.left || rucInputData.categoryLabelsOrientation === LablePositionEnums.same),\r\n 'categories-block-right': isVertical && !(rucInputData.categoryLabelsOrientation === LablePositionEnums.left || rucInputData.categoryLabelsOrientation === LablePositionEnums.same)\r\n }\">\r\n <ng-container *ngFor=\"let category of rucInputData.categories\">\r\n <mat-card>\r\n <div class=\"widget-category\">\r\n <div class=\"widget-content\">\r\n <div class=\"widget-icon-box\">\r\n <ng-container *ngIf=\"category.icon !== undefined\">\r\n <div *ngIf=\"category.icon; else colorDotWidget\" class=\"widget-icon\">\r\n <i class=\"material-icons\" [style.color]=\"category.color\">{{ category.icon }}</i>\r\n </div>\r\n <ng-template #colorDotWidget>\r\n <div class=\"category-color\">\r\n <div class=\"color-gradient\"\r\n [style.background]=\"category.color ? 'linear-gradient(to right, ' + category.color + ', ' + category.color + ')' : ''\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <div class=\"widget-label\">{{category.label}}</div>\r\n </div>\r\n </div>\r\n <div class=\"widget-value\">\r\n <div>{{category.value}}</div>\r\n </div>\r\n </div>\r\n </mat-card>\r\n\r\n\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".progress-container{position:relative;margin:20px 0}.progress-container.horizontal{width:100%;height:35px}.progress-container.horizontal .progress-bar{width:100%;height:42%}.progress-container.vertical{width:60px;height:320px;margin:0 auto}.progress-container.vertical .progress-bar{width:24%;height:100%}.progress-label-container{position:absolute;z-index:2;width:100%;height:100%;pointer-events:none;display:flex}.progress-label-container.horizontal{justify-content:right;align-items:flex-end;bottom:15px}.progress-label-container.vertical{justify-content:flex-start;align-items:flex-end;left:35px}.progress-label{padding:2px 5px;font-size:12px;white-space:nowrap}.progress-label-container.horizontal .progress-label{margin-top:5px;margin-right:5px}.progress-label-container.vertical .progress-label{transform:rotate(-90deg);transform-origin:bottom left;margin-right:5px}.progress-bar{position:relative;border:1px solid #e0e0e0;border-radius:4px}.progress-bar .hover-label{position:absolute;top:-28px;left:50%;transform:translate(-50%);background-color:#000c;color:#fff;padding:4px 8px;border-radius:4px;font-size:.8em;z-index:5;white-space:nowrap;pointer-events:none}.progress-event-overlay{position:absolute;top:0;left:0;z-index:4}.progress{position:relative;background:#2196F3;transition:width .3s ease,height .3s ease}.progress-bar.horizontal .progress{width:100%;height:100%}.progress-bar.vertical .progress{width:100%;height:0}.icons-container{position:absolute;display:flex;justify-content:space-between;width:100%;height:100%;align-items:center}.icons-container i{position:absolute;font-size:1.2em;color:#fff}.start-icon{left:0}.end-icon{right:0}.above-threshold{color:gold}.categories-container{width:100%;box-sizing:border-box}.categories{display:flex;flex-direction:row;flex-wrap:wrap;gap:1px}.categories-block-top,.categories-block-bottom,.categories-block-left,.categories-block-right{position:absolute;z-index:1}.categories-block-top{bottom:100%;left:0;padding-bottom:8px}.categories-block-bottom{top:100%;left:0;padding-top:10px}.categories-block-left{right:100%;top:0;padding-right:8px;width:200px}.categories-block-left .categories{flex-direction:inherit;align-items:flex-start;gap:0px}.categories-block-right{left:100%;top:0;padding-left:8px;width:200px}.categories-block-right .categories{flex-direction:inherit;align-items:flex-start;gap:0px}.category{display:flex;align-items:center;gap:6px;padding:8px;border-radius:4px}.category-label{font-weight:500}.category-value{font-size:.9em}.category-color{width:10px;height:10px;border-radius:50%;overflow:hidden;flex-shrink:0}.category-icon-wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.color-gradient{width:100%;height:100%}.categories.widget-style{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start;align-items:flex-start;margin:10px 0}.categories.widget-style .widget-category{width:calc(25% - 7.5px);min-width:159px;box-sizing:border-box;flex-shrink:0;flex-grow:0}@media (max-width: 1200px){.categories.widget-style .widget-category{width:calc(33.33% - 6.66px)}}@media (max-width: 768px){.categories.widget-style .widget-category{width:calc(50% - 5px)}}@media (max-width: 480px){.categories.widget-style .widget-category{width:100%}}.categories-block-left,.categories-block-right{flex-direction:inherit;align-items:flex-start;gap:10px}.categories-block-left .widget-category,.categories-block-right .widget-category{width:100%;max-width:none}.widget-category{padding:10px 15px}.widget-content{display:flex;width:100%;align-items:center;margin:0}.widget-icon{border:1px solid #ddd;border-radius:10px;width:35px;height:35px;line-height:45px;text-align:center;background-color:#fdfdfd}.widget-content .category-color{margin-right:35px}.widget-icon,.widget-color{margin-right:8px;flex-shrink:0}.widget-color{width:24px;height:24px;border-radius:50%}.widget-label{flex-grow:1;text-align:left;display:block}.widget-value{font-weight:700;flex-shrink:0;margin-left:45px;text-align:left;margin-top:5px}.widget-icon-box{display:flex;align-items:center}\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: i2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] });
|
|
198
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucMeteredProgressBarComponent, decorators: [{
|
|
199
|
-
type: Component,
|
|
200
|
-
args: [{ selector: 'uxp-ruc-metered-progress-bar', template: "<div class=\"progress-container\" class={{customTheme}} [class.vertical]=\"isVertical\" [class.horizontal]=\"!isVertical\">\r\n <div class=\"progress-bar\">\r\n <!-- Removed (mouseenter) and (mouseleave) from progress-bar if only category hover is needed -->\r\n <div *ngIf=\"rucInputData.barLabels\" class=\"progress-label-container {{rucInputData.orientation}}\">\r\n <p class=\"progress-label\">{{progress | number:'1.0-0'}}% of {{rucInputData.max}} {{rucInputData.unitType}}\r\n Used</p>\r\n </div>\r\n <!-- <mat-progress-bar> -->\r\n <div class=\"progress\" [style.width]=\"isVertical ? '100%' : progress + '%'\"\r\n [style.height]=\"isVertical ? progress + '%' : '100%'\"\r\n [style.transition]=\"rucInputData.orientation === 'vertical' ? 'height 0.3s ease' : 'width 0.3s ease'\"\r\n [ngStyle]=\"progressStyles\">\r\n <!-- This div is now only for displaying the colored bar -->\r\n </div>\r\n <!-- </mat-progress-bar> -->\r\n <!-- The hover label is now a sibling to .progress, positioned absolutely within .progress-bar -->\r\n <div class=\"hover-label\" *ngIf=\"hoveredCategoryDetail\" [ngStyle]=\"hoverLabelStyle\">\r\n {{hoveredCategoryDetail.category.label}}: {{hoveredCategoryDetail.percentageText}}\r\n </div>\r\n <!-- This overlay is now a sibling to .progress, sized to match it, to reliably capture mouse events -->\r\n <div class=\"progress-event-overlay\" [style.width]=\"isVertical ? '100%' : progress + '%'\"\r\n [style.height]=\"isVertical ? progress + '%' : '100%'\" (mousemove)=\"onProgressMouseMove($event)\"\r\n (mouseleave)=\"onProgressMouseLeave()\"></div>\r\n </div>\r\n <div class=\"categories-container\" *ngIf=\"rucInputData.categories.length > 0\">\r\n <div *ngIf=\"rucInputData.showCategoryLabels && rucInputData.categoryLabelStyle === 'basic'\" [ngClass]=\"{\r\n 'categories-block-top': !isVertical && (rucInputData.categoryLabelsOrientation === 'top' || rucInputData.categoryLabelsOrientation === 'same'),\r\n 'categories-block-left': isVertical && (rucInputData.categoryLabelsOrientation === 'left' || rucInputData.categoryLabelsOrientation === 'same'),\r\n 'categories-block-right': isVertical && !(rucInputData.categoryLabelsOrientation === 'left' || rucInputData.categoryLabelsOrientation === 'same')\r\n }\" class=\"categories\">\r\n <div class=\"category\" *ngFor=\"let category of rucInputData.categories\" [style.color]=\"category.color\">\r\n <ng-container *ngIf=\"category.icon !== undefined\">\r\n <div *ngIf=\"category.icon; else colorDotBasic\" class=\"category-icon-wrapper\">\r\n <i class=\"material-icons\" [style.color]=\"category.color\">{{ category.icon }}</i>\r\n </div>\r\n <ng-template #colorDotBasic>\r\n <div class=\"category-color\">\r\n <div class=\"color-gradient\"\r\n [style.background]=\"category.color ? 'linear-gradient(to right, ' + category.color + ', ' + category.color + ')' : ''\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <span class=\"category-label\">{{category.label}}</span>\r\n <p class=\"category-value\">({{(category.value / rucInputData.max * 100) | number:'1.0-0' }}%)</p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"rucInputData.showCategoryLabels && rucInputData.categoryLabelStyle === 'widget'\"\r\n class=\"categories widget-style\" [ngClass]=\"{\r\n 'categories-block-top': !isVertical && (rucInputData.categoryLabelsOrientation === LablePositionEnums.top || rucInputData.categoryLabelsOrientation === LablePositionEnums.same),\r\n 'categories-block-left': isVertical && (rucInputData.categoryLabelsOrientation === LablePositionEnums.left || rucInputData.categoryLabelsOrientation === LablePositionEnums.same),\r\n 'categories-block-right': isVertical && !(rucInputData.categoryLabelsOrientation === LablePositionEnums.left || rucInputData.categoryLabelsOrientation === LablePositionEnums.same)\r\n }\">\r\n <ng-container *ngFor=\"let category of rucInputData.categories\">\r\n <mat-card>\r\n <div class=\"widget-category\">\r\n <div class=\"widget-content\">\r\n <div class=\"widget-icon-box\">\r\n <ng-container *ngIf=\"category.icon !== undefined\">\r\n <div *ngIf=\"category.icon; else colorDotWidget\" class=\"widget-icon\">\r\n <i class=\"material-icons\" [style.color]=\"category.color\">{{ category.icon }}</i>\r\n </div>\r\n <ng-template #colorDotWidget>\r\n <div class=\"category-color\">\r\n <div class=\"color-gradient\"\r\n [style.background]=\"category.color ? 'linear-gradient(to right, ' + category.color + ', ' + category.color + ')' : ''\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <div class=\"widget-label\">{{category.label}}</div>\r\n </div>\r\n </div>\r\n <div class=\"widget-value\">\r\n <div>{{category.value}}</div>\r\n </div>\r\n </div>\r\n </mat-card>\r\n\r\n\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".progress-container{position:relative;margin:20px 0}.progress-container.horizontal{width:100%;height:35px}.progress-container.horizontal .progress-bar{width:100%;height:42%}.progress-container.vertical{width:60px;height:320px;margin:0 auto}.progress-container.vertical .progress-bar{width:24%;height:100%}.progress-label-container{position:absolute;z-index:2;width:100%;height:100%;pointer-events:none;display:flex}.progress-label-container.horizontal{justify-content:right;align-items:flex-end;bottom:15px}.progress-label-container.vertical{justify-content:flex-start;align-items:flex-end;left:35px}.progress-label{padding:2px 5px;font-size:12px;white-space:nowrap}.progress-label-container.horizontal .progress-label{margin-top:5px;margin-right:5px}.progress-label-container.vertical .progress-label{transform:rotate(-90deg);transform-origin:bottom left;margin-right:5px}.progress-bar{position:relative;border:1px solid #e0e0e0;border-radius:4px}.progress-bar .hover-label{position:absolute;top:-28px;left:50%;transform:translate(-50%);background-color:#000c;color:#fff;padding:4px 8px;border-radius:4px;font-size:.8em;z-index:5;white-space:nowrap;pointer-events:none}.progress-event-overlay{position:absolute;top:0;left:0;z-index:4}.progress{position:relative;background:#2196F3;transition:width .3s ease,height .3s ease}.progress-bar.horizontal .progress{width:100%;height:100%}.progress-bar.vertical .progress{width:100%;height:0}.icons-container{position:absolute;display:flex;justify-content:space-between;width:100%;height:100%;align-items:center}.icons-container i{position:absolute;font-size:1.2em;color:#fff}.start-icon{left:0}.end-icon{right:0}.above-threshold{color:gold}.categories-container{width:100%;box-sizing:border-box}.categories{display:flex;flex-direction:row;flex-wrap:wrap;gap:1px}.categories-block-top,.categories-block-bottom,.categories-block-left,.categories-block-right{position:absolute;z-index:1}.categories-block-top{bottom:100%;left:0;padding-bottom:8px}.categories-block-bottom{top:100%;left:0;padding-top:10px}.categories-block-left{right:100%;top:0;padding-right:8px;width:200px}.categories-block-left .categories{flex-direction:inherit;align-items:flex-start;gap:0px}.categories-block-right{left:100%;top:0;padding-left:8px;width:200px}.categories-block-right .categories{flex-direction:inherit;align-items:flex-start;gap:0px}.category{display:flex;align-items:center;gap:6px;padding:8px;border-radius:4px}.category-label{font-weight:500}.category-value{font-size:.9em}.category-color{width:10px;height:10px;border-radius:50%;overflow:hidden;flex-shrink:0}.category-icon-wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.color-gradient{width:100%;height:100%}.categories.widget-style{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start;align-items:flex-start;margin:10px 0}.categories.widget-style .widget-category{width:calc(25% - 7.5px);min-width:159px;box-sizing:border-box;flex-shrink:0;flex-grow:0}@media (max-width: 1200px){.categories.widget-style .widget-category{width:calc(33.33% - 6.66px)}}@media (max-width: 768px){.categories.widget-style .widget-category{width:calc(50% - 5px)}}@media (max-width: 480px){.categories.widget-style .widget-category{width:100%}}.categories-block-left,.categories-block-right{flex-direction:inherit;align-items:flex-start;gap:10px}.categories-block-left .widget-category,.categories-block-right .widget-category{width:100%;max-width:none}.widget-category{padding:10px 15px}.widget-content{display:flex;width:100%;align-items:center;margin:0}.widget-icon{border:1px solid #ddd;border-radius:10px;width:35px;height:35px;line-height:45px;text-align:center;background-color:#fdfdfd}.widget-content .category-color{margin-right:35px}.widget-icon,.widget-color{margin-right:8px;flex-shrink:0}.widget-color{width:24px;height:24px;border-radius:50%}.widget-label{flex-grow:1;text-align:left;display:block}.widget-value{font-weight:700;flex-shrink:0;margin-left:45px;text-align:left;margin-top:5px}.widget-icon-box{display:flex;align-items:center}\n"] }]
|
|
201
|
-
}], propDecorators: { rucInputData: [{
|
|
202
|
-
type: Input
|
|
203
|
-
}], customTheme: [{
|
|
204
|
-
type: Input
|
|
205
|
-
}] } });
|
|
206
|
-
|
|
207
|
-
class RuclibMeteredProgressBarModule {
|
|
208
|
-
}
|
|
209
|
-
RuclibMeteredProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
210
|
-
RuclibMeteredProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, declarations: [RucMeteredProgressBarComponent], imports: [CommonModule, MatIconModule, MatCardModule], exports: [RucMeteredProgressBarComponent] });
|
|
211
|
-
RuclibMeteredProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, imports: [CommonModule, MatIconModule, MatCardModule] });
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, decorators: [{
|
|
213
|
-
type: NgModule,
|
|
214
|
-
args: [{
|
|
215
|
-
imports: [CommonModule, MatIconModule, MatCardModule],
|
|
216
|
-
declarations: [RucMeteredProgressBarComponent],
|
|
217
|
-
exports: [RucMeteredProgressBarComponent],
|
|
218
|
-
}]
|
|
219
|
-
}] });
|
|
220
|
-
|
|
221
|
-
class MeteredBarConfig {
|
|
222
|
-
}
|
|
223
|
-
class CategoryConfig {
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Generated bundle index. Do not edit.
|
|
228
|
-
*/
|
|
229
|
-
|
|
230
|
-
export { CategoryConfig, MeteredBarConfig, RucMeteredProgressBarComponent, RuclibMeteredProgressBarModule };
|
|
231
|
-
//# sourceMappingURL=ruc-lib-metered-progress-bar.mjs.map
|