@eric-emg/symphiq-components 1.2.188 → 1.2.190

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.
@@ -57267,46 +57267,7 @@ var areaChart_component = /*#__PURE__*/Object.freeze({
57267
57267
  AreaChartComponent: AreaChartComponent
57268
57268
  });
57269
57269
 
57270
- var RelatedMetricType;
57271
- (function (RelatedMetricType) {
57272
- RelatedMetricType["FUNNEL"] = "funnel";
57273
- RelatedMetricType["VOLUME"] = "volume";
57274
- RelatedMetricType["RATE"] = "rate";
57275
- RelatedMetricType["INVERSE"] = "inverse";
57276
- RelatedMetricType["MULTIPLIER"] = "multiplier";
57277
- RelatedMetricType["DERIVED"] = "derived";
57278
- })(RelatedMetricType || (RelatedMetricType = {}));
57279
- const METRIC_TYPE_MAP = {
57280
- [MetricEnum.SCREEN_PAGE_VIEWS]: RelatedMetricType.FUNNEL,
57281
- [MetricEnum.ITEM_VIEW_EVENTS]: RelatedMetricType.FUNNEL,
57282
- [MetricEnum.ADD_TO_CARTS]: RelatedMetricType.FUNNEL,
57283
- [MetricEnum.CHECKOUTS]: RelatedMetricType.FUNNEL,
57284
- [MetricEnum.ECOMMERCE_PURCHASES]: RelatedMetricType.FUNNEL,
57285
- [MetricEnum.PURCHASE_REVENUE]: RelatedMetricType.FUNNEL,
57286
- [MetricEnum.SESSIONS]: RelatedMetricType.VOLUME,
57287
- [MetricEnum.ACTIVE_USERS]: RelatedMetricType.VOLUME,
57288
- [MetricEnum.NEW_USERS]: RelatedMetricType.VOLUME,
57289
- [MetricEnum.BOUNCE_RATE]: RelatedMetricType.INVERSE,
57290
- [MetricEnum.PRODUCT_VIEW_RATE]: RelatedMetricType.RATE,
57291
- [MetricEnum.VIEW_TO_PRODUCT_VIEW_CONVERSION_RATE]: RelatedMetricType.RATE,
57292
- [MetricEnum.ACTIVE_USER_ADD_TO_CART_RATE]: RelatedMetricType.RATE,
57293
- [MetricEnum.ADD_TO_CART_RATE]: RelatedMetricType.RATE,
57294
- [MetricEnum.PRODUCT_VIEW_TO_CART_CONVERSION_RATE]: RelatedMetricType.RATE,
57295
- [MetricEnum.CART_TO_CHECKOUT_CONVERSION_RATE]: RelatedMetricType.RATE,
57296
- [MetricEnum.ACTIVE_USER_CHECKOUT_RATE]: RelatedMetricType.RATE,
57297
- [MetricEnum.PRODUCT_VIEW_CONVERSION_RATE]: RelatedMetricType.RATE,
57298
- [MetricEnum.ADD_TO_CART_CONVERSION_RATE]: RelatedMetricType.RATE,
57299
- [MetricEnum.CHECKOUT_CONVERSION_RATE]: RelatedMetricType.RATE,
57300
- [MetricEnum.ECOMMERCE_CONVERSION_RATE]: RelatedMetricType.RATE,
57301
- [MetricEnum.AVERAGE_ORDER_VALUE]: RelatedMetricType.MULTIPLIER,
57302
- [MetricEnum.REVENUE_PER_PRODUCT_VIEW]: RelatedMetricType.DERIVED,
57303
- [MetricEnum.REVENUE_PER_ADD_TO_CART]: RelatedMetricType.DERIVED,
57304
- [MetricEnum.REVENUE_PER_CHECKOUT]: RelatedMetricType.DERIVED
57305
- };
57306
- function getMetricType(metric) {
57307
- return METRIC_TYPE_MAP[metric] || RelatedMetricType.RATE;
57308
- }
57309
- function calculateMetricTargetsFromRevenue(revenueTarget, priorYearRevenue, funnelMetrics, baselineValues, lockedMetrics = new Map()) {
57270
+ function calculateMetricTargetsFromRevenue(revenueTarget, priorYearRevenue, funnelMetrics, baselineValues) {
57310
57271
  const revenuePercentageIncrease = ((revenueTarget - priorYearRevenue) / priorYearRevenue) * 100;
57311
57272
  const metricCalculations = [];
57312
57273
  const sortedFunnelMetrics = [...funnelMetrics].sort((a, b) => {
@@ -57318,35 +57279,39 @@ function calculateMetricTargetsFromRevenue(revenueTarget, priorYearRevenue, funn
57318
57279
  const bRelated = b.relatedInd ?? 999;
57319
57280
  return aRelated - bRelated;
57320
57281
  });
57321
- const numFunnelStages = new Set(sortedFunnelMetrics.map((fm) => fm.funnelInd)).size;
57322
- const revenueMultiplier = 1 + revenuePercentageIncrease / 100;
57323
- const perStageMultiplier = Math.pow(revenueMultiplier, 1 / numFunnelStages);
57324
- const funnelStagePercentageIncrease = (perStageMultiplier - 1) * 100;
57282
+ const funnelStages = getUniqueFunnelStages(sortedFunnelMetrics);
57283
+ const numFunnelStages = funnelStages.length;
57284
+ const revenueIncreaseFactor = revenueTarget / priorYearRevenue;
57285
+ const perStageFactor = Math.pow(revenueIncreaseFactor, 1 / numFunnelStages);
57286
+ const funnelStageMetrics = new Map();
57287
+ sortedFunnelMetrics.forEach(fm => {
57288
+ if (fm.funnelMetric) {
57289
+ if (!funnelStageMetrics.has(fm.funnelMetric)) {
57290
+ funnelStageMetrics.set(fm.funnelMetric, []);
57291
+ }
57292
+ funnelStageMetrics.get(fm.funnelMetric).push(fm);
57293
+ }
57294
+ });
57295
+ const stagePercentageIncrease = (perStageFactor - 1) * 100;
57325
57296
  sortedFunnelMetrics.forEach((funnelMetric) => {
57326
57297
  const metric = funnelMetric.relatedMetric;
57327
57298
  if (!metric)
57328
57299
  return;
57329
57300
  const currentValue = baselineValues.get(metric) || 0;
57330
57301
  const isFunnelStage = funnelMetric.funnelMetric === metric;
57331
- const metricType = getMetricType(metric);
57332
- const isLocked = lockedMetrics.has(metric);
57333
57302
  let percentageIncrease;
57334
57303
  let targetValue;
57335
- if (isLocked) {
57336
- targetValue = lockedMetrics.get(metric);
57337
- percentageIncrease = currentValue !== 0 ? ((targetValue - currentValue) / currentValue) * 100 : 0;
57304
+ if (metric === MetricEnum.BOUNCE_RATE) {
57305
+ percentageIncrease = -stagePercentageIncrease;
57306
+ targetValue = currentValue * (1 + percentageIncrease / 100);
57338
57307
  }
57339
- else if (metricType === RelatedMetricType.DERIVED) {
57308
+ else if (isDerivedMetric(metric)) {
57340
57309
  percentageIncrease = 0;
57341
57310
  targetValue = currentValue;
57342
57311
  }
57343
- else if (metricType === RelatedMetricType.INVERSE) {
57344
- percentageIncrease = -funnelStagePercentageIncrease;
57345
- targetValue = currentValue * (1 + percentageIncrease / 100);
57346
- }
57347
57312
  else {
57348
- percentageIncrease = funnelStagePercentageIncrease;
57349
- targetValue = currentValue * (1 + percentageIncrease / 100);
57313
+ percentageIncrease = stagePercentageIncrease;
57314
+ targetValue = currentValue * perStageFactor;
57350
57315
  }
57351
57316
  metricCalculations.push({
57352
57317
  metric,
@@ -57355,8 +57320,6 @@ function calculateMetricTargetsFromRevenue(revenueTarget, priorYearRevenue, funn
57355
57320
  targetValue,
57356
57321
  percentageIncrease,
57357
57322
  isFunnelStage,
57358
- metricType,
57359
- isLocked,
57360
57323
  funnelInd: funnelMetric.funnelInd,
57361
57324
  relatedInd: funnelMetric.relatedInd,
57362
57325
  description: funnelMetric.relatedMetricDescription
@@ -57368,34 +57331,24 @@ function calculateMetricTargetsFromRevenue(revenueTarget, priorYearRevenue, funn
57368
57331
  metricCalculations
57369
57332
  };
57370
57333
  }
57371
- function recalculateWithLockedMetrics(revenueTarget, priorYearRevenue, funnelMetrics, baselineValues, lockedMetrics) {
57372
- const numFunnelStages = new Set(funnelMetrics.map((fm) => fm.funnelInd)).size;
57373
- const targetRevenueMultiplier = revenueTarget / priorYearRevenue;
57374
- let lockedContribution = 1;
57375
- let unlockedStageCount = numFunnelStages;
57376
- const lockedByStage = new Map();
57377
- funnelMetrics.forEach((fm) => {
57378
- const metric = fm.relatedMetric;
57379
- if (!metric)
57380
- return;
57381
- const funnelInd = fm.funnelInd ?? 0;
57382
- const isFunnelStage = fm.funnelMetric === metric;
57383
- if (isFunnelStage && lockedMetrics.has(metric)) {
57384
- const currentValue = baselineValues.get(metric) || 1;
57385
- const lockedValue = lockedMetrics.get(metric);
57386
- const multiplier = lockedValue / currentValue;
57387
- if (!lockedByStage.has(funnelInd)) {
57388
- lockedByStage.set(funnelInd, []);
57389
- }
57390
- lockedByStage.get(funnelInd).push({ metric, multiplier });
57391
- lockedContribution *= multiplier;
57334
+ function getUniqueFunnelStages(funnelMetrics) {
57335
+ const stages = [];
57336
+ const seen = new Set();
57337
+ funnelMetrics.forEach(fm => {
57338
+ if (fm.funnelMetric && fm.funnelMetric === fm.relatedMetric && !seen.has(fm.funnelMetric)) {
57339
+ seen.add(fm.funnelMetric);
57340
+ stages.push(fm.funnelMetric);
57392
57341
  }
57393
57342
  });
57394
- unlockedStageCount = numFunnelStages - lockedByStage.size;
57395
- const remainingMultiplier = targetRevenueMultiplier / lockedContribution;
57396
- const perUnlockedStageMultiplier = unlockedStageCount > 0 ? Math.pow(remainingMultiplier, 1 / unlockedStageCount) : 1;
57397
- const unlockedPercentageIncrease = (perUnlockedStageMultiplier - 1) * 100;
57398
- return calculateMetricTargetsFromRevenue(revenueTarget, priorYearRevenue, funnelMetrics, baselineValues, lockedMetrics);
57343
+ return stages;
57344
+ }
57345
+ const DERIVED_METRICS = new Set([
57346
+ MetricEnum.REVENUE_PER_PRODUCT_VIEW,
57347
+ MetricEnum.REVENUE_PER_ADD_TO_CART,
57348
+ MetricEnum.REVENUE_PER_CHECKOUT
57349
+ ]);
57350
+ function isDerivedMetric(metric) {
57351
+ return DERIVED_METRICS.has(metric);
57399
57352
  }
57400
57353
  function generateTargetsFromCalculations(shopId, calculations) {
57401
57354
  const startDate = getCurrentYearStart();
@@ -57424,10 +57377,10 @@ function getFunnelStageMetrics(calculations) {
57424
57377
  return calculations.filter((calc) => calc.isFunnelStage);
57425
57378
  }
57426
57379
 
57427
- function transformUiDataToChartSeries(mainUiData, yoyUiData, metricToExtract) {
57380
+ function transformUiDataToChartSeries(mainUiData, ytdComparisonUiData, metricToExtract) {
57428
57381
  const series = [];
57429
- if (yoyUiData?.convertedDataResults) {
57430
- const priorYearSeries = extractSeriesFromConvertedData(yoyUiData.convertedDataResults, metricToExtract, 'Prior Year');
57382
+ if (ytdComparisonUiData?.convertedDataResults) {
57383
+ const priorYearSeries = extractSeriesFromConvertedData(ytdComparisonUiData.convertedDataResults, metricToExtract, 'Prior Year');
57431
57384
  if (priorYearSeries) {
57432
57385
  series.push(priorYearSeries);
57433
57386
  }
@@ -57576,27 +57529,27 @@ function sumMetricFromUiData(uiData, metricToSum) {
57576
57529
  }
57577
57530
 
57578
57531
  class RevenueCalculatorService {
57579
- calculateTargetsFromRevenue(revenueTarget, yoyUiData, funnelMetrics) {
57580
- const priorYearRevenue = this.extractPriorYearRevenue(yoyUiData);
57581
- const baselineValues = this.extractBaselineValues(yoyUiData, funnelMetrics);
57532
+ calculateTargetsFromRevenue(revenueTarget, mainUiData, funnelMetrics) {
57533
+ const priorYearRevenue = this.extractPriorYearRevenue(mainUiData);
57534
+ const baselineValues = this.extractBaselineValues(mainUiData, funnelMetrics);
57582
57535
  return calculateMetricTargetsFromRevenue(revenueTarget, priorYearRevenue, funnelMetrics, baselineValues);
57583
57536
  }
57584
- calculateTargetsFromPercentage(percentageIncrease, yoyUiData, funnelMetrics) {
57585
- const priorYearRevenue = this.extractPriorYearRevenue(yoyUiData);
57537
+ calculateTargetsFromPercentage(percentageIncrease, mainUiData, funnelMetrics) {
57538
+ const priorYearRevenue = this.extractPriorYearRevenue(mainUiData);
57586
57539
  const revenueTarget = priorYearRevenue * (1 + percentageIncrease / 100);
57587
- return this.calculateTargetsFromRevenue(revenueTarget, yoyUiData, funnelMetrics);
57540
+ return this.calculateTargetsFromRevenue(revenueTarget, mainUiData, funnelMetrics);
57588
57541
  }
57589
- extractPriorYearRevenue(yoyUiData) {
57590
- return sumMetricFromUiData(yoyUiData, MetricEnum.PURCHASE_REVENUE);
57542
+ extractPriorYearRevenue(mainUiData) {
57543
+ return sumMetricFromUiData(mainUiData, MetricEnum.PURCHASE_REVENUE);
57591
57544
  }
57592
- extractBaselineValues(yoyUiData, funnelMetrics) {
57545
+ extractBaselineValues(mainUiData, funnelMetrics) {
57593
57546
  const baselineValues = new Map();
57594
- if (!yoyUiData) {
57547
+ if (!mainUiData) {
57595
57548
  return baselineValues;
57596
57549
  }
57597
57550
  funnelMetrics.forEach(fm => {
57598
57551
  if (fm.relatedMetric) {
57599
- const value = sumMetricFromUiData(yoyUiData, fm.relatedMetric);
57552
+ const value = sumMetricFromUiData(mainUiData, fm.relatedMetric);
57600
57553
  baselineValues.set(fm.relatedMetric, value);
57601
57554
  }
57602
57555
  });
@@ -57795,7 +57748,6 @@ class InitialTargetSettingComponent {
57795
57748
  this.viewMode = input(ViewModeEnum.LIGHT, ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
57796
57749
  this.funnelMetrics = input([], ...(ngDevMode ? [{ debugName: "funnelMetrics" }] : []));
57797
57750
  this.mainUiData = input(undefined, ...(ngDevMode ? [{ debugName: "mainUiData" }] : []));
57798
- this.yoyUiData = input(undefined, ...(ngDevMode ? [{ debugName: "yoyUiData" }] : []));
57799
57751
  this.trendUiData = input(undefined, ...(ngDevMode ? [{ debugName: "trendUiData" }] : []));
57800
57752
  this.shopId = input(undefined, ...(ngDevMode ? [{ debugName: "shopId" }] : []));
57801
57753
  this.pacingMetrics = input(undefined, ...(ngDevMode ? [{ debugName: "pacingMetrics" }] : []));
@@ -57806,7 +57758,7 @@ class InitialTargetSettingComponent {
57806
57758
  this.percentageInput = signal(0, ...(ngDevMode ? [{ debugName: "percentageInput" }] : []));
57807
57759
  this.isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : []));
57808
57760
  this.priorYearRevenue = computed(() => {
57809
- return sumMetricFromUiData(this.yoyUiData(), MetricEnum.PURCHASE_REVENUE);
57761
+ return sumMetricFromUiData(this.mainUiData(), MetricEnum.PURCHASE_REVENUE);
57810
57762
  }, ...(ngDevMode ? [{ debugName: "priorYearRevenue" }] : []));
57811
57763
  this.currentPaceProjection = computed(() => {
57812
57764
  const pacingData = this.pacingMetrics();
@@ -57847,13 +57799,13 @@ class InitialTargetSettingComponent {
57847
57799
  if (revenue <= 0)
57848
57800
  return [];
57849
57801
  const mode = this.inputMode();
57850
- const yoyData = this.yoyUiData();
57802
+ const mainData = this.mainUiData();
57851
57803
  const metrics = this.funnelMetrics();
57852
57804
  if (mode === 'absolute') {
57853
- return this.revenueCalcService.calculateTargetsFromRevenue(revenue, yoyData, metrics).metricCalculations;
57805
+ return this.revenueCalcService.calculateTargetsFromRevenue(revenue, mainData, metrics).metricCalculations;
57854
57806
  }
57855
57807
  else {
57856
- return this.revenueCalcService.calculateTargetsFromPercentage(this.percentageInput(), yoyData, metrics).metricCalculations;
57808
+ return this.revenueCalcService.calculateTargetsFromPercentage(this.percentageInput(), mainData, metrics).metricCalculations;
57857
57809
  }
57858
57810
  }, ...(ngDevMode ? [{ debugName: "metricCalculations" }] : []));
57859
57811
  this.isValid = computed(() => {
@@ -58035,7 +57987,7 @@ class InitialTargetSettingComponent {
58035
57987
  } if (rf & 2) {
58036
57988
  let _t;
58037
57989
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.absoluteInputRef = _t.first);
58038
- } }, inputs: { viewMode: [1, "viewMode"], funnelMetrics: [1, "funnelMetrics"], mainUiData: [1, "mainUiData"], yoyUiData: [1, "yoyUiData"], trendUiData: [1, "trendUiData"], shopId: [1, "shopId"], pacingMetrics: [1, "pacingMetrics"], dataResults: [1, "dataResults"] }, outputs: { targetsCreated: "targetsCreated" }, decls: 29, vars: 21, consts: [["absoluteInputRef", ""], [1, "space-y-8", "pb-32"], [1, "rounded-2xl", "border", "shadow-lg", "p-8", 3, "ngClass"], [1, "text-2xl", "font-bold", "mb-6", 3, "ngClass"], [1, "grid", "lg:grid-cols-2", "gap-8"], [1, "space-y-6"], [1, "block", "text-sm", "font-semibold", "mb-2", 3, "ngClass"], [1, "space-y-1", "mb-4"], [1, "text-xs", 3, "ngClass"], [1, "flex", "gap-2", "mb-4"], [1, "flex-1", "py-2", "px-4", "rounded-lg", "text-sm", "font-semibold", "transition-all", 3, "click", "ngClass"], [1, "relative"], [1, "p-6", "rounded-xl", "border-2", 3, "ngClass"], [1, "text-sm", "font-semibold", "mb-3", 3, "ngClass"], [1, "rounded-xl", "border", "p-4", 3, "ngClass"], [3, "chart", "showAxisLabels", "viewMode", "currencySymbol", "height"], [1, "h-64", "flex", "items-center", "justify-center"], [3, "submitClick", "viewMode", "isValid", "isSubmitting", "validationMessage", "buttonText"], [1, "absolute", "left-4", "top-1/2", "-translate-y-1/2", "text-xl", "font-bold", 3, "ngClass"], ["type", "number", "placeholder", "0", "min", "0", "step", "1000", 1, "w-full", "pl-10", "pr-4", "py-4", "rounded-xl", "text-2xl", "font-bold", "border-2", "transition-all", 3, "ngModelChange", "ngModel", "ngClass"], ["type", "number", "placeholder", "0", "min", "0", "max", "1000", "step", "0.1", 1, "w-full", "pr-10", "pl-4", "py-4", "rounded-xl", "text-2xl", "font-bold", "border-2", "transition-all", 3, "ngModelChange", "ngModel", "ngClass"], [1, "absolute", "right-4", "top-1/2", "-translate-y-1/2", "text-xl", "font-bold", 3, "ngClass"], [1, "space-y-4"], [1, "text-xs", "font-medium", "uppercase", "tracking-wider", "mb-1", 3, "ngClass"], [1, "text-3xl", "font-bold", 3, "ngClass"], [1, "grid", "grid-cols-2", "gap-4", "pt-4", 3, "ngClass"], [1, "text-xl", "font-bold", 3, "ngClass"], [1, "text-sm", 3, "ngClass"], [1, "mb-6"], [1, "text-2xl", "font-bold", "mb-2", 3, "ngClass"], [3, "viewMode", "calculations", "pacingMetrics"]], template: function InitialTargetSettingComponent_Template(rf, ctx) { if (rf & 1) {
57990
+ } }, inputs: { viewMode: [1, "viewMode"], funnelMetrics: [1, "funnelMetrics"], mainUiData: [1, "mainUiData"], trendUiData: [1, "trendUiData"], shopId: [1, "shopId"], pacingMetrics: [1, "pacingMetrics"], dataResults: [1, "dataResults"] }, outputs: { targetsCreated: "targetsCreated" }, decls: 29, vars: 21, consts: [["absoluteInputRef", ""], [1, "space-y-8", "pb-32"], [1, "rounded-2xl", "border", "shadow-lg", "p-8", 3, "ngClass"], [1, "text-2xl", "font-bold", "mb-6", 3, "ngClass"], [1, "grid", "lg:grid-cols-2", "gap-8"], [1, "space-y-6"], [1, "block", "text-sm", "font-semibold", "mb-2", 3, "ngClass"], [1, "space-y-1", "mb-4"], [1, "text-xs", 3, "ngClass"], [1, "flex", "gap-2", "mb-4"], [1, "flex-1", "py-2", "px-4", "rounded-lg", "text-sm", "font-semibold", "transition-all", 3, "click", "ngClass"], [1, "relative"], [1, "p-6", "rounded-xl", "border-2", 3, "ngClass"], [1, "text-sm", "font-semibold", "mb-3", 3, "ngClass"], [1, "rounded-xl", "border", "p-4", 3, "ngClass"], [3, "chart", "showAxisLabels", "viewMode", "currencySymbol", "height"], [1, "h-64", "flex", "items-center", "justify-center"], [3, "submitClick", "viewMode", "isValid", "isSubmitting", "validationMessage", "buttonText"], [1, "absolute", "left-4", "top-1/2", "-translate-y-1/2", "text-xl", "font-bold", 3, "ngClass"], ["type", "number", "placeholder", "0", "min", "0", "step", "1000", 1, "w-full", "pl-10", "pr-4", "py-4", "rounded-xl", "text-2xl", "font-bold", "border-2", "transition-all", 3, "ngModelChange", "ngModel", "ngClass"], ["type", "number", "placeholder", "0", "min", "0", "max", "1000", "step", "0.1", 1, "w-full", "pr-10", "pl-4", "py-4", "rounded-xl", "text-2xl", "font-bold", "border-2", "transition-all", 3, "ngModelChange", "ngModel", "ngClass"], [1, "absolute", "right-4", "top-1/2", "-translate-y-1/2", "text-xl", "font-bold", 3, "ngClass"], [1, "space-y-4"], [1, "text-xs", "font-medium", "uppercase", "tracking-wider", "mb-1", 3, "ngClass"], [1, "text-3xl", "font-bold", 3, "ngClass"], [1, "grid", "grid-cols-2", "gap-4", "pt-4", 3, "ngClass"], [1, "text-xl", "font-bold", 3, "ngClass"], [1, "text-sm", 3, "ngClass"], [1, "mb-6"], [1, "text-2xl", "font-bold", "mb-2", 3, "ngClass"], [3, "viewMode", "calculations", "pacingMetrics"]], template: function InitialTargetSettingComponent_Template(rf, ctx) { if (rf & 1) {
58039
57991
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "h2", 3);
58040
57992
  i0.ɵɵtext(3, " Calculate Your Revenue Target ");
58041
57993
  i0.ɵɵelementEnd();
@@ -58305,7 +58257,7 @@ class InitialTargetSettingComponent {
58305
58257
  }], null, { absoluteInputRef: [{
58306
58258
  type: ViewChild,
58307
58259
  args: ['absoluteInputRef']
58308
- }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], funnelMetrics: [{ type: i0.Input, args: [{ isSignal: true, alias: "funnelMetrics", required: false }] }], mainUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "mainUiData", required: false }] }], yoyUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "yoyUiData", required: false }] }], trendUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "trendUiData", required: false }] }], shopId: [{ type: i0.Input, args: [{ isSignal: true, alias: "shopId", required: false }] }], pacingMetrics: [{ type: i0.Input, args: [{ isSignal: true, alias: "pacingMetrics", required: false }] }], dataResults: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataResults", required: false }] }], targetsCreated: [{ type: i0.Output, args: ["targetsCreated"] }] }); })();
58260
+ }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], funnelMetrics: [{ type: i0.Input, args: [{ isSignal: true, alias: "funnelMetrics", required: false }] }], mainUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "mainUiData", required: false }] }], trendUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "trendUiData", required: false }] }], shopId: [{ type: i0.Input, args: [{ isSignal: true, alias: "shopId", required: false }] }], pacingMetrics: [{ type: i0.Input, args: [{ isSignal: true, alias: "pacingMetrics", required: false }] }], dataResults: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataResults", required: false }] }], targetsCreated: [{ type: i0.Output, args: ["targetsCreated"] }] }); })();
58309
58261
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InitialTargetSettingComponent, { className: "InitialTargetSettingComponent", filePath: "lib/components/revenue-calculator-dashboard/initial-target-setting.component.ts", lineNumber: 217 }); })();
58310
58262
 
58311
58263
  function IndeterminateSpinnerComponent_For_5_Template(rf, ctx) { if (rf & 1) {
@@ -58486,7 +58438,7 @@ function SymphiqRevenueCalculatorDashboardComponent_Conditional_25_Template(rf,
58486
58438
  const ctx_r0 = i0.ɵɵnextContext();
58487
58439
  i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("dataLoadStatus", ctx_r0.dataLoadStatus() ?? ctx_r0.ShopDataLoadStatusEnum.NOT_LOADED)("hasTargets", false);
58488
58440
  i0.ɵɵadvance(2);
58489
- i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("funnelMetrics", ctx_r0.funnelMetrics() ?? i0.ɵɵpureFunction0(11, _c0$q))("mainUiData", ctx_r0.mainUiData())("yoyUiData", ctx_r0.yoyUiData())("trendUiData", ctx_r0.trendUiData())("shopId", ctx_r0.shopId())("pacingMetrics", ctx_r0.pacingResponse())("dataResults", ctx_r0.dataResults());
58441
+ i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("funnelMetrics", ctx_r0.funnelMetrics() ?? i0.ɵɵpureFunction0(10, _c0$q))("mainUiData", ctx_r0.mainUiData())("trendUiData", ctx_r0.trendUiData())("shopId", ctx_r0.shopId())("pacingMetrics", ctx_r0.pacingResponse())("dataResults", ctx_r0.dataResults());
58490
58442
  } }
58491
58443
  function SymphiqRevenueCalculatorDashboardComponent_Conditional_26_Template(rf, ctx) { if (rf & 1) {
58492
58444
  i0.ɵɵelement(0, "symphiq-revenue-calculator-welcome-banner", 14);
@@ -58522,7 +58474,7 @@ class SymphiqRevenueCalculatorDashboardComponent {
58522
58474
  this.targets = input([], ...(ngDevMode ? [{ debugName: "targets" }] : []));
58523
58475
  this.funnelMetrics = input([], ...(ngDevMode ? [{ debugName: "funnelMetrics" }] : []));
58524
58476
  this.mainUiData = input(undefined, ...(ngDevMode ? [{ debugName: "mainUiData" }] : []));
58525
- this.yoyUiData = input(undefined, ...(ngDevMode ? [{ debugName: "yoyUiData" }] : []));
58477
+ this.ytdComparisonUiData = input(undefined, ...(ngDevMode ? [{ debugName: "ytdComparisonUiData" }] : []));
58526
58478
  this.trendUiData = input(undefined, ...(ngDevMode ? [{ debugName: "trendUiData" }] : []));
58527
58479
  this.pacingResponse = input(undefined, ...(ngDevMode ? [{ debugName: "pacingResponse" }] : []));
58528
58480
  this.dataResults = input([], ...(ngDevMode ? [{ debugName: "dataResults" }] : []));
@@ -58658,7 +58610,7 @@ class SymphiqRevenueCalculatorDashboardComponent {
58658
58610
  static { this.ɵfac = function SymphiqRevenueCalculatorDashboardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SymphiqRevenueCalculatorDashboardComponent)(); }; }
58659
58611
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SymphiqRevenueCalculatorDashboardComponent, selectors: [["symphiq-revenue-calculator-dashboard"]], hostBindings: function SymphiqRevenueCalculatorDashboardComponent_HostBindings(rf, ctx) { if (rf & 1) {
58660
58612
  i0.ɵɵlistener("scroll", function SymphiqRevenueCalculatorDashboardComponent_scroll_HostBindingHandler($event) { return ctx.onWindowScroll($event); }, i0.ɵɵresolveWindow);
58661
- } }, inputs: { viewMode: [1, "viewMode"], isLoading: [1, "isLoading"], dataLoadStatus: [1, "dataLoadStatus"], targets: [1, "targets"], funnelMetrics: [1, "funnelMetrics"], mainUiData: [1, "mainUiData"], yoyUiData: [1, "yoyUiData"], trendUiData: [1, "trendUiData"], pacingResponse: [1, "pacingResponse"], dataResults: [1, "dataResults"], shopId: [1, "shopId"], embedded: [1, "embedded"], scrollEvent: [1, "scrollEvent"], scrollElement: [1, "scrollElement"], forDemo: [1, "forDemo"], maxAccessibleStepId: [1, "maxAccessibleStepId"] }, outputs: { stepClick: "stepClick", nextStepClick: "nextStepClick", targetsCreated: "targetsCreated" }, decls: 27, vars: 42, consts: [[3, "ngClass"], [1, "h-full", "transition-all", "duration-200", "ease-out", 3, "ngClass"], [1, "animated-bubbles", 2, "position", "fixed", "top", "0", "left", "0", "right", "0", "bottom", "0", "width", "100vw", "height", "100vh", "z-index", "1", "pointer-events", "none"], [1, "relative", "z-[51]"], [1, "sticky", "top-0", "z-50", 3, "ngClass"], [1, "transition-all", "duration-300", "ease-in-out", "overflow-hidden"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-8"], [1, "flex", "items-center", "justify-between"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-3"], [1, "flex-1", "min-w-0", "mr-4"], [3, "stepClick", "nextStepClick", "viewMode", "currentStepId", "showNextStepAction", "forDemo", "maxAccessibleStepId"], [1, "relative"], [1, "flex", "items-center", "justify-center", "min-h-[400px]"], ["size", "large", 3, "viewMode"], [3, "viewMode", "dataLoadStatus", "hasTargets"], [1, "mt-8", "rounded-2xl", "border", "shadow-lg", "overflow-hidden", 3, "ngClass"], [1, "px-8", "py-12", 3, "ngClass"], [1, "flex", "flex-col", "items-center", "text-center", "space-y-6"], [1, "space-y-2"], [1, "text-xl", "font-bold", 3, "ngClass"], [1, "text-sm", "max-w-md", 3, "ngClass"], [1, "mt-8"], [3, "targetsCreated", "viewMode", "funnelMetrics", "mainUiData", "yoyUiData", "trendUiData", "shopId", "pacingMetrics", "dataResults"], [1, "mt-8", "rounded-2xl", "border-2", "border-dashed", "p-12", 3, "ngClass"], [1, "text-center", "space-y-4"], [1, "flex", "justify-center"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-16", "h-16", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"], [1, "text-2xl", "font-bold", 3, "ngClass"], [1, "text-base", "max-w-2xl", "mx-auto", 3, "ngClass"]], template: function SymphiqRevenueCalculatorDashboardComponent_Template(rf, ctx) { if (rf & 1) {
58613
+ } }, inputs: { viewMode: [1, "viewMode"], isLoading: [1, "isLoading"], dataLoadStatus: [1, "dataLoadStatus"], targets: [1, "targets"], funnelMetrics: [1, "funnelMetrics"], mainUiData: [1, "mainUiData"], ytdComparisonUiData: [1, "ytdComparisonUiData"], trendUiData: [1, "trendUiData"], pacingResponse: [1, "pacingResponse"], dataResults: [1, "dataResults"], shopId: [1, "shopId"], embedded: [1, "embedded"], scrollEvent: [1, "scrollEvent"], scrollElement: [1, "scrollElement"], forDemo: [1, "forDemo"], maxAccessibleStepId: [1, "maxAccessibleStepId"] }, outputs: { stepClick: "stepClick", nextStepClick: "nextStepClick", targetsCreated: "targetsCreated" }, decls: 27, vars: 42, consts: [[3, "ngClass"], [1, "h-full", "transition-all", "duration-200", "ease-out", 3, "ngClass"], [1, "animated-bubbles", 2, "position", "fixed", "top", "0", "left", "0", "right", "0", "bottom", "0", "width", "100vw", "height", "100vh", "z-index", "1", "pointer-events", "none"], [1, "relative", "z-[51]"], [1, "sticky", "top-0", "z-50", 3, "ngClass"], [1, "transition-all", "duration-300", "ease-in-out", "overflow-hidden"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-8"], [1, "flex", "items-center", "justify-between"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-3"], [1, "flex-1", "min-w-0", "mr-4"], [3, "stepClick", "nextStepClick", "viewMode", "currentStepId", "showNextStepAction", "forDemo", "maxAccessibleStepId"], [1, "relative"], [1, "flex", "items-center", "justify-center", "min-h-[400px]"], ["size", "large", 3, "viewMode"], [3, "viewMode", "dataLoadStatus", "hasTargets"], [1, "mt-8", "rounded-2xl", "border", "shadow-lg", "overflow-hidden", 3, "ngClass"], [1, "px-8", "py-12", 3, "ngClass"], [1, "flex", "flex-col", "items-center", "text-center", "space-y-6"], [1, "space-y-2"], [1, "text-xl", "font-bold", 3, "ngClass"], [1, "text-sm", "max-w-md", 3, "ngClass"], [1, "mt-8"], [3, "targetsCreated", "viewMode", "funnelMetrics", "mainUiData", "trendUiData", "shopId", "pacingMetrics", "dataResults"], [1, "mt-8", "rounded-2xl", "border-2", "border-dashed", "p-12", 3, "ngClass"], [1, "text-center", "space-y-4"], [1, "flex", "justify-center"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-16", "h-16", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"], [1, "text-2xl", "font-bold", 3, "ngClass"], [1, "text-base", "max-w-2xl", "mx-auto", 3, "ngClass"]], template: function SymphiqRevenueCalculatorDashboardComponent_Template(rf, ctx) { if (rf & 1) {
58662
58614
  i0.ɵɵelementStart(0, "div", 0)(1, "div");
58663
58615
  i0.ɵɵelement(2, "div", 1);
58664
58616
  i0.ɵɵelementEnd();
@@ -58676,7 +58628,7 @@ class SymphiqRevenueCalculatorDashboardComponent {
58676
58628
  i0.ɵɵlistener("stepClick", function SymphiqRevenueCalculatorDashboardComponent_Template_symphiq_journey_progress_indicator_stepClick_20_listener($event) { return ctx.stepClick.emit($event); })("nextStepClick", function SymphiqRevenueCalculatorDashboardComponent_Template_symphiq_journey_progress_indicator_nextStepClick_20_listener() { return ctx.nextStepClick.emit(); });
58677
58629
  i0.ɵɵelementEnd();
58678
58630
  i0.ɵɵelementStart(21, "main", 11)(22, "div", 6);
58679
- i0.ɵɵconditionalCreate(23, SymphiqRevenueCalculatorDashboardComponent_Conditional_23_Template, 2, 1, "div", 12)(24, SymphiqRevenueCalculatorDashboardComponent_Conditional_24_Template, 10, 8)(25, SymphiqRevenueCalculatorDashboardComponent_Conditional_25_Template, 3, 12)(26, SymphiqRevenueCalculatorDashboardComponent_Conditional_26_Template, 10, 7);
58631
+ i0.ɵɵconditionalCreate(23, SymphiqRevenueCalculatorDashboardComponent_Conditional_23_Template, 2, 1, "div", 12)(24, SymphiqRevenueCalculatorDashboardComponent_Conditional_24_Template, 10, 8)(25, SymphiqRevenueCalculatorDashboardComponent_Conditional_25_Template, 3, 11)(26, SymphiqRevenueCalculatorDashboardComponent_Conditional_26_Template, 10, 7);
58680
58632
  i0.ɵɵelementEnd()()()();
58681
58633
  } if (rf & 2) {
58682
58634
  i0.ɵɵproperty("ngClass", ctx.getContainerClasses());
@@ -58725,188 +58677,187 @@ class SymphiqRevenueCalculatorDashboardComponent {
58725
58677
  IndeterminateSpinnerComponent
58726
58678
  ],
58727
58679
  changeDetection: ChangeDetectionStrategy.OnPush,
58728
- template: `
58729
- <div [ngClass]="getContainerClasses()">
58730
- <!-- Scroll Progress Bar -->
58731
- <div
58732
- [class]="embedded() ? 'sticky top-0 left-0 right-0 h-1 z-[60] bg-slate-200/30' : 'fixed top-0 left-0 right-0 h-1 z-[60] bg-slate-200/30'">
58733
- <div
58734
- [style.width.%]="scrollProgress()"
58735
- [ngClass]="isLightMode() ? 'bg-gradient-to-r from-blue-500 to-purple-500' : 'bg-gradient-to-r from-blue-400 to-purple-400'"
58736
- class="h-full transition-all duration-200 ease-out">
58737
- </div>
58738
- </div>
58739
-
58740
- <!-- Animated Background Bubbles -->
58741
- <div class="animated-bubbles" [class.light-mode]="isLightMode()"
58742
- style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none;"></div>
58743
-
58744
- <div class="relative z-[51]">
58745
- <header [ngClass]="getHeaderClasses()" class="sticky top-0 z-50">
58746
- <!-- Expanded Header -->
58747
- <div
58748
- class="transition-all duration-300 ease-in-out overflow-hidden"
58749
- [class.max-h-0]="isScrolled()"
58750
- [class.opacity-0]="isScrolled()"
58751
- [class.max-h-96]="!isScrolled()"
58752
- [class.opacity-100]="!isScrolled()">
58753
- <div
58754
- class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"
58755
- [class.pointer-events-none]="isScrolled()"
58756
- [class.pointer-events-auto]="!isScrolled()">
58757
- <div class="flex items-center justify-between">
58758
- <div>
58759
- <h1 [ngClass]="getMainTitleClasses()">
58760
- Revenue Calculator
58761
- </h1>
58762
- <p [ngClass]="getSubtitleClasses()">
58763
- Set Your Revenue Target and See Required Metric Improvements
58764
- </p>
58765
- </div>
58766
- </div>
58767
- </div>
58768
- </div>
58769
-
58770
- <!-- Condensed Header -->
58771
- <div
58772
- class="transition-all duration-300 ease-in-out overflow-hidden"
58773
- [class.max-h-0]="!isScrolled()"
58774
- [class.opacity-0]="!isScrolled()"
58775
- [class.max-h-20]="isScrolled()"
58776
- [class.opacity-100]="isScrolled()">
58777
- <div
58778
- class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3"
58779
- [class.pointer-events-none]="!isScrolled()"
58780
- [class.pointer-events-auto]="isScrolled()">
58781
- <div class="flex items-center justify-between">
58782
- <div class="flex-1 min-w-0 mr-4">
58783
- <h1 [ngClass]="isLightMode() ? 'text-xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent truncate' : 'text-xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent truncate'">
58784
- Revenue Calculator
58785
- </h1>
58786
- </div>
58787
- </div>
58788
- </div>
58789
- </div>
58790
- </header>
58791
-
58792
- <!-- Journey Progress Indicator -->
58793
- <symphiq-journey-progress-indicator
58794
- [viewMode]="viewMode()"
58795
- [currentStepId]="JourneyStepIdEnum.REVENUE_CALCULATOR"
58796
- [showNextStepAction]="hasCurrentYearTargets()"
58797
- [forDemo]="forDemo()"
58798
- [maxAccessibleStepId]="maxAccessibleStepId()"
58799
- (stepClick)="stepClick.emit($event)"
58800
- (nextStepClick)="nextStepClick.emit()"
58801
- />
58802
-
58803
- <main class="relative">
58804
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
58805
-
58806
- <!-- State 1: Pure Loading (isLoading = true) -->
58807
- @if (isLoading()) {
58808
- <div class="flex items-center justify-center min-h-[400px]">
58809
- <symphiq-indeterminate-spinner
58810
- [viewMode]="viewMode()"
58811
- size="large"
58812
- />
58813
- </div>
58814
- }
58815
-
58816
- <!-- State 2: Data Loading Message (isLoading = false && dataLoadStatus !== FULLY_LOADED) -->
58817
- @else if (dataLoadStatus() !== ShopDataLoadStatusEnum.FULLY_LOADED) {
58818
- <symphiq-revenue-calculator-welcome-banner
58819
- [viewMode]="viewMode()"
58820
- [dataLoadStatus]="dataLoadStatus() ?? ShopDataLoadStatusEnum.NOT_LOADED"
58821
- [hasTargets]="false"
58822
- />
58823
-
58824
- <!-- Loading Message Card -->
58825
- <div [ngClass]="loadingMessageContainerClasses()"
58826
- class="mt-8 rounded-2xl border shadow-lg overflow-hidden">
58827
- <div [ngClass]="loadingMessageContentClasses()" class="px-8 py-12">
58828
- <div class="flex flex-col items-center text-center space-y-6">
58829
- <symphiq-indeterminate-spinner
58830
- [viewMode]="viewMode()"
58831
- size="large"
58832
- />
58833
- <div class="space-y-2">
58834
- <h3 [ngClass]="loadingTitleClasses()" class="text-xl font-bold">
58835
- Downloading Your Google Analytics 4 Data
58836
- </h3>
58837
- <p [ngClass]="loadingTextClasses()" class="text-sm max-w-md">
58838
- Symphiq is fetching your historical metrics to establish baseline performance. This may take a
58839
- moment as we gather your funnel data.
58840
- </p>
58841
- </div>
58842
- </div>
58843
- </div>
58844
- </div>
58845
- }
58846
-
58847
- <!-- State 3a: Initial Target Setting (isLoading = false && dataLoadStatus === FULLY_LOADED && !hasCurrentYearTargets) -->
58848
- @else if (!hasCurrentYearTargets()) {
58849
- <symphiq-revenue-calculator-welcome-banner
58850
- [viewMode]="viewMode()"
58851
- [dataLoadStatus]="dataLoadStatus() ?? ShopDataLoadStatusEnum.NOT_LOADED"
58852
- [hasTargets]="false"
58853
- />
58854
-
58855
- <div class="mt-8">
58856
- <symphiq-initial-target-setting
58857
- [viewMode]="viewMode()"
58858
- [funnelMetrics]="funnelMetrics() ?? []"
58859
- [mainUiData]="mainUiData()"
58860
- [yoyUiData]="yoyUiData()"
58861
- [trendUiData]="trendUiData()"
58862
- [shopId]="shopId()"
58863
- [pacingMetrics]="pacingResponse()"
58864
- [dataResults]="dataResults()"
58865
- (targetsCreated)="targetsCreated.emit($event)"
58866
- />
58867
- </div>
58868
- }
58869
-
58870
- <!-- State 3b: Final Dashboard (isLoading = false && dataLoadStatus === FULLY_LOADED && hasCurrentYearTargets) -->
58871
- @else {
58872
- <symphiq-revenue-calculator-welcome-banner
58873
- [viewMode]="viewMode()"
58874
- [dataLoadStatus]="dataLoadStatus() ?? ShopDataLoadStatusEnum.NOT_LOADED"
58875
- [hasTargets]="true"
58876
- />
58877
-
58878
- <!-- Placeholder for Revenue Calculator Content -->
58879
- <div [ngClass]="placeholderContainerClasses()" class="mt-8 rounded-2xl border-2 border-dashed p-12">
58880
- <div class="text-center space-y-4">
58881
- <div class="flex justify-center">
58882
- <svg [ngClass]="placeholderIconClasses()" class="w-16 h-16" fill="none" stroke="currentColor"
58883
- viewBox="0 0 24 24">
58884
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
58885
- d="M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path>
58886
- </svg>
58887
- </div>
58888
- <h3 [ngClass]="placeholderTitleClasses()" class="text-2xl font-bold">
58889
- Revenue Calculator Dashboard
58890
- </h3>
58891
- <p [ngClass]="placeholderTextClasses()" class="text-base max-w-2xl mx-auto">
58892
- Your targets are set! The full revenue calculator dashboard with pacing and insights will be
58893
- displayed here.
58894
- </p>
58895
- </div>
58896
- </div>
58897
- }
58898
-
58899
- </div>
58900
- </main>
58901
- </div>
58902
- </div>
58680
+ template: `
58681
+ <div [ngClass]="getContainerClasses()">
58682
+ <!-- Scroll Progress Bar -->
58683
+ <div
58684
+ [class]="embedded() ? 'sticky top-0 left-0 right-0 h-1 z-[60] bg-slate-200/30' : 'fixed top-0 left-0 right-0 h-1 z-[60] bg-slate-200/30'">
58685
+ <div
58686
+ [style.width.%]="scrollProgress()"
58687
+ [ngClass]="isLightMode() ? 'bg-gradient-to-r from-blue-500 to-purple-500' : 'bg-gradient-to-r from-blue-400 to-purple-400'"
58688
+ class="h-full transition-all duration-200 ease-out">
58689
+ </div>
58690
+ </div>
58691
+
58692
+ <!-- Animated Background Bubbles -->
58693
+ <div class="animated-bubbles" [class.light-mode]="isLightMode()"
58694
+ style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none;"></div>
58695
+
58696
+ <div class="relative z-[51]">
58697
+ <header [ngClass]="getHeaderClasses()" class="sticky top-0 z-50">
58698
+ <!-- Expanded Header -->
58699
+ <div
58700
+ class="transition-all duration-300 ease-in-out overflow-hidden"
58701
+ [class.max-h-0]="isScrolled()"
58702
+ [class.opacity-0]="isScrolled()"
58703
+ [class.max-h-96]="!isScrolled()"
58704
+ [class.opacity-100]="!isScrolled()">
58705
+ <div
58706
+ class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"
58707
+ [class.pointer-events-none]="isScrolled()"
58708
+ [class.pointer-events-auto]="!isScrolled()">
58709
+ <div class="flex items-center justify-between">
58710
+ <div>
58711
+ <h1 [ngClass]="getMainTitleClasses()">
58712
+ Revenue Calculator
58713
+ </h1>
58714
+ <p [ngClass]="getSubtitleClasses()">
58715
+ Set Your Revenue Target and See Required Metric Improvements
58716
+ </p>
58717
+ </div>
58718
+ </div>
58719
+ </div>
58720
+ </div>
58721
+
58722
+ <!-- Condensed Header -->
58723
+ <div
58724
+ class="transition-all duration-300 ease-in-out overflow-hidden"
58725
+ [class.max-h-0]="!isScrolled()"
58726
+ [class.opacity-0]="!isScrolled()"
58727
+ [class.max-h-20]="isScrolled()"
58728
+ [class.opacity-100]="isScrolled()">
58729
+ <div
58730
+ class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3"
58731
+ [class.pointer-events-none]="!isScrolled()"
58732
+ [class.pointer-events-auto]="isScrolled()">
58733
+ <div class="flex items-center justify-between">
58734
+ <div class="flex-1 min-w-0 mr-4">
58735
+ <h1 [ngClass]="isLightMode() ? 'text-xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent truncate' : 'text-xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent truncate'">
58736
+ Revenue Calculator
58737
+ </h1>
58738
+ </div>
58739
+ </div>
58740
+ </div>
58741
+ </div>
58742
+ </header>
58743
+
58744
+ <!-- Journey Progress Indicator -->
58745
+ <symphiq-journey-progress-indicator
58746
+ [viewMode]="viewMode()"
58747
+ [currentStepId]="JourneyStepIdEnum.REVENUE_CALCULATOR"
58748
+ [showNextStepAction]="hasCurrentYearTargets()"
58749
+ [forDemo]="forDemo()"
58750
+ [maxAccessibleStepId]="maxAccessibleStepId()"
58751
+ (stepClick)="stepClick.emit($event)"
58752
+ (nextStepClick)="nextStepClick.emit()"
58753
+ />
58754
+
58755
+ <main class="relative">
58756
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
58757
+
58758
+ <!-- State 1: Pure Loading (isLoading = true) -->
58759
+ @if (isLoading()) {
58760
+ <div class="flex items-center justify-center min-h-[400px]">
58761
+ <symphiq-indeterminate-spinner
58762
+ [viewMode]="viewMode()"
58763
+ size="large"
58764
+ />
58765
+ </div>
58766
+ }
58767
+
58768
+ <!-- State 2: Data Loading Message (isLoading = false && dataLoadStatus !== FULLY_LOADED) -->
58769
+ @else if (dataLoadStatus() !== ShopDataLoadStatusEnum.FULLY_LOADED) {
58770
+ <symphiq-revenue-calculator-welcome-banner
58771
+ [viewMode]="viewMode()"
58772
+ [dataLoadStatus]="dataLoadStatus() ?? ShopDataLoadStatusEnum.NOT_LOADED"
58773
+ [hasTargets]="false"
58774
+ />
58775
+
58776
+ <!-- Loading Message Card -->
58777
+ <div [ngClass]="loadingMessageContainerClasses()"
58778
+ class="mt-8 rounded-2xl border shadow-lg overflow-hidden">
58779
+ <div [ngClass]="loadingMessageContentClasses()" class="px-8 py-12">
58780
+ <div class="flex flex-col items-center text-center space-y-6">
58781
+ <symphiq-indeterminate-spinner
58782
+ [viewMode]="viewMode()"
58783
+ size="large"
58784
+ />
58785
+ <div class="space-y-2">
58786
+ <h3 [ngClass]="loadingTitleClasses()" class="text-xl font-bold">
58787
+ Downloading Your Google Analytics 4 Data
58788
+ </h3>
58789
+ <p [ngClass]="loadingTextClasses()" class="text-sm max-w-md">
58790
+ Symphiq is fetching your historical metrics to establish baseline performance. This may take a
58791
+ moment as we gather your funnel data.
58792
+ </p>
58793
+ </div>
58794
+ </div>
58795
+ </div>
58796
+ </div>
58797
+ }
58798
+
58799
+ <!-- State 3a: Initial Target Setting (isLoading = false && dataLoadStatus === FULLY_LOADED && !hasCurrentYearTargets) -->
58800
+ @else if (!hasCurrentYearTargets()) {
58801
+ <symphiq-revenue-calculator-welcome-banner
58802
+ [viewMode]="viewMode()"
58803
+ [dataLoadStatus]="dataLoadStatus() ?? ShopDataLoadStatusEnum.NOT_LOADED"
58804
+ [hasTargets]="false"
58805
+ />
58806
+
58807
+ <div class="mt-8">
58808
+ <symphiq-initial-target-setting
58809
+ [viewMode]="viewMode()"
58810
+ [funnelMetrics]="funnelMetrics() ?? []"
58811
+ [mainUiData]="mainUiData()"
58812
+ [trendUiData]="trendUiData()"
58813
+ [shopId]="shopId()"
58814
+ [pacingMetrics]="pacingResponse()"
58815
+ [dataResults]="dataResults()"
58816
+ (targetsCreated)="targetsCreated.emit($event)"
58817
+ />
58818
+ </div>
58819
+ }
58820
+
58821
+ <!-- State 3b: Final Dashboard (isLoading = false && dataLoadStatus === FULLY_LOADED && hasCurrentYearTargets) -->
58822
+ @else {
58823
+ <symphiq-revenue-calculator-welcome-banner
58824
+ [viewMode]="viewMode()"
58825
+ [dataLoadStatus]="dataLoadStatus() ?? ShopDataLoadStatusEnum.NOT_LOADED"
58826
+ [hasTargets]="true"
58827
+ />
58828
+
58829
+ <!-- Placeholder for Revenue Calculator Content -->
58830
+ <div [ngClass]="placeholderContainerClasses()" class="mt-8 rounded-2xl border-2 border-dashed p-12">
58831
+ <div class="text-center space-y-4">
58832
+ <div class="flex justify-center">
58833
+ <svg [ngClass]="placeholderIconClasses()" class="w-16 h-16" fill="none" stroke="currentColor"
58834
+ viewBox="0 0 24 24">
58835
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
58836
+ d="M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path>
58837
+ </svg>
58838
+ </div>
58839
+ <h3 [ngClass]="placeholderTitleClasses()" class="text-2xl font-bold">
58840
+ Revenue Calculator Dashboard
58841
+ </h3>
58842
+ <p [ngClass]="placeholderTextClasses()" class="text-base max-w-2xl mx-auto">
58843
+ Your targets are set! The full revenue calculator dashboard with pacing and insights will be
58844
+ displayed here.
58845
+ </p>
58846
+ </div>
58847
+ </div>
58848
+ }
58849
+
58850
+ </div>
58851
+ </main>
58852
+ </div>
58853
+ </div>
58903
58854
  `
58904
58855
  }]
58905
- }], () => [], { viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dataLoadStatus: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataLoadStatus", required: false }] }], targets: [{ type: i0.Input, args: [{ isSignal: true, alias: "targets", required: false }] }], funnelMetrics: [{ type: i0.Input, args: [{ isSignal: true, alias: "funnelMetrics", required: false }] }], mainUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "mainUiData", required: false }] }], yoyUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "yoyUiData", required: false }] }], trendUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "trendUiData", required: false }] }], pacingResponse: [{ type: i0.Input, args: [{ isSignal: true, alias: "pacingResponse", required: false }] }], dataResults: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataResults", required: false }] }], shopId: [{ type: i0.Input, args: [{ isSignal: true, alias: "shopId", required: false }] }], embedded: [{ type: i0.Input, args: [{ isSignal: true, alias: "embedded", required: false }] }], scrollEvent: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollEvent", required: false }] }], scrollElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollElement", required: false }] }], forDemo: [{ type: i0.Input, args: [{ isSignal: true, alias: "forDemo", required: false }] }], maxAccessibleStepId: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxAccessibleStepId", required: false }] }], stepClick: [{ type: i0.Output, args: ["stepClick"] }], nextStepClick: [{ type: i0.Output, args: ["nextStepClick"] }], targetsCreated: [{ type: i0.Output, args: ["targetsCreated"] }], onWindowScroll: [{
58856
+ }], () => [], { viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dataLoadStatus: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataLoadStatus", required: false }] }], targets: [{ type: i0.Input, args: [{ isSignal: true, alias: "targets", required: false }] }], funnelMetrics: [{ type: i0.Input, args: [{ isSignal: true, alias: "funnelMetrics", required: false }] }], mainUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "mainUiData", required: false }] }], ytdComparisonUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "ytdComparisonUiData", required: false }] }], trendUiData: [{ type: i0.Input, args: [{ isSignal: true, alias: "trendUiData", required: false }] }], pacingResponse: [{ type: i0.Input, args: [{ isSignal: true, alias: "pacingResponse", required: false }] }], dataResults: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataResults", required: false }] }], shopId: [{ type: i0.Input, args: [{ isSignal: true, alias: "shopId", required: false }] }], embedded: [{ type: i0.Input, args: [{ isSignal: true, alias: "embedded", required: false }] }], scrollEvent: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollEvent", required: false }] }], scrollElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollElement", required: false }] }], forDemo: [{ type: i0.Input, args: [{ isSignal: true, alias: "forDemo", required: false }] }], maxAccessibleStepId: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxAccessibleStepId", required: false }] }], stepClick: [{ type: i0.Output, args: ["stepClick"] }], nextStepClick: [{ type: i0.Output, args: ["nextStepClick"] }], targetsCreated: [{ type: i0.Output, args: ["targetsCreated"] }], onWindowScroll: [{
58906
58857
  type: HostListener,
58907
58858
  args: ['window:scroll', ['$event']]
58908
58859
  }] }); })();
58909
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SymphiqRevenueCalculatorDashboardComponent, { className: "SymphiqRevenueCalculatorDashboardComponent", filePath: "lib/components/revenue-calculator-dashboard/symphiq-revenue-calculator-dashboard.component.ts", lineNumber: 219 }); })();
58860
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SymphiqRevenueCalculatorDashboardComponent, { className: "SymphiqRevenueCalculatorDashboardComponent", filePath: "lib/components/revenue-calculator-dashboard/symphiq-revenue-calculator-dashboard.component.ts", lineNumber: 218 }); })();
58910
58861
 
58911
58862
  function HierarchyDisplayComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
58912
58863
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 1);
@@ -108765,5 +108716,5 @@ const PROFILE_ANALYSIS_METRIC_SCREEN_PAGE_VIEWS = ({
108765
108716
  * Generated bundle index. Do not edit.
108766
108717
  */
108767
108718
 
108768
- export { AreaChartComponent, BUSINESS_PROFILE, BarChartComponent, BreakdownSectionComponent, BusinessAnalysisModalComponent, BusinessProfileSearchService, ChartCardComponent, ChartContainerComponent, ChartThemeService, CircularProgressComponent, CompetitivePositioningSummaryComponent, CompetitorAnalysisCardComponent, ConfettiService, ConfidenceLevelCardComponent, ContentGenerationProgressComponent, ContentGenerationProgressWithConfettiComponent, CrossDashboardRelationshipsService, FUNNEL_ANALYSIS, FloatingBackButtonComponent, FloatingTocComponent, FocusAreaDetailCardComponent, FocusAreaExecutiveSummaryComponent, FocusAreaQuestionComponent, FocusAreaToolsModalComponent, FunnelOrderService, GradeBadgeComponent, HeaderScrollService, HierarchyDisplayComponent, HorizontalBarComponent, IconService, IndeterminateSpinnerComponent, InsightCardComponent, JourneyProgressIndicatorComponent, JourneyStepIdEnum, LineChartComponent, METRIC_TYPE_MAP, MetricCardComponent, MetricExecutiveSummaryComponent, MetricFormatterService, MetricListItemComponent, MetricWelcomeBannerComponent, MobileBottomNavComponent, MobileFABComponent, ModalComponent, ModalService, NapkinVisualPlaceholderComponent, NavigationStateService, OpportunityHighlightBannerComponent, OverallAssessmentComponent, PROFILE_ANALYSIS_FOCUS_AREA_AFFILIATE, PROFILE_ANALYSIS_METRIC_SCREEN_PAGE_VIEWS, PROFILE_ANALYSIS_SHOP, PieChartComponent, ProfileItemCardComponent, ProfileSectionComponent, ProfileSubsectionComponent, RelatedContentSidebarComponent, RelatedMetricType, RevenueCalculatorWelcomeBannerComponent, ScrollDepthService, ScrollProgressBarComponent, SearchButtonComponent, SearchModalComponent, SectionDividerComponent, SectionNavigationComponent, ShadowElevationDirective, ShopPlatformEnum, ShopWelcomeBannerComponent, SkeletonBarComponent, SkeletonCardBaseComponent, SkeletonCircleComponent, SkeletonCompetitorCardComponent, SkeletonCustomerSegmentCardComponent, SkeletonFocusAreaCardComponent, SkeletonGenericCardComponent, SkeletonLoaderComponent, SkeletonPriceTierCardComponent, SkeletonProductCategoryCardComponent, SkeletonRegionCardComponent, SkeletonSeasonCardComponent, SymphiqBusinessAnalysisDashboardComponent, SymphiqConnectGaDashboardComponent, SymphiqCreateAccountDashboardComponent, SymphiqFunnelAnalysisDashboardComponent, SymphiqFunnelAnalysisPreviewComponent, SymphiqIconComponent, SymphiqProfileAnalysisDashboardComponent, SymphiqRevenueCalculatorDashboardComponent, SymphiqWelcomeDashboardComponent, TooltipContainerComponent, TooltipDataService, TooltipDirective, TooltipService, ViewModeService, ViewportAnimationDirective, VisualizationContainerComponent, calculateMetricTargetsFromRevenue, generateTargetsFromCalculations, getBadgeLabelClasses, getButtonClasses, getCategoryBadgeClasses, getCategoryColor, getCompetitiveBadgeClasses, getContainerClasses, getFooterClasses, getFunnelStageMetrics, getGradeBadgeClasses, getHeaderClasses, getInsightsBadgeClasses, getInsightsCardClasses, getMetricLabelClasses, getMetricMiniCardClasses, getMetricType, getMetricValueClasses, getNarrativeTextClasses, getRevenueCardClasses, getRevenueIconClasses, getStatusBadgeClasses, getStatusDotClasses, getStatusIconClasses, getStatusSummaryClasses, getSubtitleClasses, getTitleClasses, getTrendClasses, getTrendIconClasses, getTrendValueClasses, groupMetricsByFunnelStage, isLightMode, recalculateWithLockedMetrics };
108719
+ export { AreaChartComponent, BUSINESS_PROFILE, BarChartComponent, BreakdownSectionComponent, BusinessAnalysisModalComponent, BusinessProfileSearchService, ChartCardComponent, ChartContainerComponent, ChartThemeService, CircularProgressComponent, CompetitivePositioningSummaryComponent, CompetitorAnalysisCardComponent, ConfettiService, ConfidenceLevelCardComponent, ContentGenerationProgressComponent, ContentGenerationProgressWithConfettiComponent, CrossDashboardRelationshipsService, FUNNEL_ANALYSIS, FloatingBackButtonComponent, FloatingTocComponent, FocusAreaDetailCardComponent, FocusAreaExecutiveSummaryComponent, FocusAreaQuestionComponent, FocusAreaToolsModalComponent, FunnelOrderService, GradeBadgeComponent, HeaderScrollService, HierarchyDisplayComponent, HorizontalBarComponent, IconService, IndeterminateSpinnerComponent, InsightCardComponent, JourneyProgressIndicatorComponent, JourneyStepIdEnum, LineChartComponent, MetricCardComponent, MetricExecutiveSummaryComponent, MetricFormatterService, MetricListItemComponent, MetricWelcomeBannerComponent, MobileBottomNavComponent, MobileFABComponent, ModalComponent, ModalService, NapkinVisualPlaceholderComponent, NavigationStateService, OpportunityHighlightBannerComponent, OverallAssessmentComponent, PROFILE_ANALYSIS_FOCUS_AREA_AFFILIATE, PROFILE_ANALYSIS_METRIC_SCREEN_PAGE_VIEWS, PROFILE_ANALYSIS_SHOP, PieChartComponent, ProfileItemCardComponent, ProfileSectionComponent, ProfileSubsectionComponent, RelatedContentSidebarComponent, RevenueCalculatorWelcomeBannerComponent, ScrollDepthService, ScrollProgressBarComponent, SearchButtonComponent, SearchModalComponent, SectionDividerComponent, SectionNavigationComponent, ShadowElevationDirective, ShopPlatformEnum, ShopWelcomeBannerComponent, SkeletonBarComponent, SkeletonCardBaseComponent, SkeletonCircleComponent, SkeletonCompetitorCardComponent, SkeletonCustomerSegmentCardComponent, SkeletonFocusAreaCardComponent, SkeletonGenericCardComponent, SkeletonLoaderComponent, SkeletonPriceTierCardComponent, SkeletonProductCategoryCardComponent, SkeletonRegionCardComponent, SkeletonSeasonCardComponent, SymphiqBusinessAnalysisDashboardComponent, SymphiqConnectGaDashboardComponent, SymphiqCreateAccountDashboardComponent, SymphiqFunnelAnalysisDashboardComponent, SymphiqFunnelAnalysisPreviewComponent, SymphiqIconComponent, SymphiqProfileAnalysisDashboardComponent, SymphiqRevenueCalculatorDashboardComponent, SymphiqWelcomeDashboardComponent, TooltipContainerComponent, TooltipDataService, TooltipDirective, TooltipService, ViewModeService, ViewportAnimationDirective, VisualizationContainerComponent, getBadgeLabelClasses, getButtonClasses, getCategoryBadgeClasses, getCategoryColor, getCompetitiveBadgeClasses, getContainerClasses, getFooterClasses, getGradeBadgeClasses, getHeaderClasses, getInsightsBadgeClasses, getInsightsCardClasses, getMetricLabelClasses, getMetricMiniCardClasses, getMetricValueClasses, getNarrativeTextClasses, getRevenueCardClasses, getRevenueIconClasses, getStatusBadgeClasses, getStatusDotClasses, getStatusIconClasses, getStatusSummaryClasses, getSubtitleClasses, getTitleClasses, getTrendClasses, getTrendIconClasses, getTrendValueClasses, isLightMode };
108769
108720
  //# sourceMappingURL=symphiq-components.mjs.map