@eric-emg/symphiq-components 1.2.258 → 1.2.260

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.
@@ -59184,9 +59184,9 @@ function InitialTargetSettingComponent_Conditional_36_Template(rf, ctx) { if (rf
59184
59184
  i0.ɵɵclassProp("lg:text-3xl", ctx_r0.calculationState() !== "results" || ctx_r0.detailsExpanded());
59185
59185
  i0.ɵɵproperty("ngClass", ctx_r0.calculatedValueClasses());
59186
59186
  i0.ɵɵadvance();
59187
- i0.ɵɵconditional(ctx_r0.calculationState() === "results" && ctx_r0.targets() === undefined && ctx_r0.submittedAbsoluteInput() !== null ? 7 : 8);
59187
+ i0.ɵɵconditional(ctx_r0.calculationState() === "results" && !ctx_r0.hasExistingTargets() && ctx_r0.submittedAbsoluteInput() !== null ? 7 : 8);
59188
59188
  i0.ɵɵadvance(2);
59189
- i0.ɵɵconditional(ctx_r0.calculationState() === "results" && ctx_r0.targets() === undefined ? 9 : -1);
59189
+ i0.ɵɵconditional(ctx_r0.calculationState() === "results" && !ctx_r0.hasExistingTargets() ? 9 : -1);
59190
59190
  i0.ɵɵadvance();
59191
59191
  i0.ɵɵclassProp("details-collapse-expanded", ctx_r0.calculationState() !== "results" || ctx_r0.detailsExpanded());
59192
59192
  i0.ɵɵadvance(4);
@@ -59274,10 +59274,19 @@ function InitialTargetSettingComponent_Conditional_40_Template(rf, ctx) { if (rf
59274
59274
  i0.ɵɵadvance(2);
59275
59275
  i0.ɵɵproperty("ngClass", ctx_r0.sectionDescriptionClasses());
59276
59276
  i0.ɵɵadvance();
59277
- i0.ɵɵconditional(ctx_r0.targets() === undefined && ctx_r0.submittedAbsoluteInput() !== null ? 5 : 6);
59277
+ i0.ɵɵconditional(!ctx_r0.hasExistingTargets() && ctx_r0.submittedAbsoluteInput() !== null ? 5 : 6);
59278
59278
  i0.ɵɵadvance(2);
59279
59279
  i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("calculations", ctx_r0.displayedMetricCalculations())("pacingMetrics", ctx_r0.pacingMetrics());
59280
59280
  } }
59281
+ function InitialTargetSettingComponent_Conditional_41_Template(rf, ctx) { if (rf & 1) {
59282
+ const _r10 = i0.ɵɵgetCurrentView();
59283
+ i0.ɵɵelementStart(0, "symphiq-sticky-submit-bar", 69);
59284
+ i0.ɵɵlistener("submitClick", function InitialTargetSettingComponent_Conditional_41_Template_symphiq_sticky_submit_bar_submitClick_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.handleSubmitClick()); })("cancelClick", function InitialTargetSettingComponent_Conditional_41_Template_symphiq_sticky_submit_bar_cancelClick_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.handleCancel()); });
59285
+ i0.ɵɵelementEnd();
59286
+ } if (rf & 2) {
59287
+ const ctx_r0 = i0.ɵɵnextContext();
59288
+ i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("isValid", ctx_r0.isValid())("isSubmitting", ctx_r0.isCalculating())("validationMessage", ctx_r0.validationMessage())("buttonText", ctx_r0.submitButtonText())("showCancelButton", ctx_r0.calculationState() === "input" && ctx_r0.hasStoredResponse());
59289
+ } }
59281
59290
  class InitialTargetSettingComponent {
59282
59291
  constructor() {
59283
59292
  this.viewMode = input(ViewModeEnum.LIGHT, ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
@@ -59320,6 +59329,10 @@ class InitialTargetSettingComponent {
59320
59329
  this.animatedGapAmount = signal(0, ...(ngDevMode ? [{ debugName: "animatedGapAmount" }] : []));
59321
59330
  this.animatedGapPercentage = signal(0, ...(ngDevMode ? [{ debugName: "animatedGapPercentage" }] : []));
59322
59331
  this.animationFrameId = null;
59332
+ this.hasExistingTargets = computed(() => {
59333
+ const targets = this.targets();
59334
+ return targets !== undefined && targets.length > 0;
59335
+ }, ...(ngDevMode ? [{ debugName: "hasExistingTargets" }] : []));
59323
59336
  this.priorYearRevenue = computed(() => {
59324
59337
  return sumMetricFromUiData(this.mainUiData(), MetricEnum.PURCHASE_REVENUE, 'priorYear');
59325
59338
  }, ...(ngDevMode ? [{ debugName: "priorYearRevenue" }] : []));
@@ -59363,6 +59376,10 @@ class InitialTargetSettingComponent {
59363
59376
  return this.calculatedRevenue() > this.priorYearRevenue();
59364
59377
  }, ...(ngDevMode ? [{ debugName: "isTargetValid" }] : []));
59365
59378
  this.displayedMetricCalculations = computed(() => {
59379
+ const targets = this.targets();
59380
+ if (targets && targets.length > 0) {
59381
+ return this.buildCalculationsFromTargets(targets);
59382
+ }
59366
59383
  const response = this.storedResponse();
59367
59384
  if (!response) {
59368
59385
  return [];
@@ -59409,6 +59426,13 @@ class InitialTargetSettingComponent {
59409
59426
  return results;
59410
59427
  }, ...(ngDevMode ? [{ debugName: "displayedMetricCalculations" }] : []));
59411
59428
  this.displayedTargetRevenue = computed(() => {
59429
+ const targets = this.targets();
59430
+ if (targets && targets.length > 0) {
59431
+ const revenueTarget = targets.find(t => t.metric === MetricEnum.PURCHASE_REVENUE);
59432
+ if (revenueTarget && revenueTarget.amount !== undefined) {
59433
+ return revenueTarget.amount;
59434
+ }
59435
+ }
59412
59436
  if (this.calculationState() !== 'results') {
59413
59437
  return this.calculatedRevenue();
59414
59438
  }
@@ -59542,6 +59566,47 @@ class InitialTargetSettingComponent {
59542
59566
  };
59543
59567
  this.animationFrameId = requestAnimationFrame(animate);
59544
59568
  }
59569
+ buildCalculationsFromTargets(targets) {
59570
+ const results = [];
59571
+ const funnelMetrics = this.funnelMetrics();
59572
+ for (const target of targets) {
59573
+ const metric = target.metric;
59574
+ if (!metric)
59575
+ continue;
59576
+ const targetValue = target.amount ?? 0;
59577
+ const currentValue = sumMetricFromUiData(this.mainUiData(), metric, 'priorYear');
59578
+ const percentageIncrease = currentValue > 0 ? ((targetValue - currentValue) / currentValue) * 100 : 0;
59579
+ const funnelMetricMatch = funnelMetrics.find(fm => fm.funnelMetric === metric && fm.funnelMetric === fm.relatedMetric);
59580
+ const relatedMetricMatch = funnelMetrics.find(fm => fm.relatedMetric === metric && fm.funnelMetric !== fm.relatedMetric);
59581
+ if (funnelMetricMatch) {
59582
+ results.push({
59583
+ metric,
59584
+ funnelMetric: metric,
59585
+ currentValue,
59586
+ targetValue,
59587
+ percentageIncrease,
59588
+ isFunnelStage: true,
59589
+ funnelInd: funnelMetricMatch.funnelInd,
59590
+ relatedInd: 0,
59591
+ description: funnelMetricMatch.funnelMetricDescription
59592
+ });
59593
+ }
59594
+ else if (relatedMetricMatch) {
59595
+ results.push({
59596
+ metric,
59597
+ funnelMetric: relatedMetricMatch.funnelMetric,
59598
+ currentValue,
59599
+ targetValue,
59600
+ percentageIncrease,
59601
+ isFunnelStage: false,
59602
+ funnelInd: relatedMetricMatch.funnelInd,
59603
+ relatedInd: relatedMetricMatch.relatedInd,
59604
+ description: relatedMetricMatch.relatedMetricDescription
59605
+ });
59606
+ }
59607
+ }
59608
+ return results;
59609
+ }
59545
59610
  parseMetricValue(value) {
59546
59611
  if (!value)
59547
59612
  return { targetValue: 0, percentageIncrease: 0 };
@@ -59845,7 +59910,7 @@ class InitialTargetSettingComponent {
59845
59910
  let _t;
59846
59911
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.absoluteInputRef = _t.first);
59847
59912
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.percentageInputRef = _t.first);
59848
- } }, inputs: { viewMode: [1, "viewMode"], funnelMetrics: [1, "funnelMetrics"], mainUiData: [1, "mainUiData"], trendUiData: [1, "trendUiData"], shopId: [1, "shopId"], pacingMetrics: [1, "pacingMetrics"], dataResults: [1, "dataResults"], reverseCalculationResponse: [1, "reverseCalculationResponse"], targets: [1, "targets"] }, outputs: { targetsCreated: "targetsCreated", calculateRevenueRequest: "calculateRevenueRequest" }, decls: 43, vars: 51, consts: [["absoluteInputRef", ""], ["percentageInputRef", ""], [1, "space-y-8", "pb-32"], [1, "rounded-2xl", "border", "shadow-lg", "p-8", 3, "click", "ngClass"], [1, "flex", "items-center", "justify-between", "mb-6"], [1, "text-2xl", "font-bold", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-6", "h-6", "chevron-rotate", 3, "chevron-rotate-expanded", "ngClass"], [1, "flex", "flex-col", "gap-4"], [1, "grid", "lg:grid-cols-2", "gap-4"], [1, "p-6", "rounded-xl", "border-2", 3, "click", "ngClass"], [1, "flex", "flex-wrap", "gap-4", "place-content-between"], [1, "flex", "items-center", "gap-2"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"], [1, "text-xs", "font-medium", "uppercase", "tracking-wider", 3, "ngClass"], [1, "text-lg", "font-bold", 3, "ngClass"], [1, "form-area-collapse"], [1, "form-area-content"], [1, "space-y-6"], [1, "chart-in-column"], [1, "chart-in-column-content"], [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"], [1, "calculated-card-enter", "order-first", "lg:order-last"], [1, "calculated-card-content"], [1, "p-6", "rounded-xl", "border-2", 3, "ngClass", "h-full"], [1, "w-full"], [1, "metrics-section-enter"], [1, "metrics-section-content"], [1, "rounded-2xl", "border", "shadow-lg", "p-8", 3, "ngClass"], [3, "submitClick", "cancelClick", "viewMode", "isValid", "isSubmitting", "validationMessage", "buttonText", "showCancelButton"], [3, "closed", "viewMode", "metricEnum", "metricData", "contributingMetrics", "pacingMetrics", "trendChartData", "isOpen"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-6", "h-6", "chevron-rotate", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M19 9l-7 7-7-7"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"], [1, "flex", "items-center", "gap-1"], ["type", "button", "tooltipType", "markdown", "tooltipPosition", "top", 1, "flex-shrink-0", "w-4", "h-4", "rounded-full", "inline-flex", "items-center", "justify-center", "transition-colors", 3, "click", "ngClass", "libSymphiqTooltip"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-3", "h-3"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"], [1, "flex", "gap-2"], [1, "flex-1", "py-2", "px-4", "rounded-lg", "text-sm", "font-semibold", "transition-all", 3, "click", "ngClass"], [1, "relative"], [1, "flex", "justify-end"], [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, "px-4", "py-2", "rounded-lg", "text-sm", "font-semibold", "transition-all", 3, "click", "ngClass"], [1, "text-sm", 3, "ngClass"], [1, "p-6", "rounded-xl", "border-2", 3, "ngClass"], [1, "flex", "items-center", "justify-between"], [1, "font-bold", "transition-all", "duration-300", "text-lg", 3, "ngClass"], [1, "px-4", "py-2", "rounded-lg", "text-sm", "font-semibold", "transition-all", "whitespace-nowrap", 3, "ngClass"], [1, "details-collapse"], [1, "details-collapse-content"], [1, "relative", "pt-6", "mt-6"], [1, "absolute", "top-0", "left-0", "right-0", "flex", "items-center", "-translate-y-1/2"], [1, "flex-1", "h-px", 3, "ngClass"], [1, "px-3", "py-1", "rounded-full", "text-xs", "font-semibold", "whitespace-nowrap", 3, "ngClass"], [1, "grid", "grid-cols-2", "gap-4", "pt-2"], [1, "text-xs", "font-medium", "uppercase", "tracking-wider", "mb-1", 3, "ngClass"], [1, "text-xl", "font-bold", 3, "ngClass"], [1, "px-4", "py-2", "rounded-lg", "text-sm", "font-semibold", "transition-all", "whitespace-nowrap", 3, "click", "ngClass"], [1, "flex", "items-center", "gap-1", "mb-1"], [1, "mb-6"], [1, "text-2xl", "font-bold", "mb-2", 3, "ngClass"], [3, "viewStageReport", "viewRelatedMetricReport", "viewMode", "calculations", "pacingMetrics"]], template: function InitialTargetSettingComponent_Template(rf, ctx) { if (rf & 1) {
59913
+ } }, inputs: { viewMode: [1, "viewMode"], funnelMetrics: [1, "funnelMetrics"], mainUiData: [1, "mainUiData"], trendUiData: [1, "trendUiData"], shopId: [1, "shopId"], pacingMetrics: [1, "pacingMetrics"], dataResults: [1, "dataResults"], reverseCalculationResponse: [1, "reverseCalculationResponse"], targets: [1, "targets"] }, outputs: { targetsCreated: "targetsCreated", calculateRevenueRequest: "calculateRevenueRequest" }, decls: 43, vars: 46, consts: [["absoluteInputRef", ""], ["percentageInputRef", ""], [1, "space-y-8", "pb-32"], [1, "rounded-2xl", "border", "shadow-lg", "p-8", 3, "click", "ngClass"], [1, "flex", "items-center", "justify-between", "mb-6"], [1, "text-2xl", "font-bold", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-6", "h-6", "chevron-rotate", 3, "chevron-rotate-expanded", "ngClass"], [1, "flex", "flex-col", "gap-4"], [1, "grid", "lg:grid-cols-2", "gap-4"], [1, "p-6", "rounded-xl", "border-2", 3, "click", "ngClass"], [1, "flex", "flex-wrap", "gap-4", "place-content-between"], [1, "flex", "items-center", "gap-2"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"], [1, "text-xs", "font-medium", "uppercase", "tracking-wider", 3, "ngClass"], [1, "text-lg", "font-bold", 3, "ngClass"], [1, "form-area-collapse"], [1, "form-area-content"], [1, "space-y-6"], [1, "chart-in-column"], [1, "chart-in-column-content"], [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"], [1, "calculated-card-enter", "order-first", "lg:order-last"], [1, "calculated-card-content"], [1, "p-6", "rounded-xl", "border-2", 3, "ngClass", "h-full"], [1, "w-full"], [1, "metrics-section-enter"], [1, "metrics-section-content"], [1, "rounded-2xl", "border", "shadow-lg", "p-8", 3, "ngClass"], [3, "viewMode", "isValid", "isSubmitting", "validationMessage", "buttonText", "showCancelButton"], [3, "closed", "viewMode", "metricEnum", "metricData", "contributingMetrics", "pacingMetrics", "trendChartData", "isOpen"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-6", "h-6", "chevron-rotate", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M19 9l-7 7-7-7"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"], [1, "flex", "items-center", "gap-1"], ["type", "button", "tooltipType", "markdown", "tooltipPosition", "top", 1, "flex-shrink-0", "w-4", "h-4", "rounded-full", "inline-flex", "items-center", "justify-center", "transition-colors", 3, "click", "ngClass", "libSymphiqTooltip"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-3", "h-3"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"], [1, "flex", "gap-2"], [1, "flex-1", "py-2", "px-4", "rounded-lg", "text-sm", "font-semibold", "transition-all", 3, "click", "ngClass"], [1, "relative"], [1, "flex", "justify-end"], [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, "px-4", "py-2", "rounded-lg", "text-sm", "font-semibold", "transition-all", 3, "click", "ngClass"], [1, "text-sm", 3, "ngClass"], [1, "p-6", "rounded-xl", "border-2", 3, "ngClass"], [1, "flex", "items-center", "justify-between"], [1, "font-bold", "transition-all", "duration-300", "text-lg", 3, "ngClass"], [1, "px-4", "py-2", "rounded-lg", "text-sm", "font-semibold", "transition-all", "whitespace-nowrap", 3, "ngClass"], [1, "details-collapse"], [1, "details-collapse-content"], [1, "relative", "pt-6", "mt-6"], [1, "absolute", "top-0", "left-0", "right-0", "flex", "items-center", "-translate-y-1/2"], [1, "flex-1", "h-px", 3, "ngClass"], [1, "px-3", "py-1", "rounded-full", "text-xs", "font-semibold", "whitespace-nowrap", 3, "ngClass"], [1, "grid", "grid-cols-2", "gap-4", "pt-2"], [1, "text-xs", "font-medium", "uppercase", "tracking-wider", "mb-1", 3, "ngClass"], [1, "text-xl", "font-bold", 3, "ngClass"], [1, "px-4", "py-2", "rounded-lg", "text-sm", "font-semibold", "transition-all", "whitespace-nowrap", 3, "click", "ngClass"], [1, "flex", "items-center", "gap-1", "mb-1"], [1, "mb-6"], [1, "text-2xl", "font-bold", "mb-2", 3, "ngClass"], [3, "viewStageReport", "viewRelatedMetricReport", "viewMode", "calculations", "pacingMetrics"], [3, "submitClick", "cancelClick", "viewMode", "isValid", "isSubmitting", "validationMessage", "buttonText", "showCancelButton"]], template: function InitialTargetSettingComponent_Template(rf, ctx) { if (rf & 1) {
59849
59914
  i0.ɵɵelementStart(0, "div", 2);
59850
59915
  i0.ɵɵelement(1, "symphiq-tooltip-container");
59851
59916
  i0.ɵɵelementStart(2, "div", 3);
@@ -59888,9 +59953,7 @@ class InitialTargetSettingComponent {
59888
59953
  i0.ɵɵelementStart(38, "div", 29)(39, "div", 30);
59889
59954
  i0.ɵɵconditionalCreate(40, InitialTargetSettingComponent_Conditional_40_Template, 8, 7, "div", 31);
59890
59955
  i0.ɵɵelementEnd()();
59891
- i0.ɵɵelementStart(41, "symphiq-sticky-submit-bar", 32);
59892
- i0.ɵɵlistener("submitClick", function InitialTargetSettingComponent_Template_symphiq_sticky_submit_bar_submitClick_41_listener() { return ctx.handleSubmitClick(); })("cancelClick", function InitialTargetSettingComponent_Template_symphiq_sticky_submit_bar_cancelClick_41_listener() { return ctx.handleCancel(); });
59893
- i0.ɵɵelementEnd();
59956
+ i0.ɵɵconditionalCreate(41, InitialTargetSettingComponent_Conditional_41_Template, 1, 6, "symphiq-sticky-submit-bar", 32);
59894
59957
  i0.ɵɵelementStart(42, "symphiq-metric-report-modal", 33);
59895
59958
  i0.ɵɵlistener("closed", function InitialTargetSettingComponent_Template_symphiq_metric_report_modal_closed_42_listener() { return ctx.closeMetricReport(); });
59896
59959
  i0.ɵɵelementEnd()();
@@ -59933,9 +59996,9 @@ class InitialTargetSettingComponent {
59933
59996
  i0.ɵɵadvance();
59934
59997
  i0.ɵɵconditional(ctx.revenueChartData() ? 32 : 33);
59935
59998
  i0.ɵɵadvance(2);
59936
- i0.ɵɵclassProp("calculated-card-enter-active", ctx.calculatedRevenue() > 0);
59999
+ i0.ɵɵclassProp("calculated-card-enter-active", ctx.displayedTargetRevenue() > 0);
59937
60000
  i0.ɵɵadvance(2);
59938
- i0.ɵɵconditional(ctx.calculatedRevenue() > 0 ? 36 : -1);
60001
+ i0.ɵɵconditional(ctx.displayedTargetRevenue() > 0 ? 36 : -1);
59939
60002
  i0.ɵɵadvance();
59940
60003
  i0.ɵɵconditional(ctx.calculationState() !== "results" ? 37 : -1);
59941
60004
  i0.ɵɵadvance();
@@ -59943,7 +60006,7 @@ class InitialTargetSettingComponent {
59943
60006
  i0.ɵɵadvance(2);
59944
60007
  i0.ɵɵconditional(ctx.showMetricsVisualization() ? 40 : -1);
59945
60008
  i0.ɵɵadvance();
59946
- i0.ɵɵproperty("viewMode", ctx.viewMode())("isValid", ctx.isValid())("isSubmitting", ctx.isCalculating())("validationMessage", ctx.validationMessage())("buttonText", ctx.submitButtonText())("showCancelButton", ctx.calculationState() === "input" && ctx.hasStoredResponse());
60009
+ i0.ɵɵconditional(!ctx.hasExistingTargets() ? 41 : -1);
59947
60010
  i0.ɵɵadvance();
59948
60011
  i0.ɵɵproperty("viewMode", ctx.viewMode())("metricEnum", ctx.selectedMetricEnum())("metricData", ctx.selectedMetricData())("contributingMetrics", ctx.selectedContributingMetrics())("pacingMetrics", ctx.pacingMetrics())("trendChartData", ctx.revenueChartData())("isOpen", ctx.isMetricReportOpen());
59949
60012
  } }, dependencies: [CommonModule, i1$1.NgClass, FormsModule, i2$1.DefaultValueAccessor, i2$1.NumberValueAccessor, i2$1.NgControlStatus, i2$1.MinValidator, i2$1.MaxValidator, i2$1.NgModel, FunnelMetricsVisualizationComponent,
@@ -60141,9 +60204,9 @@ class InitialTargetSettingComponent {
60141
60204
  </div>
60142
60205
  </div>
60143
60206
 
60144
- <div class="calculated-card-enter order-first lg:order-last" [class.calculated-card-enter-active]="calculatedRevenue() > 0">
60207
+ <div class="calculated-card-enter order-first lg:order-last" [class.calculated-card-enter-active]="displayedTargetRevenue() > 0">
60145
60208
  <div class="calculated-card-content">
60146
- @if (calculatedRevenue() > 0) {
60209
+ @if (displayedTargetRevenue() > 0) {
60147
60210
  <div [ngClass]="calculatedValuesCardClasses()" class="p-6 rounded-xl border-2"
60148
60211
  [class.h-full]="calculationState() !== 'results' || detailsExpanded()">
60149
60212
  <div>
@@ -60154,14 +60217,14 @@ class InitialTargetSettingComponent {
60154
60217
  </p>
60155
60218
  <p [ngClass]="calculatedValueClasses()" class="font-bold transition-all duration-300 text-lg"
60156
60219
  [class.lg:text-3xl]="calculationState() !== 'results' || detailsExpanded()">
60157
- @if (calculationState() === 'results' && targets() === undefined && submittedAbsoluteInput() !== null) {
60220
+ @if (calculationState() === 'results' && !hasExistingTargets() && submittedAbsoluteInput() !== null) {
60158
60221
  > {{ formatCurrency(submittedAbsoluteInput()!) }}
60159
60222
  } @else {
60160
60223
  {{ formatCurrency(displayedTargetRevenue()) }}
60161
60224
  }
60162
60225
  </p>
60163
60226
  </div>
60164
- @if (calculationState() === 'results' && targets() === undefined) {
60227
+ @if (calculationState() === 'results' && !hasExistingTargets()) {
60165
60228
  <button
60166
60229
  (click)="handleAdjustTarget(); $event.stopPropagation()"
60167
60230
  [ngClass]="secondaryButtonClasses()"
@@ -60306,7 +60369,7 @@ class InitialTargetSettingComponent {
60306
60369
  Contributing Metrics
60307
60370
  </h2>
60308
60371
  <p [ngClass]="sectionDescriptionClasses()" class="text-sm">
60309
- @if (targets() === undefined && submittedAbsoluteInput() !== null) {
60372
+ @if (!hasExistingTargets() && submittedAbsoluteInput() !== null) {
60310
60373
  To achieve your revenue target of over {{ formatCurrency(submittedAbsoluteInput()!) }}, the following metrics need to improve by these amounts. These improvements compound through your funnel to drive revenue growth.
60311
60374
  } @else {
60312
60375
  To achieve your revenue target of {{ formatCurrency(displayedTargetRevenue()) }}, the following metrics need to improve by these amounts. These improvements compound through your funnel to drive revenue growth.
@@ -60326,16 +60389,18 @@ class InitialTargetSettingComponent {
60326
60389
  </div>
60327
60390
  </div>
60328
60391
 
60329
- <symphiq-sticky-submit-bar
60330
- [viewMode]="viewMode()"
60331
- [isValid]="isValid()"
60332
- [isSubmitting]="isCalculating()"
60333
- [validationMessage]="validationMessage()"
60334
- [buttonText]="submitButtonText()"
60335
- [showCancelButton]="calculationState() === 'input' && hasStoredResponse()"
60336
- (submitClick)="handleSubmitClick()"
60337
- (cancelClick)="handleCancel()"
60338
- />
60392
+ @if (!hasExistingTargets()) {
60393
+ <symphiq-sticky-submit-bar
60394
+ [viewMode]="viewMode()"
60395
+ [isValid]="isValid()"
60396
+ [isSubmitting]="isCalculating()"
60397
+ [validationMessage]="validationMessage()"
60398
+ [buttonText]="submitButtonText()"
60399
+ [showCancelButton]="calculationState() === 'input' && hasStoredResponse()"
60400
+ (submitClick)="handleSubmitClick()"
60401
+ (cancelClick)="handleCancel()"
60402
+ />
60403
+ }
60339
60404
 
60340
60405
  <!-- Metric Report Modal -->
60341
60406
  <symphiq-metric-report-modal
@@ -60357,7 +60422,7 @@ class InitialTargetSettingComponent {
60357
60422
  type: ViewChild,
60358
60423
  args: ['percentageInputRef']
60359
60424
  }], 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 }] }], reverseCalculationResponse: [{ type: i0.Input, args: [{ isSignal: true, alias: "reverseCalculationResponse", required: false }] }], targets: [{ type: i0.Input, args: [{ isSignal: true, alias: "targets", required: false }] }], targetsCreated: [{ type: i0.Output, args: ["targetsCreated"] }], calculateRevenueRequest: [{ type: i0.Output, args: ["calculateRevenueRequest"] }] }); })();
60360
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InitialTargetSettingComponent, { className: "InitialTargetSettingComponent", filePath: "lib/components/revenue-calculator-dashboard/initial-target-setting.component.ts", lineNumber: 536 }); })();
60425
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InitialTargetSettingComponent, { className: "InitialTargetSettingComponent", filePath: "lib/components/revenue-calculator-dashboard/initial-target-setting.component.ts", lineNumber: 538 }); })();
60361
60426
 
60362
60427
  function IndeterminateSpinnerComponent_For_5_Template(rf, ctx) { if (rf & 1) {
60363
60428
  i0.ɵɵelement(0, "div", 5);
@@ -60569,6 +60634,10 @@ class SymphiqRevenueCalculatorDashboardComponent {
60569
60634
  this.isScrolled = signal(false, ...(ngDevMode ? [{ debugName: "isScrolled" }] : []));
60570
60635
  this.isProgrammaticScroll = false;
60571
60636
  this.isLightMode = computed(() => this.viewMode() === ViewModeEnum.LIGHT, ...(ngDevMode ? [{ debugName: "isLightMode" }] : []));
60637
+ this.hasAnyTargets = computed(() => {
60638
+ const targets = this.targets();
60639
+ return targets !== undefined && targets.length > 0;
60640
+ }, ...(ngDevMode ? [{ debugName: "hasAnyTargets" }] : []));
60572
60641
  this.hasCurrentYearTargets = computed(() => {
60573
60642
  const targets = this.targets() ?? [];
60574
60643
  const metrics = this.funnelMetrics() ?? [];
@@ -60742,7 +60811,7 @@ class SymphiqRevenueCalculatorDashboardComponent {
60742
60811
  i0.ɵɵadvance(3);
60743
60812
  i0.ɵɵproperty("ngClass", ctx.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");
60744
60813
  i0.ɵɵadvance(2);
60745
- i0.ɵɵproperty("viewMode", ctx.viewMode())("currentStepId", ctx.JourneyStepIdEnum.REVENUE_CALCULATOR)("showNextStepAction", ctx.hasCurrentYearTargets())("forDemo", ctx.forDemo())("maxAccessibleStepId", ctx.maxAccessibleStepId());
60814
+ i0.ɵɵproperty("viewMode", ctx.viewMode())("currentStepId", ctx.JourneyStepIdEnum.REVENUE_CALCULATOR)("showNextStepAction", ctx.hasAnyTargets())("forDemo", ctx.forDemo())("maxAccessibleStepId", ctx.maxAccessibleStepId());
60746
60815
  i0.ɵɵadvance(3);
60747
60816
  i0.ɵɵconditional(ctx.isLoading() ? 23 : ctx.dataLoadStatus() !== ctx.ShopDataLoadStatusEnum.FULLY_LOADED ? 24 : 25);
60748
60817
  } }, dependencies: [CommonModule, i1$1.NgClass, JourneyProgressIndicatorComponent,
@@ -60831,7 +60900,7 @@ class SymphiqRevenueCalculatorDashboardComponent {
60831
60900
  <symphiq-journey-progress-indicator
60832
60901
  [viewMode]="viewMode()"
60833
60902
  [currentStepId]="JourneyStepIdEnum.REVENUE_CALCULATOR"
60834
- [showNextStepAction]="hasCurrentYearTargets()"
60903
+ [showNextStepAction]="hasAnyTargets()"
60835
60904
  [forDemo]="forDemo()"
60836
60905
  [maxAccessibleStepId]="maxAccessibleStepId()"
60837
60906
  (stepClick)="stepClick.emit($event)"