@eric-emg/symphiq-components 1.2.248 → 1.2.250

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.
@@ -54873,7 +54873,7 @@ class PacingStatusBadgeComponent {
54873
54873
  this.containerSizeClasses = computed(() => {
54874
54874
  const compact = this.isCompact();
54875
54875
  const status = this.status();
54876
- const tiltClass = status === 'ahead' ? 'rotate-1' : status === 'behind' ? '-rotate-1' : '';
54876
+ const tiltClass = status === 'ahead' ? '-rotate-1' : status === 'behind' ? 'rotate-1' : '';
54877
54877
  const baseClasses = 'inline-flex flex-row items-center rounded-xl border-2 overflow-visible transition-transform hover:rotate-0';
54878
54878
  return compact
54879
54879
  ? `${baseClasses} pl-1.5 ${tiltClass}`
@@ -54894,7 +54894,7 @@ class PacingStatusBadgeComponent {
54894
54894
  this.fullBadgeSizeClasses = computed(() => {
54895
54895
  const isCompact = this.isCompact();
54896
54896
  const status = this.status();
54897
- const tiltClass = status === 'ahead' ? 'rotate-1' : status === 'behind' ? '-rotate-1' : '';
54897
+ const tiltClass = status === 'ahead' ? '-rotate-1' : status === 'behind' ? 'rotate-1' : '';
54898
54898
  const baseClasses = `inline-flex items-center gap-1.5 rounded-xl border-2 font-bold tracking-wide shadow-md transition-all hover:rotate-0 ${tiltClass}`;
54899
54899
  if (isCompact) {
54900
54900
  return `${baseClasses} px-2.5 py-1 text-xs`;
@@ -55075,7 +55075,7 @@ class TargetChangeBadgeComponent {
55075
55075
  this.containerSizeClasses = computed(() => {
55076
55076
  const compact = this.isCompact();
55077
55077
  const change = this.percentageChange();
55078
- const tiltClass = change > 0 ? 'rotate-1' : change < 0 ? '-rotate-1' : '';
55078
+ const tiltClass = change > 0 ? '-rotate-1' : change < 0 ? 'rotate-1' : '';
55079
55079
  const baseClasses = 'inline-flex flex-row items-center rounded-xl border-2 overflow-visible transition-transform hover:rotate-0';
55080
55080
  return compact
55081
55081
  ? `${baseClasses} pl-1.5 ${tiltClass}`
@@ -56759,7 +56759,8 @@ class LineChartComponent {
56759
56759
  // Check for explicit keywords
56760
56760
  if (name.includes('last year') ||
56761
56761
  name.includes('prior year') ||
56762
- name.includes('previous year')) {
56762
+ name.includes('previous year') ||
56763
+ name.includes('comparison')) {
56763
56764
  return true;
56764
56765
  }
56765
56766
  // Check for year patterns - extract any 4-digit year and compare to current year
@@ -56770,6 +56771,13 @@ class LineChartComponent {
56770
56771
  }
56771
56772
  return false;
56772
56773
  }
56774
+ isProjectionSeries(seriesData) {
56775
+ if (!seriesData || !seriesData.name) {
56776
+ return false;
56777
+ }
56778
+ const name = seriesData.name.toLowerCase();
56779
+ return name.includes('projection') || name.includes('projected') || name.includes('target');
56780
+ }
56773
56781
  extractMetricName(seriesName) {
56774
56782
  // Extract metric name from series name by removing year patterns
56775
56783
  // e.g., "Purchase Revenue (2025)" -> "Purchase Revenue"
@@ -56968,8 +56976,9 @@ class LineChartComponent {
56968
56976
  seriesColorValue = axisColors[yaxisLabel] || axisColorPalette[index % axisColorPalette.length];
56969
56977
  }
56970
56978
  const seriesColor = color(seriesColorValue);
56971
- // Check if this is a prior year series for YoY charts
56979
+ // Check if this is a prior year or projection series for YoY charts
56972
56980
  const isPriorYear = isYoYChart && this.isPriorYearSeries(seriesData);
56981
+ const isProjection = this.isProjectionSeries(seriesData);
56973
56982
  if (!this.chartElement || !this.root)
56974
56983
  return;
56975
56984
  const series = this.chartElement.series.push(LineSeries.new(this.root, {
@@ -56981,7 +56990,7 @@ class LineChartComponent {
56981
56990
  stroke: seriesColor
56982
56991
  }));
56983
56992
  // Store valueFormat and prior year flag in userData for tooltip formatting
56984
- series.set('userData', { valueFormat: seriesData.valueFormat, isPriorYear });
56993
+ series.set('userData', { valueFormat: seriesData.valueFormat, isPriorYear, isProjection });
56985
56994
  // Disable individual series tooltips - use floating tooltip instead
56986
56995
  series.set('tooltip', undefined);
56987
56996
  // Configure stroke styling based on series type
@@ -56999,6 +57008,16 @@ class LineChartComponent {
56999
57008
  stroke.set('strokeOpacity', 0.5);
57000
57009
  });
57001
57010
  }
57011
+ else if (isProjection) {
57012
+ // Apply dotted line for projection data
57013
+ series.strokes.template.setAll({
57014
+ strokeDasharray: [10, 5],
57015
+ strokeWidth: 3
57016
+ });
57017
+ series.strokes.each((stroke) => {
57018
+ stroke.set('strokeDasharray', [10, 5]);
57019
+ });
57020
+ }
57002
57021
  // Add bullets with larger hit area for better hover detection
57003
57022
  series.bullets.push(() => {
57004
57023
  const bulletConfig = {
@@ -57052,10 +57071,10 @@ class LineChartComponent {
57052
57071
  }
57053
57072
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LineChartComponent, [{
57054
57073
  type: Component,
57055
- args: [{ selector: 'symphiq-line-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
57056
- <div class="chart-container" [class.mini-mode]="!showAxisLabels()">
57057
- <div #chartdiv class="chart" [style.height]="chartHeight()" style="width: 100%;"></div>
57058
- </div>
57074
+ args: [{ selector: 'symphiq-line-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
57075
+ <div class="chart-container" [class.mini-mode]="!showAxisLabels()">
57076
+ <div #chartdiv class="chart" [style.height]="chartHeight()" style="width: 100%;"></div>
57077
+ </div>
57059
57078
  `, styles: [".chart-container{width:100%;padding:1rem}.chart-container.mini-mode{padding:.25rem}\n"] }]
57060
57079
  }], () => [], { chart: [{ type: i0.Input, args: [{ isSignal: true, alias: "chart", required: false }] }], showAxisLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAxisLabels", required: false }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], currencySymbol: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencySymbol", required: false }] }], chartDiv: [{
57061
57080
  type: ViewChild,
@@ -57327,7 +57346,7 @@ class ProgressToTargetChartComponent {
57327
57346
  i0.ɵɵdomElementStart(0, "div", 1);
57328
57347
  i0.ɵɵdomElement(1, "div", 2, 0);
57329
57348
  i0.ɵɵdomElementEnd();
57330
- } }, dependencies: [CommonModule], styles: [".progress-chart-container[_ngcontent-%COMP%]{width:100%;margin-top:24px}"], changeDetection: 0 }); }
57349
+ } }, dependencies: [CommonModule], styles: [".progress-chart-container[_ngcontent-%COMP%]{width:100%;margin-top:50px;overflow:visible}.chart[_ngcontent-%COMP%]{overflow:visible}"], changeDetection: 0 }); }
57331
57350
  }
57332
57351
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProgressToTargetChartComponent, [{
57333
57352
  type: Component,
@@ -57335,12 +57354,12 @@ class ProgressToTargetChartComponent {
57335
57354
  <div class="progress-chart-container">
57336
57355
  <div #chartdiv class="chart" style="width: 100%; height: 160px;"></div>
57337
57356
  </div>
57338
- `, styles: [".progress-chart-container{width:100%;margin-top:24px}\n"] }]
57357
+ `, styles: [".progress-chart-container{width:100%;margin-top:50px;overflow:visible}.chart{overflow:visible}\n"] }]
57339
57358
  }], () => [], { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], chartDiv: [{
57340
57359
  type: ViewChild,
57341
57360
  args: ['chartdiv', { static: true }]
57342
57361
  }] }); })();
57343
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProgressToTargetChartComponent, { className: "ProgressToTargetChartComponent", filePath: "lib/components/revenue-calculator-dashboard/progress-to-target-chart.component.ts", lineNumber: 62 }); })();
57362
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProgressToTargetChartComponent, { className: "ProgressToTargetChartComponent", filePath: "lib/components/revenue-calculator-dashboard/progress-to-target-chart.component.ts", lineNumber: 66 }); })();
57344
57363
 
57345
57364
  const _forTrack0$i = ($index, $item) => $item.metric;
57346
57365
  function MetricReportModalComponent_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
@@ -57484,6 +57503,9 @@ function MetricReportModalComponent_Conditional_0_Conditional_66_Template(rf, ct
57484
57503
  i0.ɵɵelementEnd();
57485
57504
  i0.ɵɵelementStart(7, "p", 55);
57486
57505
  i0.ɵɵtext(8);
57506
+ i0.ɵɵelementEnd();
57507
+ i0.ɵɵelementStart(9, "p", 55);
57508
+ i0.ɵɵtext(10);
57487
57509
  i0.ɵɵelementEnd()();
57488
57510
  } if (rf & 2) {
57489
57511
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -57495,6 +57517,10 @@ function MetricReportModalComponent_Conditional_0_Conditional_66_Template(rf, ct
57495
57517
  i0.ɵɵadvance();
57496
57518
  i0.ɵɵproperty("ngClass", ctx_r1.descriptionClasses());
57497
57519
  i0.ɵɵadvance();
57520
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.chartLegendDescription(), " ");
57521
+ i0.ɵɵadvance();
57522
+ i0.ɵɵproperty("ngClass", ctx_r1.descriptionClasses());
57523
+ i0.ɵɵadvance();
57498
57524
  i0.ɵɵtextInterpolate1(" ", ctx_r1.chartDescriptionSentence1(), " ");
57499
57525
  i0.ɵɵadvance();
57500
57526
  i0.ɵɵproperty("ngClass", ctx_r1.descriptionClasses());
@@ -57583,7 +57609,7 @@ function MetricReportModalComponent_Conditional_0_Template(rf, ctx) { if (rf & 1
57583
57609
  i0.ɵɵconditionalCreate(64, MetricReportModalComponent_Conditional_0_Conditional_64_Template, 6, 10);
57584
57610
  i0.ɵɵelementEnd();
57585
57611
  i0.ɵɵconditionalCreate(65, MetricReportModalComponent_Conditional_0_Conditional_65_Template, 16, 3, "div", 16);
57586
- i0.ɵɵconditionalCreate(66, MetricReportModalComponent_Conditional_0_Conditional_66_Template, 9, 10, "div", 29);
57612
+ i0.ɵɵconditionalCreate(66, MetricReportModalComponent_Conditional_0_Conditional_66_Template, 11, 12, "div", 29);
57587
57613
  i0.ɵɵelementEnd();
57588
57614
  i0.ɵɵelementStart(67, "div", 30)(68, "button", 31);
57589
57615
  i0.ɵɵlistener("click", function MetricReportModalComponent_Conditional_0_Template_button_click_68_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.close()); });
@@ -57851,6 +57877,12 @@ class MetricReportModalComponent {
57851
57877
  status: pacing.status
57852
57878
  };
57853
57879
  }, ...(ngDevMode ? [{ debugName: "progressToTargetData" }] : []));
57880
+ this.chartLegendDescription = computed(() => {
57881
+ const metric = this.metricTitle();
57882
+ const currentYear = this.currentYear();
57883
+ const priorYear = this.priorYear();
57884
+ return `This chart shows the ${metric} performance trend for ${currentYear} (solid line), compared to ${priorYear} (dashed line), with the target projection (dotted line) for the remainder of the year.`;
57885
+ }, ...(ngDevMode ? [{ debugName: "chartLegendDescription" }] : []));
57854
57886
  this.chartDescriptionSentence1 = computed(() => {
57855
57887
  const metricData = this.metricData();
57856
57888
  const metricName = this.metricTitle().toLowerCase();
@@ -57880,6 +57912,7 @@ class MetricReportModalComponent {
57880
57912
  chartType: 'LINE',
57881
57913
  title: 'Pace',
57882
57914
  description: '',
57915
+ lineChartUseCase: LineChartUseCaseEnum.THIS_YEAR_VS_LAST_YEAR,
57883
57916
  lineChartData: {
57884
57917
  series: [
57885
57918
  {
@@ -57899,6 +57932,11 @@ class MetricReportModalComponent {
57899
57932
  };
57900
57933
  }, ...(ngDevMode ? [{ debugName: "pacingChartData" }] : []));
57901
57934
  }
57935
+ formatDateForChart(year, month, day) {
57936
+ const m = String(month + 1).padStart(2, '0');
57937
+ const d = String(day).padStart(2, '0');
57938
+ return `${year}-${m}-${d}`;
57939
+ }
57902
57940
  generateCurrentYearData(pacingResponse, metricEnum) {
57903
57941
  const data = [];
57904
57942
  const currentYear = this.currentYear();
@@ -57910,7 +57948,7 @@ class MetricReportModalComponent {
57910
57948
  if (item.value && item.date) {
57911
57949
  const month = new Date(item.date).getMonth();
57912
57950
  data.push({
57913
- date: new Date(currentYear, month, 15).toISOString(),
57951
+ date: this.formatDateForChart(currentYear, month, 15),
57914
57952
  value: parseFloat(item.value) || 0
57915
57953
  });
57916
57954
  }
@@ -57929,7 +57967,7 @@ class MetricReportModalComponent {
57929
57967
  if (item.value && item.date) {
57930
57968
  const month = new Date(item.date).getMonth();
57931
57969
  data.push({
57932
- date: new Date(currentYear, month, 15).toISOString(),
57970
+ date: this.formatDateForChart(currentYear, month, 15),
57933
57971
  value: parseFloat(item.value) || 0
57934
57972
  });
57935
57973
  }
@@ -57948,7 +57986,7 @@ class MetricReportModalComponent {
57948
57986
  if (item.value && item.date) {
57949
57987
  const month = new Date(item.date).getMonth();
57950
57988
  data.push({
57951
- date: new Date(currentYear, month, 15).toISOString(),
57989
+ date: this.formatDateForChart(currentYear, month, 15),
57952
57990
  value: parseFloat(item.value) || 0
57953
57991
  });
57954
57992
  }
@@ -58432,6 +58470,9 @@ class MetricReportModalComponent {
58432
58470
  />
58433
58471
  </div>
58434
58472
  <p [ngClass]="descriptionClasses()" class="text-sm leading-relaxed mt-4">
58473
+ {{ chartLegendDescription() }}
58474
+ </p>
58475
+ <p [ngClass]="descriptionClasses()" class="text-sm leading-relaxed mt-2">
58435
58476
  {{ chartDescriptionSentence1() }}
58436
58477
  </p>
58437
58478
  <p [ngClass]="descriptionClasses()" class="text-sm leading-relaxed mt-2">
@@ -58457,7 +58498,7 @@ class MetricReportModalComponent {
58457
58498
  `
58458
58499
  }]
58459
58500
  }], null, { viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], metricEnum: [{ type: i0.Input, args: [{ isSignal: true, alias: "metricEnum", required: false }] }], metricData: [{ type: i0.Input, args: [{ isSignal: true, alias: "metricData", required: false }] }], contributingMetrics: [{ type: i0.Input, args: [{ isSignal: true, alias: "contributingMetrics", required: false }] }], pacingMetrics: [{ type: i0.Input, args: [{ isSignal: true, alias: "pacingMetrics", required: false }] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] }); })();
58460
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MetricReportModalComponent, { className: "MetricReportModalComponent", filePath: "lib/components/revenue-calculator-dashboard/metric-report-modal.component.ts", lineNumber: 346 }); })();
58501
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MetricReportModalComponent, { className: "MetricReportModalComponent", filePath: "lib/components/revenue-calculator-dashboard/metric-report-modal.component.ts", lineNumber: 349 }); })();
58461
58502
 
58462
58503
  const _c0$q = ["absoluteInputRef"];
58463
58504
  const _c1$b = ["percentageInputRef"];