ngx-core-components 0.3.23 → 0.3.25

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.
Files changed (95) hide show
  1. package/ai/ai-form-copilot/ai-form-copilot.component.d.ts +19 -0
  2. package/ai/public-api.d.ts +1 -0
  3. package/charts/adjacency-matrix/adjacency-matrix.component.d.ts +11 -1
  4. package/charts/agentic-cognitive-topology/agentic-cognitive-topology.component.d.ts +125 -0
  5. package/charts/arc-diagram/arc-diagram.component.d.ts +71 -0
  6. package/charts/area-chart/area-chart.component.d.ts +11 -1
  7. package/charts/area-range-chart/area-range-chart.component.d.ts +72 -0
  8. package/charts/area-spline-range-chart/area-spline-range-chart.component.d.ts +72 -0
  9. package/charts/bar-chart/bar-chart.component.d.ts +5 -5
  10. package/charts/bell-curve-chart/bell-curve-chart.component.d.ts +65 -0
  11. package/charts/biplot/biplot.component.d.ts +13 -1
  12. package/charts/box-plot-chart/box-plot-chart.component.d.ts +14 -1
  13. package/charts/bubble-chart/bubble-chart.component.d.ts +5 -4
  14. package/charts/bullet-chart/bullet-chart.component.d.ts +11 -1
  15. package/charts/candlestick-chart/candlestick-chart.component.d.ts +12 -1
  16. package/charts/chord-diagram/chord-diagram.component.d.ts +11 -1
  17. package/charts/column-pyramid-chart/column-pyramid-chart.component.d.ts +60 -0
  18. package/charts/column-range-chart/column-range-chart.component.d.ts +65 -0
  19. package/charts/combo-chart/combo-chart.component.d.ts +11 -1
  20. package/charts/dependency-wheel/dependency-wheel.component.d.ts +11 -1
  21. package/charts/dumbbell-chart/dumbbell-chart.component.d.ts +12 -1
  22. package/charts/embedding-space-projection/embedding-space-projection.component.d.ts +127 -0
  23. package/charts/error-bar/error-bar.component.d.ts +76 -0
  24. package/charts/flags/flags.component.d.ts +80 -0
  25. package/charts/flowmap/flowmap.component.d.ts +71 -0
  26. package/charts/funnel-chart/funnel-chart.component.d.ts +12 -1
  27. package/charts/gauge-chart/gauge-chart.component.d.ts +12 -1
  28. package/charts/geo-heatmap/geo-heatmap.component.d.ts +64 -0
  29. package/charts/heatmap-chart/heatmap-chart.component.d.ts +11 -1
  30. package/charts/heikin-ashi-chart/heikin-ashi-chart.component.d.ts +88 -0
  31. package/charts/histogram/histogram.component.d.ts +58 -0
  32. package/charts/hlc-chart/hlc-chart.component.d.ts +71 -0
  33. package/charts/hollow-candlestick-chart/hollow-candlestick-chart.component.d.ts +80 -0
  34. package/charts/kagi-chart/kagi-chart.component.d.ts +4 -4
  35. package/charts/line-chart/line-chart.component.d.ts +5 -4
  36. package/charts/lollipop-chart/lollipop-chart.component.d.ts +11 -1
  37. package/charts/map-bubble/map-bubble.component.d.ts +56 -0
  38. package/charts/map-choropleth/map-choropleth.component.d.ts +53 -0
  39. package/charts/map-line-point/map-line-point.component.d.ts +66 -0
  40. package/charts/marimekko-chart/marimekko-chart.component.d.ts +11 -1
  41. package/charts/network-graph/network-graph.component.d.ts +72 -0
  42. package/charts/ohlc-chart/ohlc-chart.component.d.ts +74 -0
  43. package/charts/packed-bubble-chart/packed-bubble-chart.component.d.ts +68 -0
  44. package/charts/parallel-coordinates/parallel-coordinates.component.d.ts +60 -0
  45. package/charts/pareto-chart/pareto-chart.component.d.ts +11 -1
  46. package/charts/pictorial-chart/pictorial-chart.component.d.ts +58 -0
  47. package/charts/pie-chart/pie-chart.component.d.ts +5 -5
  48. package/charts/point-figure-chart/point-figure-chart.component.d.ts +5 -5
  49. package/charts/polar-area-chart/polar-area-chart.component.d.ts +5 -5
  50. package/charts/public-api.d.ts +65 -0
  51. package/charts/radar-chart/radar-chart.component.d.ts +12 -1
  52. package/charts/radial-bar-chart/radial-bar-chart.component.d.ts +12 -1
  53. package/charts/renko-chart/renko-chart.component.d.ts +5 -5
  54. package/charts/ridgeline-chart/ridgeline-chart.component.d.ts +12 -1
  55. package/charts/sankey-chart/sankey-chart.component.d.ts +11 -1
  56. package/charts/scatter-plot/scatter-plot.component.d.ts +11 -1
  57. package/charts/shared/chart-export-menu.component.d.ts +26 -0
  58. package/charts/shared/chart-export.service.d.ts +29 -0
  59. package/charts/shared/chart-utils.d.ts +1 -0
  60. package/charts/shared/map-data.d.ts +30 -0
  61. package/charts/slope-chart/slope-chart.component.d.ts +11 -1
  62. package/charts/streamgraph/streamgraph.component.d.ts +71 -0
  63. package/charts/tiled-web-map/tiled-web-map.component.d.ts +71 -0
  64. package/charts/tilemap/tilemap.component.d.ts +63 -0
  65. package/charts/token-streaming-chart/token-streaming-chart.component.d.ts +70 -0
  66. package/charts/transformer-attention-heatmap/transformer-attention-heatmap.component.d.ts +75 -0
  67. package/charts/treegraph/treegraph.component.d.ts +56 -0
  68. package/charts/treemap-chart/treemap-chart.component.d.ts +12 -1
  69. package/charts/variable-pie-chart/variable-pie-chart.component.d.ts +70 -0
  70. package/charts/variwide-chart/variwide-chart.component.d.ts +62 -0
  71. package/charts/vector-plot/vector-plot.component.d.ts +63 -0
  72. package/charts/venn-diagram/venn-diagram.component.d.ts +59 -0
  73. package/charts/violin-plot/violin-plot.component.d.ts +12 -1
  74. package/charts/waterfall-chart/waterfall-chart.component.d.ts +11 -1
  75. package/charts/wind-rose/wind-rose.component.d.ts +4 -4
  76. package/charts/word-cloud/word-cloud.component.d.ts +55 -0
  77. package/fesm2022/ngx-core-components-ai.mjs +222 -2
  78. package/fesm2022/ngx-core-components-ai.mjs.map +1 -1
  79. package/fesm2022/ngx-core-components-charts.mjs +20547 -971
  80. package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
  81. package/fesm2022/ngx-core-components-grid.mjs +78 -0
  82. package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
  83. package/fesm2022/ngx-core-components-inputs.mjs +11 -2
  84. package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
  85. package/fesm2022/ngx-core-components.mjs +2 -2
  86. package/fesm2022/ngx-core-components.mjs.map +1 -1
  87. package/grid/data-grid/data-grid.component.d.ts +1 -0
  88. package/grid/data-grid/grid-export.service.d.ts +4 -0
  89. package/inputs/form-builder/form-designer.component.d.ts +3 -2
  90. package/package.json +1 -1
  91. package/public-api.d.ts +66 -1
  92. package/schematics/collection.json +5 -0
  93. package/schematics/dashboard/index.js +162 -0
  94. package/schematics/dashboard/schema.json +19 -0
  95. package/themes/tailwind-preset.js +63 -0
