ngx-core-components 0.3.28 → 0.3.29
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/ai/ai-chat/ai-chat.component.d.ts +9 -1
- package/ai/ai-chat-widget/ai-chat-widget.component.d.ts +3 -1
- package/ai/ai-prompt-editor/ai-prompt-editor.component.d.ts +14 -1
- package/ai/ai-rag-inspector/ai-rag-inspector.component.d.ts +6 -0
- package/charts/gauge-chart/gauge-chart.component.d.ts +18 -2
- package/fesm2022/ngx-core-components-ai.mjs +633 -258
- package/fesm2022/ngx-core-components-ai.mjs.map +1 -1
- package/fesm2022/ngx-core-components-charts.mjs +273 -35
- package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
- package/fesm2022/ngx-core-components-grid.mjs +3635 -892
- package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
- package/fesm2022/ngx-core-components-inputs.mjs +56 -14
- package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
- package/fesm2022/ngx-core-components-views.mjs +306 -117
- package/fesm2022/ngx-core-components-views.mjs.map +1 -1
- package/grid/data-grid/components/grid-filter-builder/grid-filter-builder.component.d.ts +70 -0
- package/grid/data-grid/components/grid-status-bar/grid-status-bar.component.d.ts +25 -0
- package/grid/data-grid/data-grid.component.d.ts +18 -1
- package/grid/data-grid/models.d.ts +65 -0
- package/grid/data-grid/services/grid-clipboard.service.d.ts +40 -0
- package/grid/data-grid/services/grid-edit.service.d.ts +48 -0
- package/grid/data-grid/services/grid-export-xlsx.service.d.ts +67 -0
- package/grid/data-grid/services/grid-keyboard.service.d.ts +70 -0
- package/grid/data-grid/services/grid-selection.service.d.ts +36 -0
- package/grid/data-grid/services/grid-state.service.d.ts +41 -0
- package/grid/data-grid/services/grid-virtualization.service.d.ts +81 -0
- package/grid/data-grid/utils/grid-aggregate.util.d.ts +13 -0
- package/grid/data-grid/utils/grid-filter.util.d.ts +11 -0
- package/grid/data-grid/utils/grid-sort.util.d.ts +17 -0
- package/grid/pivot-grid/pivot-grid.component.d.ts +15 -2
- package/grid/public-api.d.ts +17 -1
- package/inputs/segmented-control/segmented-control.component.d.ts +12 -3
- package/package.json +1 -1
- package/views/tree-view/tree-view.component.d.ts +20 -2
|
@@ -4407,10 +4407,10 @@ class GaugeChartComponent {
|
|
|
4407
4407
|
// Gauge angles definitions
|
|
4408
4408
|
// 0 deg in polar is to the right (3 o'clock). 90 deg is straight down (6 o'clock).
|
|
4409
4409
|
startAngle = computed(() => {
|
|
4410
|
-
return this.type() === 'semi' ?
|
|
4410
|
+
return this.type() === 'semi' ? 270 : 225;
|
|
4411
4411
|
});
|
|
4412
4412
|
endAngle = computed(() => {
|
|
4413
|
-
return this.type() === 'semi' ?
|
|
4413
|
+
return this.type() === 'semi' ? 450 : 495;
|
|
4414
4414
|
});
|
|
4415
4415
|
// Arc length calculations
|
|
4416
4416
|
arcLength = computed(() => {
|
|
@@ -4442,8 +4442,8 @@ class GaugeChartComponent {
|
|
|
4442
4442
|
const angleRange = this.endAngle() - this.startAngle();
|
|
4443
4443
|
const targetAngle = this.startAngle() + angleRange * fraction;
|
|
4444
4444
|
const angle = this.animateState() ? targetAngle : this.startAngle();
|
|
4445
|
-
// Needle points straight up at
|
|
4446
|
-
const rotateAngle = angle -
|
|
4445
|
+
// Needle points straight up at 0 deg rotation (12 o'clock, which is 360 in polar offset)
|
|
4446
|
+
const rotateAngle = angle - 360;
|
|
4447
4447
|
return `rotate(${rotateAngle})`;
|
|
4448
4448
|
});
|
|
4449
4449
|
// Evaluate the gauge color depending on bound thresholds
|
|
@@ -4464,6 +4464,90 @@ class GaugeChartComponent {
|
|
|
4464
4464
|
// Default to the last threshold color if value exceeds all thresholds
|
|
4465
4465
|
return sorted[sorted.length - 1].color;
|
|
4466
4466
|
});
|
|
4467
|
+
getThresholdColorForValue(val) {
|
|
4468
|
+
const thresholdList = this.thresholds();
|
|
4469
|
+
if (thresholdList.length === 0) {
|
|
4470
|
+
return this.color();
|
|
4471
|
+
}
|
|
4472
|
+
const sorted = [...thresholdList].sort((a, b) => a.value - b.value);
|
|
4473
|
+
for (const t of sorted) {
|
|
4474
|
+
if (val <= t.value) {
|
|
4475
|
+
return t.color;
|
|
4476
|
+
}
|
|
4477
|
+
}
|
|
4478
|
+
return sorted[sorted.length - 1].color;
|
|
4479
|
+
}
|
|
4480
|
+
ticks = computed(() => {
|
|
4481
|
+
const minVal = this.min();
|
|
4482
|
+
const maxVal = this.max();
|
|
4483
|
+
const range = maxVal - minVal;
|
|
4484
|
+
const startA = this.startAngle();
|
|
4485
|
+
const endA = this.endAngle();
|
|
4486
|
+
const angleRange = endA - startA;
|
|
4487
|
+
// We want 11 ticks (every 10%)
|
|
4488
|
+
const tickCount = 11;
|
|
4489
|
+
const result = [];
|
|
4490
|
+
for (let i = 0; i < tickCount; i++) {
|
|
4491
|
+
const fraction = i / (tickCount - 1);
|
|
4492
|
+
const val = minVal + range * fraction;
|
|
4493
|
+
const angle = startA + angleRange * fraction;
|
|
4494
|
+
// Radial line coords
|
|
4495
|
+
const outerRad = 64;
|
|
4496
|
+
const innerRad = i % 2 === 0 ? 56 : 60; // Major vs minor ticks
|
|
4497
|
+
const outerPt = this.polarToCartesian(100, 100, outerRad, angle);
|
|
4498
|
+
const innerPt = this.polarToCartesian(100, 100, innerRad, angle);
|
|
4499
|
+
// Text coords (for major ticks)
|
|
4500
|
+
let textPt = null;
|
|
4501
|
+
if (i % 2 === 0) {
|
|
4502
|
+
textPt = this.polarToCartesian(100, 100, 44, angle);
|
|
4503
|
+
}
|
|
4504
|
+
const color = this.getThresholdColorForValue(val);
|
|
4505
|
+
result.push({
|
|
4506
|
+
x1: innerPt.x,
|
|
4507
|
+
y1: innerPt.y,
|
|
4508
|
+
x2: outerPt.x,
|
|
4509
|
+
y2: outerPt.y,
|
|
4510
|
+
textX: textPt?.x ?? 0,
|
|
4511
|
+
textY: textPt?.y ?? 0,
|
|
4512
|
+
valueText: Math.round(val).toString(),
|
|
4513
|
+
isMajor: i % 2 === 0,
|
|
4514
|
+
color
|
|
4515
|
+
});
|
|
4516
|
+
}
|
|
4517
|
+
return result;
|
|
4518
|
+
});
|
|
4519
|
+
thresholdArcs = computed(() => {
|
|
4520
|
+
const list = this.thresholds();
|
|
4521
|
+
if (list.length === 0)
|
|
4522
|
+
return [];
|
|
4523
|
+
const minVal = this.min();
|
|
4524
|
+
const maxVal = this.max();
|
|
4525
|
+
const range = maxVal - minVal;
|
|
4526
|
+
const startA = this.startAngle();
|
|
4527
|
+
const endA = this.endAngle();
|
|
4528
|
+
const angleRange = endA - startA;
|
|
4529
|
+
// Sort thresholds ascending
|
|
4530
|
+
const sorted = [...list].sort((a, b) => a.value - b.value);
|
|
4531
|
+
const arcs = [];
|
|
4532
|
+
let currentVal = minVal;
|
|
4533
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
4534
|
+
const nextVal = Math.min(maxVal, sorted[i].value);
|
|
4535
|
+
if (nextVal <= currentVal)
|
|
4536
|
+
continue;
|
|
4537
|
+
const startFraction = (currentVal - minVal) / range;
|
|
4538
|
+
const endFraction = (nextVal - minVal) / range;
|
|
4539
|
+
const startAngleSegment = startA + angleRange * startFraction;
|
|
4540
|
+
const endAngleSegment = startA + angleRange * endFraction;
|
|
4541
|
+
// Radius slightly outside: e.g. 81px
|
|
4542
|
+
const path = this.describeArc(100, 100, 81, startAngleSegment, endAngleSegment);
|
|
4543
|
+
arcs.push({
|
|
4544
|
+
path,
|
|
4545
|
+
color: sorted[i].color
|
|
4546
|
+
});
|
|
4547
|
+
currentVal = nextVal;
|
|
4548
|
+
}
|
|
4549
|
+
return arcs;
|
|
4550
|
+
});
|
|
4467
4551
|
toggleExportMenu(event) {
|
|
4468
4552
|
event.stopPropagation();
|
|
4469
4553
|
this.exportMenuOpen.set(!this.exportMenuOpen());
|
|
@@ -4608,13 +4692,13 @@ class GaugeChartComponent {
|
|
|
4608
4692
|
};
|
|
4609
4693
|
}
|
|
4610
4694
|
describeArc(x, y, radius, startAngle, endAngle) {
|
|
4611
|
-
const start = this.polarToCartesian(x, y, radius,
|
|
4612
|
-
const end = this.polarToCartesian(x, y, radius,
|
|
4695
|
+
const start = this.polarToCartesian(x, y, radius, startAngle);
|
|
4696
|
+
const end = this.polarToCartesian(x, y, radius, endAngle);
|
|
4613
4697
|
// If starting and ending angle range exceeds 180 degrees, set largeArcFlag
|
|
4614
4698
|
const largeArcFlag = endAngle - startAngle <= 180 ? '0' : '1';
|
|
4615
4699
|
return [
|
|
4616
4700
|
'M', start.x, start.y,
|
|
4617
|
-
'A', radius, radius, 0, largeArcFlag,
|
|
4701
|
+
'A', radius, radius, 0, largeArcFlag, 1, end.x, end.y
|
|
4618
4702
|
].join(' ');
|
|
4619
4703
|
}
|
|
4620
4704
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: GaugeChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -4651,29 +4735,46 @@ class GaugeChartComponent {
|
|
|
4651
4735
|
>
|
|
4652
4736
|
<defs>
|
|
4653
4737
|
<linearGradient id="gauge-progress-grad" x1="0%" y1="100%" x2="100%" y2="0%">
|
|
4654
|
-
<stop offset="0%" [attr.stop-color]="gaugeColor()" stop-opacity="0.
|
|
4738
|
+
<stop offset="0%" [attr.stop-color]="gaugeColor()" stop-opacity="0.85" />
|
|
4655
4739
|
<stop offset="100%" [attr.stop-color]="gaugeColor()" />
|
|
4656
4740
|
</linearGradient>
|
|
4657
|
-
<
|
|
4658
|
-
<stop offset="0%" stop-color="#
|
|
4659
|
-
<stop offset="
|
|
4741
|
+
<linearGradient id="pivot-cap-grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4742
|
+
<stop offset="0%" stop-color="#64748b" />
|
|
4743
|
+
<stop offset="50%" stop-color="#334155" />
|
|
4660
4744
|
<stop offset="100%" stop-color="#0f172a" />
|
|
4661
|
-
</
|
|
4745
|
+
</linearGradient>
|
|
4662
4746
|
<linearGradient id="needle-grad" x1="0%" y1="100%" x2="0%" y2="0%">
|
|
4663
|
-
<stop offset="0%" [attr.stop-color]="gaugeColor()" stop-opacity="0.
|
|
4747
|
+
<stop offset="0%" [attr.stop-color]="gaugeColor()" stop-opacity="0.75" />
|
|
4664
4748
|
<stop offset="100%" [attr.stop-color]="gaugeColor()" />
|
|
4665
4749
|
</linearGradient>
|
|
4750
|
+
<filter id="gauge-blur-glow" x="-20%" y="-20%" width="140%" height="140%">
|
|
4751
|
+
<feGaussianBlur stdDeviation="3" result="blur" />
|
|
4752
|
+
<feComposite in="SourceGraphic" in2="blur" operator="over" />
|
|
4753
|
+
</filter>
|
|
4666
4754
|
</defs>
|
|
4667
4755
|
|
|
4668
|
-
<!--
|
|
4756
|
+
<!-- Outer background guide track -->
|
|
4669
4757
|
<path
|
|
4670
4758
|
[attr.d]="backgroundArcPath()"
|
|
4671
4759
|
fill="none"
|
|
4672
|
-
stroke="var(--
|
|
4760
|
+
stroke="var(--ngx-gauge-track-bg, rgba(148, 163, 184, 0.12))"
|
|
4673
4761
|
stroke-width="14"
|
|
4674
4762
|
stroke-linecap="round"
|
|
4675
4763
|
/>
|
|
4676
4764
|
|
|
4765
|
+
<!-- Colored background glow track -->
|
|
4766
|
+
<path
|
|
4767
|
+
[attr.d]="backgroundArcPath()"
|
|
4768
|
+
fill="none"
|
|
4769
|
+
[attr.stroke]="gaugeColor()"
|
|
4770
|
+
stroke-width="18"
|
|
4771
|
+
stroke-linecap="round"
|
|
4772
|
+
opacity="0.15"
|
|
4773
|
+
[attr.stroke-dasharray]="arcLength() + ',' + arcLength()"
|
|
4774
|
+
[attr.stroke-dashoffset]="progressDashOffset()"
|
|
4775
|
+
class="progress-arc-glow"
|
|
4776
|
+
/>
|
|
4777
|
+
|
|
4677
4778
|
<!-- Colored progress arc -->
|
|
4678
4779
|
<path
|
|
4679
4780
|
[attr.d]="backgroundArcPath()"
|
|
@@ -4686,23 +4787,83 @@ class GaugeChartComponent {
|
|
|
4686
4787
|
class="progress-arc"
|
|
4687
4788
|
/>
|
|
4688
4789
|
|
|
4790
|
+
<!-- Colored threshold zone lines (Outer edge) -->
|
|
4791
|
+
<g class="gauge-thresholds">
|
|
4792
|
+
@for (arc of thresholdArcs(); track $index) {
|
|
4793
|
+
<path
|
|
4794
|
+
[attr.d]="arc.path"
|
|
4795
|
+
fill="none"
|
|
4796
|
+
[attr.stroke]="arc.color"
|
|
4797
|
+
stroke-width="3"
|
|
4798
|
+
stroke-linecap="round"
|
|
4799
|
+
opacity="0.65"
|
|
4800
|
+
/>
|
|
4801
|
+
}
|
|
4802
|
+
</g>
|
|
4803
|
+
|
|
4804
|
+
<!-- Instrument Dial Ticks & Labels -->
|
|
4805
|
+
<g class="gauge-ticks">
|
|
4806
|
+
@for (tick of ticks(); track $index) {
|
|
4807
|
+
<!-- Radial Tick Mark -->
|
|
4808
|
+
<line
|
|
4809
|
+
[attr.x1]="tick.x1"
|
|
4810
|
+
[attr.y1]="tick.y1"
|
|
4811
|
+
[attr.x2]="tick.x2"
|
|
4812
|
+
[attr.y2]="tick.y2"
|
|
4813
|
+
[attr.stroke]="tick.isMajor ? 'var(--text-secondary, #64748b)' : 'var(--border-color, #cbd5e1)'"
|
|
4814
|
+
[attr.stroke-width]="tick.isMajor ? 1.5 : 1"
|
|
4815
|
+
opacity="0.6"
|
|
4816
|
+
/>
|
|
4817
|
+
<!-- Value Label -->
|
|
4818
|
+
@if (tick.isMajor) {
|
|
4819
|
+
<text
|
|
4820
|
+
[attr.x]="tick.textX"
|
|
4821
|
+
[attr.y]="tick.textY"
|
|
4822
|
+
fill="var(--text-secondary, #64748b)"
|
|
4823
|
+
font-size="8px"
|
|
4824
|
+
font-weight="700"
|
|
4825
|
+
text-anchor="middle"
|
|
4826
|
+
dominant-baseline="middle"
|
|
4827
|
+
font-family="monospace"
|
|
4828
|
+
>{{ tick.valueText }}</text>
|
|
4829
|
+
}
|
|
4830
|
+
}
|
|
4831
|
+
</g>
|
|
4832
|
+
|
|
4689
4833
|
<!-- Needle / Indicator dial -->
|
|
4690
4834
|
@if (showNeedle()) {
|
|
4691
4835
|
<g [attr.transform]="needleTransformString()" class="gauge-needle-group">
|
|
4692
|
-
<!--
|
|
4836
|
+
<!-- Tapered needle spear -->
|
|
4693
4837
|
<path
|
|
4694
|
-
d="M 100 100 L
|
|
4838
|
+
d="M 100 100 L 98 32 L 100 20 L 102 32 Z"
|
|
4695
4839
|
fill="url(#needle-grad)"
|
|
4696
4840
|
class="gauge-needle"
|
|
4697
4841
|
/>
|
|
4842
|
+
<!-- Core pin highlighting line -->
|
|
4843
|
+
<line
|
|
4844
|
+
x1="100" y1="98"
|
|
4845
|
+
x2="100" y2="24"
|
|
4846
|
+
stroke="#ffffff"
|
|
4847
|
+
stroke-width="1.2"
|
|
4848
|
+
stroke-linecap="round"
|
|
4849
|
+
opacity="0.9"
|
|
4850
|
+
/>
|
|
4851
|
+
<!-- Multi-layered pivot cap -->
|
|
4698
4852
|
<circle
|
|
4699
4853
|
cx="100"
|
|
4700
4854
|
cy="100"
|
|
4701
|
-
r="
|
|
4702
|
-
fill="url(#
|
|
4703
|
-
stroke="rgba(
|
|
4855
|
+
r="10"
|
|
4856
|
+
fill="url(#pivot-cap-grad)"
|
|
4857
|
+
stroke="rgba(0, 0, 0, 0.2)"
|
|
4704
4858
|
stroke-width="1"
|
|
4705
4859
|
/>
|
|
4860
|
+
<circle
|
|
4861
|
+
cx="100"
|
|
4862
|
+
cy="100"
|
|
4863
|
+
r="4"
|
|
4864
|
+
fill="#ffffff"
|
|
4865
|
+
opacity="0.25"
|
|
4866
|
+
/>
|
|
4706
4867
|
</g>
|
|
4707
4868
|
}
|
|
4708
4869
|
</svg>
|
|
@@ -4741,7 +4902,7 @@ class GaugeChartComponent {
|
|
|
4741
4902
|
</div>
|
|
4742
4903
|
}
|
|
4743
4904
|
</div>
|
|
4744
|
-
`, isInline: true, styles: [":host{display:block;width:100%;height:100%}.ngx-gauge-wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #e2e8f0);border-radius:12px;box-shadow:var(--shadow-sm, 0 1px 2px rgba(0,0,0,.05));position:relative}.ngx-gauge-container{position:relative;width:100%;max-width:240px;aspect-ratio:1;display:flex;align-items:center;justify-content:center}.ngx-gauge-svg{width:100%;height:100
|
|
4905
|
+
`, isInline: true, styles: [":host{display:block;width:100%;height:100%}.ngx-gauge-wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #e2e8f0);border-radius:12px;box-shadow:var(--shadow-sm, 0 1px 2px rgba(0,0,0,.05));position:relative}.ngx-gauge-container{position:relative;width:100%;max-width:240px;aspect-ratio:1;display:flex;align-items:center;justify-content:center}.ngx-gauge-svg{width:100%;height:100%;overflow:visible}.progress-arc{transition:stroke-dashoffset 1s cubic-bezier(.16,1,.3,1),stroke .3s ease;filter:drop-shadow(0 2px 4px rgba(0,0,0,.08))}.progress-arc-glow{transition:stroke-dashoffset 1s cubic-bezier(.16,1,.3,1),stroke .3s ease}.gauge-needle-group{transition:transform 1.2s cubic-bezier(.34,1.56,.64,1);transform-origin:100px 100px}.gauge-needle{filter:drop-shadow(0 3px 6px rgba(0,0,0,.22))}.gauge-center-badge{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none;z-index:2}.gauge-center-badge.semi-mode{transform:translateY(18px)}.gauge-value{font-size:32px;font-weight:850;letter-spacing:-.8px;line-height:1;transition:color .3s ease;font-family:var(--ngx-heading-font-family, inherit);filter:drop-shadow(0 1px 2px rgba(0,0,0,.05))}.gauge-label{font-size:10px;text-transform:uppercase;font-weight:750;color:var(--text-secondary, #64748b);letter-spacing:.8px;margin-top:6px}.chart-tooltip{position:absolute;pointer-events:none;transform:translate(-50%,-100%) translateY(-10px);background:var(--ngx-chart-tooltip-bg, rgba(15, 23, 42, .92));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);color:var(--ngx-chart-tooltip-color, #f8fafc);padding:10px 14px;border-radius:10px;font-size:12px;min-width:140px;box-shadow:0 10px 25px -5px #0000004d,0 8px 10px -6px #0000004d;border:1px solid rgba(255,255,255,.1);z-index:100;transition:left .1s cubic-bezier(.16,1,.3,1),top .1s cubic-bezier(.16,1,.3,1)}.tt-cat{font-weight:700;margin-bottom:6px;font-size:12.5px;border-bottom:1px solid rgba(255,255,255,.15);padding-bottom:4px;color:#38bdf8}.tt-row{display:flex;align-items:center;gap:8px;margin-top:4px}.tt-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.tt-name{color:#f8fafccc;flex:1}.tt-val{font-weight:700;font-family:monospace}.chart-header{width:100%;display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;min-height:24px;position:relative}.chart-export-menu{position:absolute;right:0;top:0;z-index:50}.export-trigger{padding:4px 10px;font-size:11px;font-weight:600;color:var(--ngx-chart-axis-text, #64748b);background:#f1f5f9cc;backdrop-filter:blur(8px);border:1px solid var(--ngx-chart-grid, #e2e8f0);border-radius:6px;cursor:pointer;transition:all .15s}.export-trigger:hover{background:#fff;color:#4f46e5;border-color:#4f46e5}.export-dropdown{position:absolute;right:0;top:calc(100% + 4px);background:#fff;border:1px solid var(--ngx-chart-grid, #e2e8f0);border-radius:8px;box-shadow:0 10px 15px -3px #0000001a;padding:4px;display:flex;flex-direction:column;gap:2px;min-width:120px}.export-dropdown button{background:none;border:none;padding:6px 10px;font-size:11px;text-align:left;cursor:pointer;color:#1e293b;border-radius:4px;width:100%;transition:all .12s}.export-dropdown button:hover{background:#4f46e50f;color:#4f46e5}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4745
4906
|
}
|
|
4746
4907
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: GaugeChartComponent, decorators: [{
|
|
4747
4908
|
type: Component,
|
|
@@ -4778,29 +4939,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4778
4939
|
>
|
|
4779
4940
|
<defs>
|
|
4780
4941
|
<linearGradient id="gauge-progress-grad" x1="0%" y1="100%" x2="100%" y2="0%">
|
|
4781
|
-
<stop offset="0%" [attr.stop-color]="gaugeColor()" stop-opacity="0.
|
|
4942
|
+
<stop offset="0%" [attr.stop-color]="gaugeColor()" stop-opacity="0.85" />
|
|
4782
4943
|
<stop offset="100%" [attr.stop-color]="gaugeColor()" />
|
|
4783
4944
|
</linearGradient>
|
|
4784
|
-
<
|
|
4785
|
-
<stop offset="0%" stop-color="#
|
|
4786
|
-
<stop offset="
|
|
4945
|
+
<linearGradient id="pivot-cap-grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4946
|
+
<stop offset="0%" stop-color="#64748b" />
|
|
4947
|
+
<stop offset="50%" stop-color="#334155" />
|
|
4787
4948
|
<stop offset="100%" stop-color="#0f172a" />
|
|
4788
|
-
</
|
|
4949
|
+
</linearGradient>
|
|
4789
4950
|
<linearGradient id="needle-grad" x1="0%" y1="100%" x2="0%" y2="0%">
|
|
4790
|
-
<stop offset="0%" [attr.stop-color]="gaugeColor()" stop-opacity="0.
|
|
4951
|
+
<stop offset="0%" [attr.stop-color]="gaugeColor()" stop-opacity="0.75" />
|
|
4791
4952
|
<stop offset="100%" [attr.stop-color]="gaugeColor()" />
|
|
4792
4953
|
</linearGradient>
|
|
4954
|
+
<filter id="gauge-blur-glow" x="-20%" y="-20%" width="140%" height="140%">
|
|
4955
|
+
<feGaussianBlur stdDeviation="3" result="blur" />
|
|
4956
|
+
<feComposite in="SourceGraphic" in2="blur" operator="over" />
|
|
4957
|
+
</filter>
|
|
4793
4958
|
</defs>
|
|
4794
4959
|
|
|
4795
|
-
<!--
|
|
4960
|
+
<!-- Outer background guide track -->
|
|
4796
4961
|
<path
|
|
4797
4962
|
[attr.d]="backgroundArcPath()"
|
|
4798
4963
|
fill="none"
|
|
4799
|
-
stroke="var(--
|
|
4964
|
+
stroke="var(--ngx-gauge-track-bg, rgba(148, 163, 184, 0.12))"
|
|
4800
4965
|
stroke-width="14"
|
|
4801
4966
|
stroke-linecap="round"
|
|
4802
4967
|
/>
|
|
4803
4968
|
|
|
4969
|
+
<!-- Colored background glow track -->
|
|
4970
|
+
<path
|
|
4971
|
+
[attr.d]="backgroundArcPath()"
|
|
4972
|
+
fill="none"
|
|
4973
|
+
[attr.stroke]="gaugeColor()"
|
|
4974
|
+
stroke-width="18"
|
|
4975
|
+
stroke-linecap="round"
|
|
4976
|
+
opacity="0.15"
|
|
4977
|
+
[attr.stroke-dasharray]="arcLength() + ',' + arcLength()"
|
|
4978
|
+
[attr.stroke-dashoffset]="progressDashOffset()"
|
|
4979
|
+
class="progress-arc-glow"
|
|
4980
|
+
/>
|
|
4981
|
+
|
|
4804
4982
|
<!-- Colored progress arc -->
|
|
4805
4983
|
<path
|
|
4806
4984
|
[attr.d]="backgroundArcPath()"
|
|
@@ -4813,23 +4991,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4813
4991
|
class="progress-arc"
|
|
4814
4992
|
/>
|
|
4815
4993
|
|
|
4994
|
+
<!-- Colored threshold zone lines (Outer edge) -->
|
|
4995
|
+
<g class="gauge-thresholds">
|
|
4996
|
+
@for (arc of thresholdArcs(); track $index) {
|
|
4997
|
+
<path
|
|
4998
|
+
[attr.d]="arc.path"
|
|
4999
|
+
fill="none"
|
|
5000
|
+
[attr.stroke]="arc.color"
|
|
5001
|
+
stroke-width="3"
|
|
5002
|
+
stroke-linecap="round"
|
|
5003
|
+
opacity="0.65"
|
|
5004
|
+
/>
|
|
5005
|
+
}
|
|
5006
|
+
</g>
|
|
5007
|
+
|
|
5008
|
+
<!-- Instrument Dial Ticks & Labels -->
|
|
5009
|
+
<g class="gauge-ticks">
|
|
5010
|
+
@for (tick of ticks(); track $index) {
|
|
5011
|
+
<!-- Radial Tick Mark -->
|
|
5012
|
+
<line
|
|
5013
|
+
[attr.x1]="tick.x1"
|
|
5014
|
+
[attr.y1]="tick.y1"
|
|
5015
|
+
[attr.x2]="tick.x2"
|
|
5016
|
+
[attr.y2]="tick.y2"
|
|
5017
|
+
[attr.stroke]="tick.isMajor ? 'var(--text-secondary, #64748b)' : 'var(--border-color, #cbd5e1)'"
|
|
5018
|
+
[attr.stroke-width]="tick.isMajor ? 1.5 : 1"
|
|
5019
|
+
opacity="0.6"
|
|
5020
|
+
/>
|
|
5021
|
+
<!-- Value Label -->
|
|
5022
|
+
@if (tick.isMajor) {
|
|
5023
|
+
<text
|
|
5024
|
+
[attr.x]="tick.textX"
|
|
5025
|
+
[attr.y]="tick.textY"
|
|
5026
|
+
fill="var(--text-secondary, #64748b)"
|
|
5027
|
+
font-size="8px"
|
|
5028
|
+
font-weight="700"
|
|
5029
|
+
text-anchor="middle"
|
|
5030
|
+
dominant-baseline="middle"
|
|
5031
|
+
font-family="monospace"
|
|
5032
|
+
>{{ tick.valueText }}</text>
|
|
5033
|
+
}
|
|
5034
|
+
}
|
|
5035
|
+
</g>
|
|
5036
|
+
|
|
4816
5037
|
<!-- Needle / Indicator dial -->
|
|
4817
5038
|
@if (showNeedle()) {
|
|
4818
5039
|
<g [attr.transform]="needleTransformString()" class="gauge-needle-group">
|
|
4819
|
-
<!--
|
|
5040
|
+
<!-- Tapered needle spear -->
|
|
4820
5041
|
<path
|
|
4821
|
-
d="M 100 100 L
|
|
5042
|
+
d="M 100 100 L 98 32 L 100 20 L 102 32 Z"
|
|
4822
5043
|
fill="url(#needle-grad)"
|
|
4823
5044
|
class="gauge-needle"
|
|
4824
5045
|
/>
|
|
5046
|
+
<!-- Core pin highlighting line -->
|
|
5047
|
+
<line
|
|
5048
|
+
x1="100" y1="98"
|
|
5049
|
+
x2="100" y2="24"
|
|
5050
|
+
stroke="#ffffff"
|
|
5051
|
+
stroke-width="1.2"
|
|
5052
|
+
stroke-linecap="round"
|
|
5053
|
+
opacity="0.9"
|
|
5054
|
+
/>
|
|
5055
|
+
<!-- Multi-layered pivot cap -->
|
|
4825
5056
|
<circle
|
|
4826
5057
|
cx="100"
|
|
4827
5058
|
cy="100"
|
|
4828
|
-
r="
|
|
4829
|
-
fill="url(#
|
|
4830
|
-
stroke="rgba(
|
|
5059
|
+
r="10"
|
|
5060
|
+
fill="url(#pivot-cap-grad)"
|
|
5061
|
+
stroke="rgba(0, 0, 0, 0.2)"
|
|
4831
5062
|
stroke-width="1"
|
|
4832
5063
|
/>
|
|
5064
|
+
<circle
|
|
5065
|
+
cx="100"
|
|
5066
|
+
cy="100"
|
|
5067
|
+
r="4"
|
|
5068
|
+
fill="#ffffff"
|
|
5069
|
+
opacity="0.25"
|
|
5070
|
+
/>
|
|
4833
5071
|
</g>
|
|
4834
5072
|
}
|
|
4835
5073
|
</svg>
|
|
@@ -4868,7 +5106,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4868
5106
|
</div>
|
|
4869
5107
|
}
|
|
4870
5108
|
</div>
|
|
4871
|
-
`, styles: [":host{display:block;width:100%;height:100%}.ngx-gauge-wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #e2e8f0);border-radius:12px;box-shadow:var(--shadow-sm, 0 1px 2px rgba(0,0,0,.05));position:relative}.ngx-gauge-container{position:relative;width:100%;max-width:240px;aspect-ratio:1;display:flex;align-items:center;justify-content:center}.ngx-gauge-svg{width:100%;height:100
|
|
5109
|
+
`, styles: [":host{display:block;width:100%;height:100%}.ngx-gauge-wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #e2e8f0);border-radius:12px;box-shadow:var(--shadow-sm, 0 1px 2px rgba(0,0,0,.05));position:relative}.ngx-gauge-container{position:relative;width:100%;max-width:240px;aspect-ratio:1;display:flex;align-items:center;justify-content:center}.ngx-gauge-svg{width:100%;height:100%;overflow:visible}.progress-arc{transition:stroke-dashoffset 1s cubic-bezier(.16,1,.3,1),stroke .3s ease;filter:drop-shadow(0 2px 4px rgba(0,0,0,.08))}.progress-arc-glow{transition:stroke-dashoffset 1s cubic-bezier(.16,1,.3,1),stroke .3s ease}.gauge-needle-group{transition:transform 1.2s cubic-bezier(.34,1.56,.64,1);transform-origin:100px 100px}.gauge-needle{filter:drop-shadow(0 3px 6px rgba(0,0,0,.22))}.gauge-center-badge{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none;z-index:2}.gauge-center-badge.semi-mode{transform:translateY(18px)}.gauge-value{font-size:32px;font-weight:850;letter-spacing:-.8px;line-height:1;transition:color .3s ease;font-family:var(--ngx-heading-font-family, inherit);filter:drop-shadow(0 1px 2px rgba(0,0,0,.05))}.gauge-label{font-size:10px;text-transform:uppercase;font-weight:750;color:var(--text-secondary, #64748b);letter-spacing:.8px;margin-top:6px}.chart-tooltip{position:absolute;pointer-events:none;transform:translate(-50%,-100%) translateY(-10px);background:var(--ngx-chart-tooltip-bg, rgba(15, 23, 42, .92));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);color:var(--ngx-chart-tooltip-color, #f8fafc);padding:10px 14px;border-radius:10px;font-size:12px;min-width:140px;box-shadow:0 10px 25px -5px #0000004d,0 8px 10px -6px #0000004d;border:1px solid rgba(255,255,255,.1);z-index:100;transition:left .1s cubic-bezier(.16,1,.3,1),top .1s cubic-bezier(.16,1,.3,1)}.tt-cat{font-weight:700;margin-bottom:6px;font-size:12.5px;border-bottom:1px solid rgba(255,255,255,.15);padding-bottom:4px;color:#38bdf8}.tt-row{display:flex;align-items:center;gap:8px;margin-top:4px}.tt-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.tt-name{color:#f8fafccc;flex:1}.tt-val{font-weight:700;font-family:monospace}.chart-header{width:100%;display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;min-height:24px;position:relative}.chart-export-menu{position:absolute;right:0;top:0;z-index:50}.export-trigger{padding:4px 10px;font-size:11px;font-weight:600;color:var(--ngx-chart-axis-text, #64748b);background:#f1f5f9cc;backdrop-filter:blur(8px);border:1px solid var(--ngx-chart-grid, #e2e8f0);border-radius:6px;cursor:pointer;transition:all .15s}.export-trigger:hover{background:#fff;color:#4f46e5;border-color:#4f46e5}.export-dropdown{position:absolute;right:0;top:calc(100% + 4px);background:#fff;border:1px solid var(--ngx-chart-grid, #e2e8f0);border-radius:8px;box-shadow:0 10px 15px -3px #0000001a;padding:4px;display:flex;flex-direction:column;gap:2px;min-width:120px}.export-dropdown button{background:none;border:none;padding:6px 10px;font-size:11px;text-align:left;cursor:pointer;color:#1e293b;border-radius:4px;width:100%;transition:all .12s}.export-dropdown button:hover{background:#4f46e50f;color:#4f46e5}\n"] }]
|
|
4872
5110
|
}], ctorParameters: () => [], propDecorators: { closeExportMenu: [{
|
|
4873
5111
|
type: HostListener,
|
|
4874
5112
|
args: ['document:click']
|