@ruc-lib/metered-progress-bar 2.0.0 → 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 +59 -24
- 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 -193
- package/esm2020/lib/ruclib-metered-progress-bar.module.mjs +0 -20
- package/esm2020/ruc-lib-meteredProgressBar.mjs +0 -5
- package/fesm2015/ruc-lib-meteredProgressBar.mjs +0 -230
- package/fesm2015/ruc-lib-meteredProgressBar.mjs.map +0 -1
- package/fesm2020/ruc-lib-meteredProgressBar.mjs +0 -229
- package/fesm2020/ruc-lib-meteredProgressBar.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 -9
|
@@ -1,193 +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
|
-
export class RucMeteredProgressBarComponent {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.hoveredCategoryDetail = null;
|
|
9
|
-
this.hoverLabelStyle = { left: '0px', top: '-28px', display: 'none', transform: 'translateX(-50%)' };
|
|
10
|
-
this.progressPercentage = 0;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Calculates the total value of all categories.
|
|
14
|
-
* @returns The sum of all category values.
|
|
15
|
-
*/
|
|
16
|
-
get totalValue() {
|
|
17
|
-
return this.rucInputData.categories.reduce((sum, category) => sum + category.value, 0);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Calculates the overall progress percentage of the bar based on total value, min, and max.
|
|
21
|
-
* @returns The progress as a percentage (0-100).
|
|
22
|
-
*/
|
|
23
|
-
get progress() {
|
|
24
|
-
return ((this.totalValue - this.rucInputData.min) / (this.rucInputData.max - this.rucInputData.min)) * 100;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Determines if the progress bar is oriented vertically.
|
|
28
|
-
* @returns True if the orientation is 'vertical', false otherwise.
|
|
29
|
-
*/
|
|
30
|
-
get isVertical() {
|
|
31
|
-
return this.rucInputData.orientation === 'vertical';
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Generates the CSS linear-gradient string for the progress bar.
|
|
35
|
-
* The gradient is composed of segments based on category values and colors.
|
|
36
|
-
* If no categories or total value is zero, it returns a transparent gradient.
|
|
37
|
-
* @returns A CSS linear-gradient string.
|
|
38
|
-
*/
|
|
39
|
-
get progressStyles() {
|
|
40
|
-
const direction = this.isVertical ? 'to bottom' : 'to right';
|
|
41
|
-
if (!this.rucInputData || !this.rucInputData.categories) {
|
|
42
|
-
return { background: 'transparent' };
|
|
43
|
-
}
|
|
44
|
-
const total = this.totalValue;
|
|
45
|
-
const colorStops = [];
|
|
46
|
-
let cumulativePercentage = 0;
|
|
47
|
-
if (total > 0) {
|
|
48
|
-
this.rucInputData.categories.forEach(category => {
|
|
49
|
-
if (category.value <= 0)
|
|
50
|
-
return; // Skip categories with zero or negative contribution
|
|
51
|
-
const segmentPercentage = (category.value / total) * 100;
|
|
52
|
-
const color = category.color;
|
|
53
|
-
// Add start of the segment using the previous cumulative percentage
|
|
54
|
-
colorStops.push(`${color} ${cumulativePercentage}%`);
|
|
55
|
-
// Update cumulative percentage for the end of this segment
|
|
56
|
-
cumulativePercentage += segmentPercentage;
|
|
57
|
-
// Add end of the segment
|
|
58
|
-
// Use Math.min to cap at 100% in case of floating point overshoot on the last segment
|
|
59
|
-
colorStops.push(`${color} ${Math.min(cumulativePercentage, 100)}%`);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
if (colorStops.length === 0) {
|
|
63
|
-
return { background: 'transparent' };
|
|
64
|
-
}
|
|
65
|
-
const baseGradient = `linear-gradient(${direction}, ${colorStops.join(', ')})`;
|
|
66
|
-
const styles = {};
|
|
67
|
-
const barStyle = this.rucInputData?.barStyle;
|
|
68
|
-
switch (barStyle) {
|
|
69
|
-
case 'stripe':
|
|
70
|
-
// This uses multiple backgrounds for an overlay effect, as requested.
|
|
71
|
-
styles['background'] = `repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(0, 0, 0, 0.1) 5px, rgba(0, 0, 0, 0.1) 10px), ${baseGradient}`;
|
|
72
|
-
break;
|
|
73
|
-
case 'circle': {
|
|
74
|
-
// This uses a mask. The background is the color, the mask cuts out the shape.
|
|
75
|
-
styles['background'] = baseGradient;
|
|
76
|
-
// A repeating pattern of circles. Each circle has a diameter of 8px, with a 4px gap.
|
|
77
|
-
const circleMask = 'radial-gradient(circle, black 4px, transparent 4px) 0 0 / 12px 12px';
|
|
78
|
-
styles['-webkit-mask'] = circleMask;
|
|
79
|
-
styles['mask'] = circleMask;
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
case 'rectangle': {
|
|
83
|
-
styles['background'] = baseGradient;
|
|
84
|
-
// For vertical bar, create horizontal rectangles (0deg). For horizontal bar, create vertical rectangles (90deg).
|
|
85
|
-
const rectDirection = this.isVertical ? '0deg' : '90deg';
|
|
86
|
-
// A repeating pattern of bars. Each bar is 6px wide with a 6px gap.
|
|
87
|
-
const rectangleMask = `repeating-linear-gradient(${rectDirection}, black, black 6px, transparent 6px, transparent 12px)`;
|
|
88
|
-
styles['-webkit-mask'] = rectangleMask;
|
|
89
|
-
styles['mask'] = rectangleMask;
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
default: // 'solid' or undefined
|
|
93
|
-
styles['background'] = baseGradient;
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
return styles;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Handles mouse movement over the progress bar to display category-specific hover details.
|
|
100
|
-
* It calculates the hovered segment based on mouse position and updates the hover label.
|
|
101
|
-
* @param event The MouseEvent object.
|
|
102
|
-
*/
|
|
103
|
-
onProgressMouseMove(event) {
|
|
104
|
-
const progressBarElement = event.target;
|
|
105
|
-
let currentCumulativeGradientPct = 0;
|
|
106
|
-
let foundCategoryForHover = null;
|
|
107
|
-
let hoverPercentage_onFilledBar = 0;
|
|
108
|
-
let mousePositionWithinProgressDiv = 0;
|
|
109
|
-
if (this.isVertical) {
|
|
110
|
-
mousePositionWithinProgressDiv = event.offsetY; // Y position within the .progress div
|
|
111
|
-
const filledHeightPx = progressBarElement.offsetHeight;
|
|
112
|
-
if (filledHeightPx <= 0) { // Avoid division by zero if element has no height
|
|
113
|
-
this.onProgressMouseLeave();
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
hoverPercentage_onFilledBar = (mousePositionWithinProgressDiv / filledHeightPx) * 100;
|
|
117
|
-
}
|
|
118
|
-
else { // Horizontal
|
|
119
|
-
mousePositionWithinProgressDiv = event.offsetX; // X position within the .progress div
|
|
120
|
-
const filledWidthPx = progressBarElement.offsetWidth;
|
|
121
|
-
if (filledWidthPx <= 0) { // Avoid division by zero if element has no width
|
|
122
|
-
this.onProgressMouseLeave();
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
hoverPercentage_onFilledBar = (mousePositionWithinProgressDiv / filledWidthPx) * 100;
|
|
126
|
-
}
|
|
127
|
-
if (this.totalValue > 0) {
|
|
128
|
-
for (const category of this.rucInputData.categories) {
|
|
129
|
-
if (category.value <= 0)
|
|
130
|
-
continue; // Skip categories with zero or negative contribution
|
|
131
|
-
const segmentGradientPct = (category.value / this.totalValue) * 100;
|
|
132
|
-
const segmentStartGradientPct = currentCumulativeGradientPct;
|
|
133
|
-
const segmentEndGradientPct = currentCumulativeGradientPct + segmentGradientPct;
|
|
134
|
-
// Ensure hoverPercentage is within the segment, handling potential floating point inaccuracies for the last segment
|
|
135
|
-
if (hoverPercentage_onFilledBar >= segmentStartGradientPct && // Check if mouse is within or at the start of the segment
|
|
136
|
-
(hoverPercentage_onFilledBar < segmentEndGradientPct ||
|
|
137
|
-
(segmentEndGradientPct >= 99.99 && hoverPercentage_onFilledBar <= 100.01))) { // Tolerate slight overshoot for last segment
|
|
138
|
-
foundCategoryForHover = category;
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
currentCumulativeGradientPct = segmentEndGradientPct;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
if (foundCategoryForHover) {
|
|
145
|
-
const percentageOfMax = (foundCategoryForHover.value / this.rucInputData.max) * 100; // Calculate percentage relative to max value
|
|
146
|
-
this.hoveredCategoryDetail = { category: foundCategoryForHover, percentageText: percentageOfMax.toFixed(0) + '%' };
|
|
147
|
-
if (this.isVertical) {
|
|
148
|
-
this.hoverLabelStyle = {
|
|
149
|
-
left: 'calc(100% + 5px)',
|
|
150
|
-
top: mousePositionWithinProgressDiv + 'px',
|
|
151
|
-
display: 'block',
|
|
152
|
-
transform: 'translateY(-50%)' // Vertically center label on mouse Y
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
this.hoverLabelStyle = {
|
|
157
|
-
left: mousePositionWithinProgressDiv + 'px',
|
|
158
|
-
top: '-28px',
|
|
159
|
-
display: 'block',
|
|
160
|
-
transform: 'translateX(-50%)' // Horizontally center label on mouse X
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
this.hoveredCategoryDetail = null;
|
|
166
|
-
this.hoverLabelStyle = { ...this.hoverLabelStyle, display: 'none' };
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Hides the hover label when the mouse leaves the progress bar.
|
|
171
|
-
*/
|
|
172
|
-
onProgressMouseLeave() {
|
|
173
|
-
this.hoveredCategoryDetail = null;
|
|
174
|
-
this.hoverLabelStyle = { ...this.hoverLabelStyle, display: 'none' };
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* get the label position string value
|
|
178
|
-
*/
|
|
179
|
-
get LablePositionEnums() {
|
|
180
|
-
return LablePositionEnums;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
RucMeteredProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucMeteredProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
184
|
-
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 <span class=\"progress-label\">{{progress | number:'1.0-0'}}% of {{rucInputData.max}} {{rucInputData.unitType}}\r\n Used</span>\r\n </div>\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 <!-- 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 <span class=\"category-value\">({{(category.value / rucInputData.max * 100) | number:'1.0-0' }}%)</span>\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 <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\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;color:#333;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;background:white;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{color:#666;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{background-color:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:10px 15px;box-shadow:0 2px 4px #0000001a}.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: "pipe", type: i1.DecimalPipe, name: "number" }] });
|
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucMeteredProgressBarComponent, decorators: [{
|
|
186
|
-
type: Component,
|
|
187
|
-
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 <span class=\"progress-label\">{{progress | number:'1.0-0'}}% of {{rucInputData.max}} {{rucInputData.unitType}}\r\n Used</span>\r\n </div>\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 <!-- 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 <span class=\"category-value\">({{(category.value / rucInputData.max * 100) | number:'1.0-0' }}%)</span>\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 <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\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;color:#333;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;background:white;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{color:#666;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{background-color:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:10px 15px;box-shadow:0 2px 4px #0000001a}.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"] }]
|
|
188
|
-
}], propDecorators: { rucInputData: [{
|
|
189
|
-
type: Input
|
|
190
|
-
}], customTheme: [{
|
|
191
|
-
type: Input
|
|
192
|
-
}] } });
|
|
193
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVjLW1ldGVyZWQtc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NhdGVnb3J5LmNvbG9yICsgJywgJyArIGNhdGVnb3J5LmNvbG9yICsgJyknIDogJydcIj5cclxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICA8L25nLXRlbXBsYXRlPlxyXG4gICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ3aWRnZXQtbGFiZWxcIj57e2NhdGVnb3J5LmxhYmVsfX08L2Rpdj5cclxuICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgIDxkaXYgY2xhc3M9XCJ3aWRnZXQtdmFsdWVcIj5cclxuICAgICAgICAgICAgPGRpdj57e2NhdGVnb3J5LnZhbHVlfX08L2Rpdj5cclxuICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgIDwvZGl2PlxyXG5cclxuXHJcbiAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgPC9kaXY+XHJcblxyXG4gIDwvZGl2PlxyXG48L2Rpdj4iXX0=
|
|
@@ -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 * as i0 from "@angular/core";
|
|
6
|
-
// import { RucMeteredProgressBarComponent } from './ruc-metered-progress-bar/ruc-metered-progress-bar/ruc-metered-progress-bar.component';
|
|
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], exports: [RucMeteredProgressBarComponent] });
|
|
11
|
-
RuclibMeteredProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, imports: [CommonModule, MatIconModule] });
|
|
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],
|
|
16
|
-
declarations: [RucMeteredProgressBarComponent],
|
|
17
|
-
exports: [RucMeteredProgressBarComponent],
|
|
18
|
-
}]
|
|
19
|
-
}] });
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVjbGliLW1ldGVyZWQtcHJvZ3Jlc3MtYmFyLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvcnVjbGliLW1ldGVyZWQtcHJvZ3Jlc3MtYmFyLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDdkQsT0FBTyxFQUFFLDhCQUE4QixFQUFFLE1BQU0sK0RBQStELENBQUM7O0FBQy9HLDJJQUEySTtBQU8zSSxNQUFNLE9BQU8sOEJBQThCOzs0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NzQmFyQ29tcG9uZW50XSxcclxuICBleHBvcnRzOiBbUnVjTWV0ZXJlZFByb2dyZXNzQmFyQ29tcG9uZW50XSxcclxufSlcclxuZXhwb3J0IGNsYXNzIFJ1Y2xpYk1ldGVyZWRQcm9ncmVzc0Jhck1vZHVsZSB7fVxyXG4iXX0=
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVjLWxpYi1tZXRlcmVkUHJvZ3Jlc3NCYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcnVjLWxpYi1tZXRlcmVkUHJvZ3Jlc3NCYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
|
|
@@ -1,230 +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
|
-
|
|
7
|
-
var LablePositionEnums;
|
|
8
|
-
(function (LablePositionEnums) {
|
|
9
|
-
LablePositionEnums["left"] = "left";
|
|
10
|
-
LablePositionEnums["right"] = "right";
|
|
11
|
-
LablePositionEnums["same"] = "same";
|
|
12
|
-
LablePositionEnums["top"] = "top";
|
|
13
|
-
LablePositionEnums["bottom"] = "bottom";
|
|
14
|
-
})(LablePositionEnums || (LablePositionEnums = {}));
|
|
15
|
-
|
|
16
|
-
class RucMeteredProgressBarComponent {
|
|
17
|
-
constructor() {
|
|
18
|
-
this.hoveredCategoryDetail = null;
|
|
19
|
-
this.hoverLabelStyle = { left: '0px', top: '-28px', display: 'none', transform: 'translateX(-50%)' };
|
|
20
|
-
this.progressPercentage = 0;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Calculates the total value of all categories.
|
|
24
|
-
* @returns The sum of all category values.
|
|
25
|
-
*/
|
|
26
|
-
get totalValue() {
|
|
27
|
-
return this.rucInputData.categories.reduce((sum, category) => sum + category.value, 0);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Calculates the overall progress percentage of the bar based on total value, min, and max.
|
|
31
|
-
* @returns The progress as a percentage (0-100).
|
|
32
|
-
*/
|
|
33
|
-
get progress() {
|
|
34
|
-
return ((this.totalValue - this.rucInputData.min) / (this.rucInputData.max - this.rucInputData.min)) * 100;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Determines if the progress bar is oriented vertically.
|
|
38
|
-
* @returns True if the orientation is 'vertical', false otherwise.
|
|
39
|
-
*/
|
|
40
|
-
get isVertical() {
|
|
41
|
-
return this.rucInputData.orientation === 'vertical';
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Generates the CSS linear-gradient string for the progress bar.
|
|
45
|
-
* The gradient is composed of segments based on category values and colors.
|
|
46
|
-
* If no categories or total value is zero, it returns a transparent gradient.
|
|
47
|
-
* @returns A CSS linear-gradient string.
|
|
48
|
-
*/
|
|
49
|
-
get progressStyles() {
|
|
50
|
-
var _a;
|
|
51
|
-
const direction = this.isVertical ? 'to bottom' : 'to right';
|
|
52
|
-
if (!this.rucInputData || !this.rucInputData.categories) {
|
|
53
|
-
return { background: 'transparent' };
|
|
54
|
-
}
|
|
55
|
-
const total = this.totalValue;
|
|
56
|
-
const colorStops = [];
|
|
57
|
-
let cumulativePercentage = 0;
|
|
58
|
-
if (total > 0) {
|
|
59
|
-
this.rucInputData.categories.forEach(category => {
|
|
60
|
-
if (category.value <= 0)
|
|
61
|
-
return; // Skip categories with zero or negative contribution
|
|
62
|
-
const segmentPercentage = (category.value / total) * 100;
|
|
63
|
-
const color = category.color;
|
|
64
|
-
// Add start of the segment using the previous cumulative percentage
|
|
65
|
-
colorStops.push(`${color} ${cumulativePercentage}%`);
|
|
66
|
-
// Update cumulative percentage for the end of this segment
|
|
67
|
-
cumulativePercentage += segmentPercentage;
|
|
68
|
-
// Add end of the segment
|
|
69
|
-
// Use Math.min to cap at 100% in case of floating point overshoot on the last segment
|
|
70
|
-
colorStops.push(`${color} ${Math.min(cumulativePercentage, 100)}%`);
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
if (colorStops.length === 0) {
|
|
74
|
-
return { background: 'transparent' };
|
|
75
|
-
}
|
|
76
|
-
const baseGradient = `linear-gradient(${direction}, ${colorStops.join(', ')})`;
|
|
77
|
-
const styles = {};
|
|
78
|
-
const barStyle = (_a = this.rucInputData) === null || _a === void 0 ? void 0 : _a.barStyle;
|
|
79
|
-
switch (barStyle) {
|
|
80
|
-
case 'stripe':
|
|
81
|
-
// This uses multiple backgrounds for an overlay effect, as requested.
|
|
82
|
-
styles['background'] = `repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(0, 0, 0, 0.1) 5px, rgba(0, 0, 0, 0.1) 10px), ${baseGradient}`;
|
|
83
|
-
break;
|
|
84
|
-
case 'circle': {
|
|
85
|
-
// This uses a mask. The background is the color, the mask cuts out the shape.
|
|
86
|
-
styles['background'] = baseGradient;
|
|
87
|
-
// A repeating pattern of circles. Each circle has a diameter of 8px, with a 4px gap.
|
|
88
|
-
const circleMask = 'radial-gradient(circle, black 4px, transparent 4px) 0 0 / 12px 12px';
|
|
89
|
-
styles['-webkit-mask'] = circleMask;
|
|
90
|
-
styles['mask'] = circleMask;
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
case 'rectangle': {
|
|
94
|
-
styles['background'] = baseGradient;
|
|
95
|
-
// For vertical bar, create horizontal rectangles (0deg). For horizontal bar, create vertical rectangles (90deg).
|
|
96
|
-
const rectDirection = this.isVertical ? '0deg' : '90deg';
|
|
97
|
-
// A repeating pattern of bars. Each bar is 6px wide with a 6px gap.
|
|
98
|
-
const rectangleMask = `repeating-linear-gradient(${rectDirection}, black, black 6px, transparent 6px, transparent 12px)`;
|
|
99
|
-
styles['-webkit-mask'] = rectangleMask;
|
|
100
|
-
styles['mask'] = rectangleMask;
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
|
-
default: // 'solid' or undefined
|
|
104
|
-
styles['background'] = baseGradient;
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
return styles;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Handles mouse movement over the progress bar to display category-specific hover details.
|
|
111
|
-
* It calculates the hovered segment based on mouse position and updates the hover label.
|
|
112
|
-
* @param event The MouseEvent object.
|
|
113
|
-
*/
|
|
114
|
-
onProgressMouseMove(event) {
|
|
115
|
-
const progressBarElement = event.target;
|
|
116
|
-
let currentCumulativeGradientPct = 0;
|
|
117
|
-
let foundCategoryForHover = null;
|
|
118
|
-
let hoverPercentage_onFilledBar = 0;
|
|
119
|
-
let mousePositionWithinProgressDiv = 0;
|
|
120
|
-
if (this.isVertical) {
|
|
121
|
-
mousePositionWithinProgressDiv = event.offsetY; // Y position within the .progress div
|
|
122
|
-
const filledHeightPx = progressBarElement.offsetHeight;
|
|
123
|
-
if (filledHeightPx <= 0) { // Avoid division by zero if element has no height
|
|
124
|
-
this.onProgressMouseLeave();
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
hoverPercentage_onFilledBar = (mousePositionWithinProgressDiv / filledHeightPx) * 100;
|
|
128
|
-
}
|
|
129
|
-
else { // Horizontal
|
|
130
|
-
mousePositionWithinProgressDiv = event.offsetX; // X position within the .progress div
|
|
131
|
-
const filledWidthPx = progressBarElement.offsetWidth;
|
|
132
|
-
if (filledWidthPx <= 0) { // Avoid division by zero if element has no width
|
|
133
|
-
this.onProgressMouseLeave();
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
hoverPercentage_onFilledBar = (mousePositionWithinProgressDiv / filledWidthPx) * 100;
|
|
137
|
-
}
|
|
138
|
-
if (this.totalValue > 0) {
|
|
139
|
-
for (const category of this.rucInputData.categories) {
|
|
140
|
-
if (category.value <= 0)
|
|
141
|
-
continue; // Skip categories with zero or negative contribution
|
|
142
|
-
const segmentGradientPct = (category.value / this.totalValue) * 100;
|
|
143
|
-
const segmentStartGradientPct = currentCumulativeGradientPct;
|
|
144
|
-
const segmentEndGradientPct = currentCumulativeGradientPct + segmentGradientPct;
|
|
145
|
-
// Ensure hoverPercentage is within the segment, handling potential floating point inaccuracies for the last segment
|
|
146
|
-
if (hoverPercentage_onFilledBar >= segmentStartGradientPct && // Check if mouse is within or at the start of the segment
|
|
147
|
-
(hoverPercentage_onFilledBar < segmentEndGradientPct ||
|
|
148
|
-
(segmentEndGradientPct >= 99.99 && hoverPercentage_onFilledBar <= 100.01))) { // Tolerate slight overshoot for last segment
|
|
149
|
-
foundCategoryForHover = category;
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
152
|
-
currentCumulativeGradientPct = segmentEndGradientPct;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (foundCategoryForHover) {
|
|
156
|
-
const percentageOfMax = (foundCategoryForHover.value / this.rucInputData.max) * 100; // Calculate percentage relative to max value
|
|
157
|
-
this.hoveredCategoryDetail = { category: foundCategoryForHover, percentageText: percentageOfMax.toFixed(0) + '%' };
|
|
158
|
-
if (this.isVertical) {
|
|
159
|
-
this.hoverLabelStyle = {
|
|
160
|
-
left: 'calc(100% + 5px)',
|
|
161
|
-
top: mousePositionWithinProgressDiv + 'px',
|
|
162
|
-
display: 'block',
|
|
163
|
-
transform: 'translateY(-50%)' // Vertically center label on mouse Y
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
this.hoverLabelStyle = {
|
|
168
|
-
left: mousePositionWithinProgressDiv + 'px',
|
|
169
|
-
top: '-28px',
|
|
170
|
-
display: 'block',
|
|
171
|
-
transform: 'translateX(-50%)' // Horizontally center label on mouse X
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
this.hoveredCategoryDetail = null;
|
|
177
|
-
this.hoverLabelStyle = Object.assign(Object.assign({}, this.hoverLabelStyle), { display: 'none' });
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Hides the hover label when the mouse leaves the progress bar.
|
|
182
|
-
*/
|
|
183
|
-
onProgressMouseLeave() {
|
|
184
|
-
this.hoveredCategoryDetail = null;
|
|
185
|
-
this.hoverLabelStyle = Object.assign(Object.assign({}, this.hoverLabelStyle), { display: 'none' });
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* get the label position string value
|
|
189
|
-
*/
|
|
190
|
-
get LablePositionEnums() {
|
|
191
|
-
return LablePositionEnums;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
RucMeteredProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucMeteredProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
195
|
-
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 <span class=\"progress-label\">{{progress | number:'1.0-0'}}% of {{rucInputData.max}} {{rucInputData.unitType}}\r\n Used</span>\r\n </div>\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 <!-- 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 <span class=\"category-value\">({{(category.value / rucInputData.max * 100) | number:'1.0-0' }}%)</span>\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 <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\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;color:#333;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;background:white;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{color:#666;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{background-color:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:10px 15px;box-shadow:0 2px 4px #0000001a}.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: "pipe", type: i1.DecimalPipe, name: "number" }] });
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucMeteredProgressBarComponent, decorators: [{
|
|
197
|
-
type: Component,
|
|
198
|
-
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 <span class=\"progress-label\">{{progress | number:'1.0-0'}}% of {{rucInputData.max}} {{rucInputData.unitType}}\r\n Used</span>\r\n </div>\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 <!-- 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 <span class=\"category-value\">({{(category.value / rucInputData.max * 100) | number:'1.0-0' }}%)</span>\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 <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\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;color:#333;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;background:white;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{color:#666;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{background-color:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:10px 15px;box-shadow:0 2px 4px #0000001a}.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"] }]
|
|
199
|
-
}], propDecorators: { rucInputData: [{
|
|
200
|
-
type: Input
|
|
201
|
-
}], customTheme: [{
|
|
202
|
-
type: Input
|
|
203
|
-
}] } });
|
|
204
|
-
|
|
205
|
-
// import { RucMeteredProgressBarComponent } from './ruc-metered-progress-bar/ruc-metered-progress-bar/ruc-metered-progress-bar.component';
|
|
206
|
-
class RuclibMeteredProgressBarModule {
|
|
207
|
-
}
|
|
208
|
-
RuclibMeteredProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
209
|
-
RuclibMeteredProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, declarations: [RucMeteredProgressBarComponent], imports: [CommonModule, MatIconModule], exports: [RucMeteredProgressBarComponent] });
|
|
210
|
-
RuclibMeteredProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, imports: [CommonModule, MatIconModule] });
|
|
211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibMeteredProgressBarModule, decorators: [{
|
|
212
|
-
type: NgModule,
|
|
213
|
-
args: [{
|
|
214
|
-
imports: [CommonModule, MatIconModule],
|
|
215
|
-
declarations: [RucMeteredProgressBarComponent],
|
|
216
|
-
exports: [RucMeteredProgressBarComponent],
|
|
217
|
-
}]
|
|
218
|
-
}] });
|
|
219
|
-
|
|
220
|
-
class MeteredBarConfig {
|
|
221
|
-
}
|
|
222
|
-
class CategoryConfig {
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Generated bundle index. Do not edit.
|
|
227
|
-
*/
|
|
228
|
-
|
|
229
|
-
export { CategoryConfig, MeteredBarConfig, RucMeteredProgressBarComponent, RuclibMeteredProgressBarModule };
|
|
230
|
-
//# sourceMappingURL=ruc-lib-meteredProgressBar.mjs.map
|