ngx-core-components 0.3.21 → 0.3.23
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 +2 -1
- package/ai/ngx-web-llm.service.d.ts +22 -0
- package/ai/public-api.d.ts +2 -0
- package/charts/gantt-chart/gantt-chart.component.d.ts +4 -1
- package/charts/line-chart/line-chart.component.d.ts +19 -1
- package/fesm2022/ngx-core-components-ai.mjs +173 -9
- package/fesm2022/ngx-core-components-ai.mjs.map +1 -1
- package/fesm2022/ngx-core-components-charts.mjs +119 -12
- package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
- package/fesm2022/ngx-core-components-grid.mjs +119 -38
- package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
- package/fesm2022/ngx-core-components-inputs.mjs +714 -3
- package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
- package/fesm2022/ngx-core-components-navigation.mjs +19 -13
- package/fesm2022/ngx-core-components-navigation.mjs.map +1 -1
- package/fesm2022/ngx-core-components.mjs +2 -2
- package/fesm2022/ngx-core-components.mjs.map +1 -1
- package/grid/data-grid/data-grid.component.d.ts +40 -1
- package/inputs/form-builder/form-builder.component.d.ts +20 -0
- package/inputs/form-builder/form-designer.component.d.ts +42 -0
- package/inputs/public-api.d.ts +1 -0
- package/package.json +5 -5
- package/public-api.d.ts +3 -1
- package/themes/theme.css +22 -0
|
@@ -601,11 +601,15 @@ class LineChartComponent {
|
|
|
601
601
|
referenceLines = input([]);
|
|
602
602
|
labelFormatter = input(undefined);
|
|
603
603
|
tooltipTemplate = input(null);
|
|
604
|
+
zoomEnabled = input(false);
|
|
605
|
+
panEnabled = input(false);
|
|
604
606
|
pointClick = output();
|
|
605
607
|
svgEl = viewChild('svgEl');
|
|
606
608
|
exportMenuOpen = signal(false);
|
|
607
609
|
animateState = signal(false);
|
|
608
610
|
containerWidth = signal(600);
|
|
611
|
+
zoomScale = signal(1);
|
|
612
|
+
panOffset = signal({ x: 0, y: 0 });
|
|
609
613
|
crosshair = signal(null);
|
|
610
614
|
activeCategoryIndex = signal(null);
|
|
611
615
|
tooltip = signal(null);
|
|
@@ -650,9 +654,11 @@ class LineChartComponent {
|
|
|
650
654
|
return line + ` L ${last[0]} ${this.innerH()} L ${first[0]} ${this.innerH()} Z`;
|
|
651
655
|
}
|
|
652
656
|
onMouseMove(event) {
|
|
657
|
+
if (this.isPanning)
|
|
658
|
+
return;
|
|
653
659
|
const el = event.currentTarget;
|
|
654
660
|
const rect = el.getBoundingClientRect();
|
|
655
|
-
const mx = event.clientX - rect.left - this.PAD_LEFT;
|
|
661
|
+
const mx = (event.clientX - rect.left - this.PAD_LEFT - this.panOffset().x) / this.zoomScale();
|
|
656
662
|
const cats = this.categories();
|
|
657
663
|
if (cats.length === 0)
|
|
658
664
|
return;
|
|
@@ -672,6 +678,59 @@ class LineChartComponent {
|
|
|
672
678
|
rows,
|
|
673
679
|
});
|
|
674
680
|
}
|
|
681
|
+
isPanning = false;
|
|
682
|
+
panStart = { x: 0, y: 0 };
|
|
683
|
+
onWheel(event) {
|
|
684
|
+
if (!this.zoomEnabled())
|
|
685
|
+
return;
|
|
686
|
+
event.preventDefault();
|
|
687
|
+
const zoomFactor = 1.1;
|
|
688
|
+
let newScale = this.zoomScale();
|
|
689
|
+
if (event.deltaY < 0) {
|
|
690
|
+
newScale = Math.min(5, newScale * zoomFactor);
|
|
691
|
+
}
|
|
692
|
+
else {
|
|
693
|
+
newScale = Math.max(1, newScale / zoomFactor);
|
|
694
|
+
}
|
|
695
|
+
const rect = this.svgEl()?.nativeElement.getBoundingClientRect();
|
|
696
|
+
if (rect && newScale !== this.zoomScale()) {
|
|
697
|
+
const mouseX = event.clientX - rect.left - this.PAD_LEFT;
|
|
698
|
+
const mouseY = event.clientY - rect.top - this.PAD_TOP;
|
|
699
|
+
const prevScale = this.zoomScale();
|
|
700
|
+
const dx = mouseX - this.panOffset().x;
|
|
701
|
+
const dy = mouseY - this.panOffset().y;
|
|
702
|
+
const newX = mouseX - dx * (newScale / prevScale);
|
|
703
|
+
const newY = mouseY - dy * (newScale / prevScale);
|
|
704
|
+
this.zoomScale.set(newScale);
|
|
705
|
+
this.panOffset.set({ x: newScale === 1 ? 0 : newX, y: newScale === 1 ? 0 : newY });
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
onMouseDown(event) {
|
|
709
|
+
if (!this.panEnabled() || this.zoomScale() === 1)
|
|
710
|
+
return;
|
|
711
|
+
this.isPanning = true;
|
|
712
|
+
this.panStart = {
|
|
713
|
+
x: event.clientX - this.panOffset().x,
|
|
714
|
+
y: event.clientY - this.panOffset().y
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
onSvgMouseMove(event) {
|
|
718
|
+
if (this.isPanning) {
|
|
719
|
+
const newX = event.clientX - this.panStart.x;
|
|
720
|
+
const newY = event.clientY - this.panStart.y;
|
|
721
|
+
this.panOffset.set({ x: newX, y: newY });
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
onMouseUp() {
|
|
725
|
+
this.isPanning = false;
|
|
726
|
+
}
|
|
727
|
+
onMouseLeaveChart() {
|
|
728
|
+
this.isPanning = false;
|
|
729
|
+
}
|
|
730
|
+
resetZoom() {
|
|
731
|
+
this.zoomScale.set(1);
|
|
732
|
+
this.panOffset.set({ x: 0, y: 0 });
|
|
733
|
+
}
|
|
675
734
|
onPointClick(ci, si, v) {
|
|
676
735
|
const s = this.series()[si];
|
|
677
736
|
const cats = this.categories();
|
|
@@ -768,7 +827,7 @@ class LineChartComponent {
|
|
|
768
827
|
}
|
|
769
828
|
fmtNum = fmtNum;
|
|
770
829
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LineChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
771
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: LineChartComponent, isStandalone: true, selector: "ngx-line-chart", inputs: { series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null }, showArea: { classPropertyName: "showArea", publicName: "showArea", isSignal: true, isRequired: false, transformFunction: null }, showMarkers: { classPropertyName: "showMarkers", publicName: "showMarkers", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, showExport: { classPropertyName: "showExport", publicName: "showExport", isSignal: true, isRequired: false, transformFunction: null }, showLabels: { classPropertyName: "showLabels", publicName: "showLabels", isSignal: true, isRequired: false, transformFunction: null }, referenceLines: { classPropertyName: "referenceLines", publicName: "referenceLines", isSignal: true, isRequired: false, transformFunction: null }, labelFormatter: { classPropertyName: "labelFormatter", publicName: "labelFormatter", isSignal: true, isRequired: false, transformFunction: null }, tooltipTemplate: { classPropertyName: "tooltipTemplate", publicName: "tooltipTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClick: "pointClick" }, host: { listeners: { "document:click": "closeExportMenu()" } }, viewQueries: [{ propertyName: "svgEl", first: true, predicate: ["svgEl"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
830
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: LineChartComponent, isStandalone: true, selector: "ngx-line-chart", inputs: { series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null }, showArea: { classPropertyName: "showArea", publicName: "showArea", isSignal: true, isRequired: false, transformFunction: null }, showMarkers: { classPropertyName: "showMarkers", publicName: "showMarkers", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, showExport: { classPropertyName: "showExport", publicName: "showExport", isSignal: true, isRequired: false, transformFunction: null }, showLabels: { classPropertyName: "showLabels", publicName: "showLabels", isSignal: true, isRequired: false, transformFunction: null }, referenceLines: { classPropertyName: "referenceLines", publicName: "referenceLines", isSignal: true, isRequired: false, transformFunction: null }, labelFormatter: { classPropertyName: "labelFormatter", publicName: "labelFormatter", isSignal: true, isRequired: false, transformFunction: null }, tooltipTemplate: { classPropertyName: "tooltipTemplate", publicName: "tooltipTemplate", isSignal: true, isRequired: false, transformFunction: null }, zoomEnabled: { classPropertyName: "zoomEnabled", publicName: "zoomEnabled", isSignal: true, isRequired: false, transformFunction: null }, panEnabled: { classPropertyName: "panEnabled", publicName: "panEnabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClick: "pointClick" }, host: { listeners: { "document:click": "closeExportMenu()" } }, viewQueries: [{ propertyName: "svgEl", first: true, predicate: ["svgEl"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
772
831
|
<div
|
|
773
832
|
class="ngx-line-chart"
|
|
774
833
|
(mousemove)="onMouseMove($event)"
|
|
@@ -803,12 +862,24 @@ class LineChartComponent {
|
|
|
803
862
|
</div>
|
|
804
863
|
}
|
|
805
864
|
|
|
865
|
+
<!-- Reset Zoom Floating Button -->
|
|
866
|
+
@if (zoomScale() !== 1 || panOffset().x !== 0 || panOffset().y !== 0) {
|
|
867
|
+
<button class="reset-zoom-btn" (click)="resetZoom()" type="button">Reset Zoom</button>
|
|
868
|
+
}
|
|
869
|
+
|
|
806
870
|
<!-- SVG Chart -->
|
|
807
871
|
<svg
|
|
808
872
|
#svgEl
|
|
809
873
|
[attr.width]="'100%'"
|
|
810
874
|
[attr.height]="chartHeight()"
|
|
811
875
|
class="chart-svg"
|
|
876
|
+
(wheel)="onWheel($event)"
|
|
877
|
+
(mousedown)="onMouseDown($event)"
|
|
878
|
+
(mousemove)="onSvgMouseMove($event)"
|
|
879
|
+
(mouseup)="onMouseUp()"
|
|
880
|
+
(mouseleave)="onMouseLeaveChart()"
|
|
881
|
+
[class.zoom-active]="zoomEnabled() || panEnabled()"
|
|
882
|
+
[class.panning]="isPanning"
|
|
812
883
|
>
|
|
813
884
|
<defs>
|
|
814
885
|
@for (s of series(); track s.name; let i = $index) {
|
|
@@ -818,7 +889,7 @@ class LineChartComponent {
|
|
|
818
889
|
</linearGradient>
|
|
819
890
|
}
|
|
820
891
|
</defs>
|
|
821
|
-
<g [attr.transform]="'translate(' + PAD_LEFT + ',' + PAD_TOP + ')'">
|
|
892
|
+
<g [attr.transform]="'translate(' + (PAD_LEFT + panOffset().x) + ',' + (PAD_TOP + panOffset().y) + ') scale(' + zoomScale() + ')'">
|
|
822
893
|
|
|
823
894
|
<!-- Y axis ticks and gridlines -->
|
|
824
895
|
@for (tick of yTicks(); track tick) {
|
|
@@ -931,7 +1002,7 @@ class LineChartComponent {
|
|
|
931
1002
|
</div>
|
|
932
1003
|
}
|
|
933
1004
|
</div>
|
|
934
|
-
`, isInline: true, styles: [":host{display:block;position:relative}.ngx-line-chart{position:relative;background:var(--ngx-chart-bg, #fff)}.chart-header{display:flex;justify-content:space-between;align-items:center;min-height:24px;position:relative}.chart-legend{display:flex;gap:16px;padding:4px 0 12px;flex-wrap:wrap}.legend-item{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--ngx-chart-axis-text,#6c757d);font-weight:500}.legend-line{width:18px;height:4px;border-radius:2px;display:inline-block}.chart-svg{display:block;overflow:visible;cursor:crosshair}.axis-label{font-size:11px;fill:var(--ngx-chart-axis-text,#6c757d);-webkit-user-select:none;user-select:none;font-weight:500}.chart-crosshair{transition:x1 .12s cubic-bezier(.16,1,.3,1),x2 .12s cubic-bezier(.16,1,.3,1)}.reference-line-label{font-size:10px;font-weight:700;-webkit-user-select:none;user-select:none}.line-label{font-size:11px;fill:var(--ngx-chart-axis-text,#6c757d);pointer-events:none;font-weight:600}.marker-dot{cursor:pointer}@keyframes lineDraw{0%{stroke-dashoffset:1200}to{stroke-dashoffset:0}}.line-path{stroke-dasharray:1200;stroke-dashoffset:1200;animation:lineDraw 1.2s cubic-bezier(.16,1,.3,1) forwards}@keyframes areaFadeIn{0%{opacity:0}to{opacity:1}}.area-path{animation:areaFadeIn 1s cubic-bezier(.16,1,.3,1) .3s both}.marker-dot{animation:areaFadeIn .5s ease .8s both;transition:r .15s cubic-bezier(.16,1,.3,1),stroke-width .15s}.chart-tooltip{position:absolute;pointer-events:none;transform:translate(-50%,-100%) translateY(-8px);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:150px;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 .12s cubic-bezier(.16,1,.3,1),top .12s cubic-bezier(.16,1,.3,1);font-family:inherit}.tt-cat{font-weight:700;margin-bottom:8px;font-size:12.5px;border-bottom:1px solid rgba(255,255,255,.15);padding-bottom:6px;color:#38bdf8}.tt-row{display:flex;align-items:center;gap:8px;margin-top:5px}.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-export-menu{position:absolute;top:0;right:0;z-index:50}.export-trigger{padding:4px 10px;font-size:11px;font-weight:600;color:var(--ngx-chart-axis-text, #6c757d);background:#ffffffb3;backdrop-filter:blur(8px);border:1px solid var(--ngx-chart-grid, #ebedf0);border-radius:6px;cursor:pointer;transition:all .15s}.export-trigger:hover{background:#fff;color:var(--primary-color, #4f46e5);border-color:var(--primary-color, #4f46e5)}.export-dropdown{position:absolute;right:0;top:calc(100% + 4px);background:#fff;border:1px solid var(--ngx-chart-grid, #ebedf0);border-radius:8px;box-shadow:0 10px 15px -3px #00000014;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:#343a40;border-radius:4px;font-family:inherit;width:100%;transition:all .12s}.export-dropdown button:hover{background:#4f46e50f;color:var(--primary-color, #4f46e5)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1005
|
+
`, isInline: true, styles: [":host{display:block;position:relative}.ngx-line-chart{position:relative;background:var(--ngx-chart-bg, #fff)}.reset-zoom-btn{position:absolute;top:40px;right:12px;background:#ffffffb3;backdrop-filter:blur(8px);border:1px solid rgba(0,0,0,.1);padding:6px 12px;border-radius:20px;font-size:11px;font-weight:600;color:#334155;cursor:pointer;box-shadow:0 4px 12px #00000014;transition:all .2s;z-index:10}.reset-zoom-btn:hover{background:#ffffffe6;transform:translateY(-1px)}.ngx-line-chart.dark-mode .reset-zoom-btn{background:#1e293bb3;border-color:#ffffff1a;color:#f1f5f9}.chart-svg.panning{cursor:grabbing!important}.chart-header{display:flex;justify-content:space-between;align-items:center;min-height:24px;position:relative}.chart-legend{display:flex;gap:16px;padding:4px 0 12px;flex-wrap:wrap}.legend-item{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--ngx-chart-axis-text,#6c757d);font-weight:500}.legend-line{width:18px;height:4px;border-radius:2px;display:inline-block}.chart-svg{display:block;overflow:visible;cursor:crosshair}.axis-label{font-size:11px;fill:var(--ngx-chart-axis-text,#6c757d);-webkit-user-select:none;user-select:none;font-weight:500}.chart-crosshair{transition:x1 .12s cubic-bezier(.16,1,.3,1),x2 .12s cubic-bezier(.16,1,.3,1)}.reference-line-label{font-size:10px;font-weight:700;-webkit-user-select:none;user-select:none}.line-label{font-size:11px;fill:var(--ngx-chart-axis-text,#6c757d);pointer-events:none;font-weight:600}.marker-dot{cursor:pointer}@keyframes lineDraw{0%{stroke-dashoffset:1200}to{stroke-dashoffset:0}}.line-path{stroke-dasharray:1200;stroke-dashoffset:1200;animation:lineDraw 1.2s cubic-bezier(.16,1,.3,1) forwards}@keyframes areaFadeIn{0%{opacity:0}to{opacity:1}}.area-path{animation:areaFadeIn 1s cubic-bezier(.16,1,.3,1) .3s both}.marker-dot{animation:areaFadeIn .5s ease .8s both;transition:r .15s cubic-bezier(.16,1,.3,1),stroke-width .15s}.chart-tooltip{position:absolute;pointer-events:none;transform:translate(-50%,-100%) translateY(-8px);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:150px;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 .12s cubic-bezier(.16,1,.3,1),top .12s cubic-bezier(.16,1,.3,1);font-family:inherit}.tt-cat{font-weight:700;margin-bottom:8px;font-size:12.5px;border-bottom:1px solid rgba(255,255,255,.15);padding-bottom:6px;color:#38bdf8}.tt-row{display:flex;align-items:center;gap:8px;margin-top:5px}.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-export-menu{position:absolute;top:0;right:0;z-index:50}.export-trigger{padding:4px 10px;font-size:11px;font-weight:600;color:var(--ngx-chart-axis-text, #6c757d);background:#ffffffb3;backdrop-filter:blur(8px);border:1px solid var(--ngx-chart-grid, #ebedf0);border-radius:6px;cursor:pointer;transition:all .15s}.export-trigger:hover{background:#fff;color:var(--primary-color, #4f46e5);border-color:var(--primary-color, #4f46e5)}.export-dropdown{position:absolute;right:0;top:calc(100% + 4px);background:#fff;border:1px solid var(--ngx-chart-grid, #ebedf0);border-radius:8px;box-shadow:0 10px 15px -3px #00000014;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:#343a40;border-radius:4px;font-family:inherit;width:100%;transition:all .12s}.export-dropdown button:hover{background:#4f46e50f;color:var(--primary-color, #4f46e5)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
935
1006
|
}
|
|
936
1007
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LineChartComponent, decorators: [{
|
|
937
1008
|
type: Component,
|
|
@@ -970,12 +1041,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
970
1041
|
</div>
|
|
971
1042
|
}
|
|
972
1043
|
|
|
1044
|
+
<!-- Reset Zoom Floating Button -->
|
|
1045
|
+
@if (zoomScale() !== 1 || panOffset().x !== 0 || panOffset().y !== 0) {
|
|
1046
|
+
<button class="reset-zoom-btn" (click)="resetZoom()" type="button">Reset Zoom</button>
|
|
1047
|
+
}
|
|
1048
|
+
|
|
973
1049
|
<!-- SVG Chart -->
|
|
974
1050
|
<svg
|
|
975
1051
|
#svgEl
|
|
976
1052
|
[attr.width]="'100%'"
|
|
977
1053
|
[attr.height]="chartHeight()"
|
|
978
1054
|
class="chart-svg"
|
|
1055
|
+
(wheel)="onWheel($event)"
|
|
1056
|
+
(mousedown)="onMouseDown($event)"
|
|
1057
|
+
(mousemove)="onSvgMouseMove($event)"
|
|
1058
|
+
(mouseup)="onMouseUp()"
|
|
1059
|
+
(mouseleave)="onMouseLeaveChart()"
|
|
1060
|
+
[class.zoom-active]="zoomEnabled() || panEnabled()"
|
|
1061
|
+
[class.panning]="isPanning"
|
|
979
1062
|
>
|
|
980
1063
|
<defs>
|
|
981
1064
|
@for (s of series(); track s.name; let i = $index) {
|
|
@@ -985,7 +1068,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
985
1068
|
</linearGradient>
|
|
986
1069
|
}
|
|
987
1070
|
</defs>
|
|
988
|
-
<g [attr.transform]="'translate(' + PAD_LEFT + ',' + PAD_TOP + ')'">
|
|
1071
|
+
<g [attr.transform]="'translate(' + (PAD_LEFT + panOffset().x) + ',' + (PAD_TOP + panOffset().y) + ') scale(' + zoomScale() + ')'">
|
|
989
1072
|
|
|
990
1073
|
<!-- Y axis ticks and gridlines -->
|
|
991
1074
|
@for (tick of yTicks(); track tick) {
|
|
@@ -1098,7 +1181,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1098
1181
|
</div>
|
|
1099
1182
|
}
|
|
1100
1183
|
</div>
|
|
1101
|
-
`, styles: [":host{display:block;position:relative}.ngx-line-chart{position:relative;background:var(--ngx-chart-bg, #fff)}.chart-header{display:flex;justify-content:space-between;align-items:center;min-height:24px;position:relative}.chart-legend{display:flex;gap:16px;padding:4px 0 12px;flex-wrap:wrap}.legend-item{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--ngx-chart-axis-text,#6c757d);font-weight:500}.legend-line{width:18px;height:4px;border-radius:2px;display:inline-block}.chart-svg{display:block;overflow:visible;cursor:crosshair}.axis-label{font-size:11px;fill:var(--ngx-chart-axis-text,#6c757d);-webkit-user-select:none;user-select:none;font-weight:500}.chart-crosshair{transition:x1 .12s cubic-bezier(.16,1,.3,1),x2 .12s cubic-bezier(.16,1,.3,1)}.reference-line-label{font-size:10px;font-weight:700;-webkit-user-select:none;user-select:none}.line-label{font-size:11px;fill:var(--ngx-chart-axis-text,#6c757d);pointer-events:none;font-weight:600}.marker-dot{cursor:pointer}@keyframes lineDraw{0%{stroke-dashoffset:1200}to{stroke-dashoffset:0}}.line-path{stroke-dasharray:1200;stroke-dashoffset:1200;animation:lineDraw 1.2s cubic-bezier(.16,1,.3,1) forwards}@keyframes areaFadeIn{0%{opacity:0}to{opacity:1}}.area-path{animation:areaFadeIn 1s cubic-bezier(.16,1,.3,1) .3s both}.marker-dot{animation:areaFadeIn .5s ease .8s both;transition:r .15s cubic-bezier(.16,1,.3,1),stroke-width .15s}.chart-tooltip{position:absolute;pointer-events:none;transform:translate(-50%,-100%) translateY(-8px);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:150px;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 .12s cubic-bezier(.16,1,.3,1),top .12s cubic-bezier(.16,1,.3,1);font-family:inherit}.tt-cat{font-weight:700;margin-bottom:8px;font-size:12.5px;border-bottom:1px solid rgba(255,255,255,.15);padding-bottom:6px;color:#38bdf8}.tt-row{display:flex;align-items:center;gap:8px;margin-top:5px}.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-export-menu{position:absolute;top:0;right:0;z-index:50}.export-trigger{padding:4px 10px;font-size:11px;font-weight:600;color:var(--ngx-chart-axis-text, #6c757d);background:#ffffffb3;backdrop-filter:blur(8px);border:1px solid var(--ngx-chart-grid, #ebedf0);border-radius:6px;cursor:pointer;transition:all .15s}.export-trigger:hover{background:#fff;color:var(--primary-color, #4f46e5);border-color:var(--primary-color, #4f46e5)}.export-dropdown{position:absolute;right:0;top:calc(100% + 4px);background:#fff;border:1px solid var(--ngx-chart-grid, #ebedf0);border-radius:8px;box-shadow:0 10px 15px -3px #00000014;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:#343a40;border-radius:4px;font-family:inherit;width:100%;transition:all .12s}.export-dropdown button:hover{background:#4f46e50f;color:var(--primary-color, #4f46e5)}\n"] }]
|
|
1184
|
+
`, styles: [":host{display:block;position:relative}.ngx-line-chart{position:relative;background:var(--ngx-chart-bg, #fff)}.reset-zoom-btn{position:absolute;top:40px;right:12px;background:#ffffffb3;backdrop-filter:blur(8px);border:1px solid rgba(0,0,0,.1);padding:6px 12px;border-radius:20px;font-size:11px;font-weight:600;color:#334155;cursor:pointer;box-shadow:0 4px 12px #00000014;transition:all .2s;z-index:10}.reset-zoom-btn:hover{background:#ffffffe6;transform:translateY(-1px)}.ngx-line-chart.dark-mode .reset-zoom-btn{background:#1e293bb3;border-color:#ffffff1a;color:#f1f5f9}.chart-svg.panning{cursor:grabbing!important}.chart-header{display:flex;justify-content:space-between;align-items:center;min-height:24px;position:relative}.chart-legend{display:flex;gap:16px;padding:4px 0 12px;flex-wrap:wrap}.legend-item{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--ngx-chart-axis-text,#6c757d);font-weight:500}.legend-line{width:18px;height:4px;border-radius:2px;display:inline-block}.chart-svg{display:block;overflow:visible;cursor:crosshair}.axis-label{font-size:11px;fill:var(--ngx-chart-axis-text,#6c757d);-webkit-user-select:none;user-select:none;font-weight:500}.chart-crosshair{transition:x1 .12s cubic-bezier(.16,1,.3,1),x2 .12s cubic-bezier(.16,1,.3,1)}.reference-line-label{font-size:10px;font-weight:700;-webkit-user-select:none;user-select:none}.line-label{font-size:11px;fill:var(--ngx-chart-axis-text,#6c757d);pointer-events:none;font-weight:600}.marker-dot{cursor:pointer}@keyframes lineDraw{0%{stroke-dashoffset:1200}to{stroke-dashoffset:0}}.line-path{stroke-dasharray:1200;stroke-dashoffset:1200;animation:lineDraw 1.2s cubic-bezier(.16,1,.3,1) forwards}@keyframes areaFadeIn{0%{opacity:0}to{opacity:1}}.area-path{animation:areaFadeIn 1s cubic-bezier(.16,1,.3,1) .3s both}.marker-dot{animation:areaFadeIn .5s ease .8s both;transition:r .15s cubic-bezier(.16,1,.3,1),stroke-width .15s}.chart-tooltip{position:absolute;pointer-events:none;transform:translate(-50%,-100%) translateY(-8px);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:150px;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 .12s cubic-bezier(.16,1,.3,1),top .12s cubic-bezier(.16,1,.3,1);font-family:inherit}.tt-cat{font-weight:700;margin-bottom:8px;font-size:12.5px;border-bottom:1px solid rgba(255,255,255,.15);padding-bottom:6px;color:#38bdf8}.tt-row{display:flex;align-items:center;gap:8px;margin-top:5px}.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-export-menu{position:absolute;top:0;right:0;z-index:50}.export-trigger{padding:4px 10px;font-size:11px;font-weight:600;color:var(--ngx-chart-axis-text, #6c757d);background:#ffffffb3;backdrop-filter:blur(8px);border:1px solid var(--ngx-chart-grid, #ebedf0);border-radius:6px;cursor:pointer;transition:all .15s}.export-trigger:hover{background:#fff;color:var(--primary-color, #4f46e5);border-color:var(--primary-color, #4f46e5)}.export-dropdown{position:absolute;right:0;top:calc(100% + 4px);background:#fff;border:1px solid var(--ngx-chart-grid, #ebedf0);border-radius:8px;box-shadow:0 10px 15px -3px #00000014;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:#343a40;border-radius:4px;font-family:inherit;width:100%;transition:all .12s}.export-dropdown button:hover{background:#4f46e50f;color:var(--primary-color, #4f46e5)}\n"] }]
|
|
1102
1185
|
}], ctorParameters: () => [], propDecorators: { closeExportMenu: [{
|
|
1103
1186
|
type: HostListener,
|
|
1104
1187
|
args: ['document:click']
|
|
@@ -3609,9 +3692,15 @@ class GanttChartComponent {
|
|
|
3609
3692
|
@for (col of sidebarColumns(); track col.header + '-' + $index) { <col [style.width.px]="col.width"/> }
|
|
3610
3693
|
</colgroup>
|
|
3611
3694
|
<tbody>
|
|
3695
|
+
@if (mergedConfig().virtualScrollEnabled) {
|
|
3696
|
+
<tr [style.height.px]="virtualRange().start * mergedConfig().rowHeight">
|
|
3697
|
+
<td [attr.colspan]="sidebarColumns().length" style="padding:0; border:none; height: inherit;"></td>
|
|
3698
|
+
</tr>
|
|
3699
|
+
}
|
|
3612
3700
|
@for (row of renderedRows(); track row.task.id; let i = $index) {
|
|
3701
|
+
@let actualIdx = mergedConfig().virtualScrollEnabled ? virtualRange().start + i : i;
|
|
3613
3702
|
<tr class="k-treelist-row" [class.k-group-header-row]="row.isGroupHeader" [style.height.px]="mergedConfig().rowHeight"
|
|
3614
|
-
[class.k-alt]="mergedConfig().enableAlternateRowColor &&
|
|
3703
|
+
[class.k-alt]="mergedConfig().enableAlternateRowColor && actualIdx % 2 === 1 && !row.isGroupHeader" [class.k-selected]="isTaskSelected(row.task.id)" [class.k-hover]="hoveredTaskId() === row.task.id"
|
|
3615
3704
|
(mouseenter)="hoveredTaskId.set(row.task.id)" (mouseleave)="hoveredTaskId.set(null)" (click)="onRowClick(row.task, $event)">
|
|
3616
3705
|
@if (row.isGroupHeader) {
|
|
3617
3706
|
<td class="k-treelist-cell k-group-cell" [attr.colspan]="sidebarColumns().length">
|
|
@@ -3654,6 +3743,11 @@ class GanttChartComponent {
|
|
|
3654
3743
|
}
|
|
3655
3744
|
</tr>
|
|
3656
3745
|
}
|
|
3746
|
+
@if (mergedConfig().virtualScrollEnabled) {
|
|
3747
|
+
<tr [style.height.px]="(visibleRows().length > virtualRange().end) ? (visibleRows().length - virtualRange().end) * mergedConfig().rowHeight : 0">
|
|
3748
|
+
<td [attr.colspan]="sidebarColumns().length" style="padding:0; border:none; height: inherit;"></td>
|
|
3749
|
+
</tr>
|
|
3750
|
+
}
|
|
3657
3751
|
</tbody>
|
|
3658
3752
|
</table>
|
|
3659
3753
|
</div>
|
|
@@ -3684,8 +3778,9 @@ class GanttChartComponent {
|
|
|
3684
3778
|
<div class="k-timeline-canvas" [style.width.px]="totalWidth()" [style.height.px]="totalHeight()">
|
|
3685
3779
|
<div class="k-gantt-rows">
|
|
3686
3780
|
@for (row of renderedRows(); track row.task.id; let i = $index) {
|
|
3687
|
-
|
|
3688
|
-
|
|
3781
|
+
@let actualIdx = mergedConfig().virtualScrollEnabled ? virtualRange().start + i : i;
|
|
3782
|
+
<div class="k-gantt-row" [class.k-group-row]="row.isGroupHeader" [style.top.px]="actualIdx * mergedConfig().rowHeight" [style.height.px]="mergedConfig().rowHeight"
|
|
3783
|
+
[class.k-alt]="mergedConfig().enableAlternateRowColor && actualIdx % 2 === 1 && !row.isGroupHeader" [class.k-hover]="hoveredTaskId() === row.task.id" [class.k-selected]="isTaskSelected(row.task.id)"
|
|
3689
3784
|
(mouseenter)="hoveredTaskId.set(row.task.id)" (mouseleave)="hoveredTaskId.set(null)"
|
|
3690
3785
|
(dragover)="mergedConfig().tableDraggable ? onTableDragOver($event, row) : null" (drop)="mergedConfig().tableDraggable ? onTableDrop($event, row) : null">
|
|
3691
3786
|
</div>
|
|
@@ -3922,9 +4017,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3922
4017
|
@for (col of sidebarColumns(); track col.header + '-' + $index) { <col [style.width.px]="col.width"/> }
|
|
3923
4018
|
</colgroup>
|
|
3924
4019
|
<tbody>
|
|
4020
|
+
@if (mergedConfig().virtualScrollEnabled) {
|
|
4021
|
+
<tr [style.height.px]="virtualRange().start * mergedConfig().rowHeight">
|
|
4022
|
+
<td [attr.colspan]="sidebarColumns().length" style="padding:0; border:none; height: inherit;"></td>
|
|
4023
|
+
</tr>
|
|
4024
|
+
}
|
|
3925
4025
|
@for (row of renderedRows(); track row.task.id; let i = $index) {
|
|
4026
|
+
@let actualIdx = mergedConfig().virtualScrollEnabled ? virtualRange().start + i : i;
|
|
3926
4027
|
<tr class="k-treelist-row" [class.k-group-header-row]="row.isGroupHeader" [style.height.px]="mergedConfig().rowHeight"
|
|
3927
|
-
[class.k-alt]="mergedConfig().enableAlternateRowColor &&
|
|
4028
|
+
[class.k-alt]="mergedConfig().enableAlternateRowColor && actualIdx % 2 === 1 && !row.isGroupHeader" [class.k-selected]="isTaskSelected(row.task.id)" [class.k-hover]="hoveredTaskId() === row.task.id"
|
|
3928
4029
|
(mouseenter)="hoveredTaskId.set(row.task.id)" (mouseleave)="hoveredTaskId.set(null)" (click)="onRowClick(row.task, $event)">
|
|
3929
4030
|
@if (row.isGroupHeader) {
|
|
3930
4031
|
<td class="k-treelist-cell k-group-cell" [attr.colspan]="sidebarColumns().length">
|
|
@@ -3967,6 +4068,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3967
4068
|
}
|
|
3968
4069
|
</tr>
|
|
3969
4070
|
}
|
|
4071
|
+
@if (mergedConfig().virtualScrollEnabled) {
|
|
4072
|
+
<tr [style.height.px]="(visibleRows().length > virtualRange().end) ? (visibleRows().length - virtualRange().end) * mergedConfig().rowHeight : 0">
|
|
4073
|
+
<td [attr.colspan]="sidebarColumns().length" style="padding:0; border:none; height: inherit;"></td>
|
|
4074
|
+
</tr>
|
|
4075
|
+
}
|
|
3970
4076
|
</tbody>
|
|
3971
4077
|
</table>
|
|
3972
4078
|
</div>
|
|
@@ -3997,8 +4103,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3997
4103
|
<div class="k-timeline-canvas" [style.width.px]="totalWidth()" [style.height.px]="totalHeight()">
|
|
3998
4104
|
<div class="k-gantt-rows">
|
|
3999
4105
|
@for (row of renderedRows(); track row.task.id; let i = $index) {
|
|
4000
|
-
|
|
4001
|
-
|
|
4106
|
+
@let actualIdx = mergedConfig().virtualScrollEnabled ? virtualRange().start + i : i;
|
|
4107
|
+
<div class="k-gantt-row" [class.k-group-row]="row.isGroupHeader" [style.top.px]="actualIdx * mergedConfig().rowHeight" [style.height.px]="mergedConfig().rowHeight"
|
|
4108
|
+
[class.k-alt]="mergedConfig().enableAlternateRowColor && actualIdx % 2 === 1 && !row.isGroupHeader" [class.k-hover]="hoveredTaskId() === row.task.id" [class.k-selected]="isTaskSelected(row.task.id)"
|
|
4002
4109
|
(mouseenter)="hoveredTaskId.set(row.task.id)" (mouseleave)="hoveredTaskId.set(null)"
|
|
4003
4110
|
(dragover)="mergedConfig().tableDraggable ? onTableDragOver($event, row) : null" (drop)="mergedConfig().tableDraggable ? onTableDrop($event, row) : null">
|
|
4004
4111
|
</div>
|