@@ -95,6 +95,73 @@ class GridExportService {
95
95
  const url = URL.createObjectURL(blob);
96
96
  this.triggerDownload(url, filename);
97
97
  }
98
+ /**
99
+ * Export data as a beautifully styled PDF format via browser print window.
100
+ */
101
+ exportToPdf(data, columns, title = 'Data Grid Export') {
102
+ if (data.length === 0 || typeof window === 'undefined' || typeof document === 'undefined')
103
+ return;
104
+ const printWindow = window.open('', '_blank');
105
+ if (!printWindow) {
106
+ alert('Pop-up blocker prevented printing. Please allow pop-ups for this site.');
107
+ return;
108
+ }
109
+ let tableHtml = '<table><thead><tr>';
110
+ columns.forEach(c => {
111
+ tableHtml += `<th>${c.title}</th>`;
112
+ });
113
+ tableHtml += '</tr></thead><tbody>';
114
+ data.forEach(row => {
115
+ const r = row;
116
+ tableHtml += '<tr>';
117
+ columns.forEach(c => {
118
+ const val = r[c.field] ?? '';
119
+ const valStr = typeof val === 'object' ? JSON.stringify(val) : String(val);
120
+ const alignClass = c.align ? ` class="text-${c.align}"` : '';
121
+ tableHtml += `<td${alignClass}>${valStr}</td>`;
122
+ });
123
+ tableHtml += '</tr>';
124
+ });
125
+ tableHtml += '</tbody></table>';
126
+ const printTemplate = `
127
+ <html>
128
+ <head>
129
+ <title>${title}</title>
130
+ <style>
131
+ body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; padding: 24px; color: #0f172a; }
132
+ .header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #e2e8f0; padding-bottom: 12px; margin-bottom: 24px; }
133
+ .title { font-size: 20px; font-weight: bold; }
134
+ .date { font-size: 12px; color: #64748b; }
135
+ table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 10pt; }
136
+ th { background-color: #f8fafc; color: #1e293b; font-weight: bold; border: 1px solid #cbd5e1; padding: 10px 8px; text-align: left; }
137
+ td { border: 1px solid #cbd5e1; padding: 8px; color: #334155; }
138
+ .text-right { text-align: right; }
139
+ .text-center { text-align: center; }
140
+ .text-left { text-align: left; }
141
+ @media print {
142
+ body { padding: 0; }
143
+ button { display: none; }
144
+ }
145
+ </style>
146
+ </head>
147
+ <body>
148
+ <div class="header">
149
+ <div class="title">${title}</div>
150
+ <div class="date">${new Date().toLocaleString()}</div>
151
+ </div>
152
+ ${tableHtml}
153
+ <script>
154
+ window.onload = function() {
155
+ window.print();
156
+ setTimeout(function() { window.close(); }, 500);
157
+ };
158
+ </script>
159
+ </body>
160
+ </html>
161
+ `;
162
+ printWindow.document.write(printTemplate);
163
+ printWindow.document.close();
164
+ }
98
165
  /**
99
166
  * Create a temporary anchor element, trigger a download, and clean up.
100
167
  */
@@ -1059,6 +1126,9 @@ class DataGridComponent {
1059
1126
  exportToExcel() {
1060
1127
  this.gridExportService.exportToExcel(this.data(), this.orderedColumns());
1061
1128
  }
1129
+ exportToPdf() {
1130
+ this.gridExportService.exportToPdf(this.data(), this.orderedColumns());
1131
+ }
1062
1132
  setFilter(field, value) {
1063
1133
  const nextStates = new Map(this.filterStates());
1064
1134
  if (value) {
@@ -1964,6 +2034,7 @@ class DataGridComponent {
1964
2034
  <button class="grid-action-btn" (click)="exportToJson()" title="Export JSON">JSON</button>
1965
2035
  <button class="grid-action-btn" (click)="exportToCsv()" title="Export CSV">CSV</button>
1966
2036
  <button class="grid-action-btn" (click)="exportToExcel()" title="Export Excel">Excel</button>
2037
+ <button class="grid-action-btn" (click)="exportToPdf()" title="Export PDF">PDF</button>
1967
2038
  </div>
1968
2039
  </div>
1969
2040
 
@@ -2730,6 +2801,9 @@ class DataGridComponent {
2730
2801
  <button class="menu-item" (click)="exportToExcel(); activeContextMenu.set(null)">
2731
2802
  <span class="menu-icon">📈</span> Export to Excel
2732
2803
  </button>
2804
+ <button class="menu-item" (click)="exportToPdf(); activeContextMenu.set(null)">
2805
+ <span class="menu-icon">📕</span> Export to PDF
2806
+ </button>
2733
2807
  </div>
2734
2808
  }
2735
2809
  </div>
@@ -2765,6 +2839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
2765
2839
  <button class="grid-action-btn" (click)="exportToJson()" title="Export JSON">JSON</button>
2766
2840
  <button class="grid-action-btn" (click)="exportToCsv()" title="Export CSV">CSV</button>
2767
2841
  <button class="grid-action-btn" (click)="exportToExcel()" title="Export Excel">Excel</button>
2842
+ <button class="grid-action-btn" (click)="exportToPdf()" title="Export PDF">PDF</button>
2768
2843
  </div>
2769
2844
  </div>
2770
2845
 
@@ -3531,6 +3606,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3531
3606
  <button class="menu-item" (click)="exportToExcel(); activeContextMenu.set(null)">
3532
3607
  <span class="menu-icon">📈</span> Export to Excel
3533
3608
  </button>
3609
+ <button class="menu-item" (click)="exportToPdf(); activeContextMenu.set(null)">
3610
+ <span class="menu-icon">📕</span> Export to PDF
3611
+ </button>
3534
3612
  </div>
3535
3613
  }
3536
3614
  </div>