@eric-emg/symphiq-components 1.2.293 → 1.2.295
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/symphiq-components.mjs +16 -17
- package/fesm2022/symphiq-components.mjs.map +1 -1
- package/index.d.ts +44 -44
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -59813,11 +59813,9 @@ class EditMetricTargetModalComponent {
|
|
|
59813
59813
|
}, ...(ngDevMode ? [{ debugName: "gapTooltip" }] : []));
|
|
59814
59814
|
this.filteredHistories = computed(() => {
|
|
59815
59815
|
const histories = this.targetHistories();
|
|
59816
|
-
|
|
59817
|
-
const sorted = histories
|
|
59816
|
+
return histories
|
|
59818
59817
|
.slice()
|
|
59819
59818
|
.sort((a, b) => new Date(b.createdDate ?? 0).getTime() - new Date(a.createdDate ?? 0).getTime());
|
|
59820
|
-
return sorted;
|
|
59821
59819
|
}, ...(ngDevMode ? [{ debugName: "filteredHistories" }] : []));
|
|
59822
59820
|
this.currentPaceProjectionTooltip = {
|
|
59823
59821
|
title: 'Current Pace Projection',
|
|
@@ -61223,6 +61221,15 @@ class InitialTargetSettingComponent {
|
|
|
61223
61221
|
const targets = this.targets();
|
|
61224
61222
|
return targets !== undefined && targets.length > 0;
|
|
61225
61223
|
}, ...(ngDevMode ? [{ debugName: "hasExistingTargets" }] : []));
|
|
61224
|
+
this.editMetricTargetHistories = computed(() => {
|
|
61225
|
+
const metricEnum = this.editMetricEnum();
|
|
61226
|
+
const targets = this.targets() ?? [];
|
|
61227
|
+
const histories = this.targetHistories();
|
|
61228
|
+
const target = targets.find(t => t.metric === metricEnum);
|
|
61229
|
+
if (!target?.id)
|
|
61230
|
+
return [];
|
|
61231
|
+
return histories.filter(h => h.targetId === target.id);
|
|
61232
|
+
}, ...(ngDevMode ? [{ debugName: "editMetricTargetHistories" }] : []));
|
|
61226
61233
|
this.priorYearRevenue = computed(() => {
|
|
61227
61234
|
return sumMetricFromUiData(this.mainUiData(), MetricEnum.PURCHASE_REVENUE, 'priorYear');
|
|
61228
61235
|
}, ...(ngDevMode ? [{ debugName: "priorYearRevenue" }] : []));
|
|
@@ -61473,10 +61480,6 @@ class InitialTargetSettingComponent {
|
|
|
61473
61480
|
title: 'Current Pace Projection',
|
|
61474
61481
|
markdown: 'This is your projected year-end revenue based on your current performance trends. It extrapolates your year-to-date results to estimate where you will finish the year if you maintain your current pace.'
|
|
61475
61482
|
};
|
|
61476
|
-
effect(() => {
|
|
61477
|
-
console.log('[InitialTargetSetting] targetHistories:', this.targetHistories(), 'length:', this.targetHistories().length);
|
|
61478
|
-
console.log('[InitialTargetSetting] users:', this.users(), 'length:', this.users().length);
|
|
61479
|
-
});
|
|
61480
61483
|
effect(() => {
|
|
61481
61484
|
const targets = this.targets();
|
|
61482
61485
|
if (targets && targets.length > 0) {
|
|
@@ -62091,7 +62094,7 @@ class InitialTargetSettingComponent {
|
|
|
62091
62094
|
i0.ɵɵadvance();
|
|
62092
62095
|
i0.ɵɵproperty("viewMode", ctx.viewMode())("metricEnum", ctx.selectedMetricEnum())("metricData", ctx.selectedMetricData())("contributingMetrics", ctx.selectedContributingMetrics())("pacingMetrics", ctx.pacingMetrics())("trendChartData", ctx.revenueChartData())("isOpen", ctx.isMetricReportOpen());
|
|
62093
62096
|
i0.ɵɵadvance();
|
|
62094
|
-
i0.ɵɵproperty("viewMode", ctx.viewMode())("metricData", ctx.editMetricData())("pacingMetrics", ctx.pacingMetrics())("targetHistories", ctx.
|
|
62097
|
+
i0.ɵɵproperty("viewMode", ctx.viewMode())("metricData", ctx.editMetricData())("pacingMetrics", ctx.pacingMetrics())("targetHistories", ctx.editMetricTargetHistories())("users", ctx.users())("isOpen", ctx.isEditMetricModalOpen());
|
|
62095
62098
|
} }, 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,
|
|
62096
62099
|
StickySubmitBarComponent,
|
|
62097
62100
|
AreaChartComponent,
|
|
@@ -62545,7 +62548,7 @@ class InitialTargetSettingComponent {
|
|
|
62545
62548
|
[viewMode]="viewMode()"
|
|
62546
62549
|
[metricData]="editMetricData()"
|
|
62547
62550
|
[pacingMetrics]="pacingMetrics()"
|
|
62548
|
-
[targetHistories]="
|
|
62551
|
+
[targetHistories]="editMetricTargetHistories()"
|
|
62549
62552
|
[users]="users()"
|
|
62550
62553
|
[isOpen]="isEditMetricModalOpen()"
|
|
62551
62554
|
(closed)="closeEditMetricModal()"
|
|
@@ -62740,7 +62743,7 @@ function SymphiqRevenueCalculatorDashboardComponent_Conditional_25_Template(rf,
|
|
|
62740
62743
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
62741
62744
|
i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("dataLoadStatus", ctx_r0.dataLoadStatus() ?? ctx_r0.ShopDataLoadStatusEnum.NOT_LOADED)("hasTargets", ctx_r0.hasCurrentYearTargets())("isOnboarded", ctx_r0.isOnboarded());
|
|
62742
62745
|
i0.ɵɵadvance(2);
|
|
62743
|
-
i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("funnelMetrics", ctx_r0.funnelMetrics() ?? i0.ɵɵpureFunction0(17, _c0$p))("mainUiData", ctx_r0.mainUiData())("trendUiData", ctx_r0.trendUiData())("shopId", ctx_r0.shopId())("pacingMetrics", ctx_r0.pacingResponse())("dataResults", ctx_r0.dataResults())("calculateRevenueReverseResponse", ctx_r0.calculateRevenueReverseResponse())("calculateRevenueResponse", ctx_r0.calculateRevenueResponse())("isCalculatingTargets", ctx_r0.isCalculatingTargets())("targets", ctx_r0.targets())("targetHistories", ctx_r0.targetHistories())("users", ctx_r0.users());
|
|
62746
|
+
i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("funnelMetrics", ctx_r0.funnelMetrics() ?? i0.ɵɵpureFunction0(17, _c0$p))("mainUiData", ctx_r0.mainUiData())("trendUiData", ctx_r0.trendUiData())("shopId", ctx_r0.shopId())("pacingMetrics", ctx_r0.pacingResponse())("dataResults", ctx_r0.dataResults())("calculateRevenueReverseResponse", ctx_r0.calculateRevenueReverseResponse())("calculateRevenueResponse", ctx_r0.calculateRevenueResponse())("isCalculatingTargets", ctx_r0.isCalculatingTargets())("targets", ctx_r0.targets())("targetHistories", ctx_r0.targetHistories() ?? i0.ɵɵpureFunction0(18, _c0$p))("users", ctx_r0.users() ?? i0.ɵɵpureFunction0(19, _c0$p));
|
|
62744
62747
|
} }
|
|
62745
62748
|
function SymphiqRevenueCalculatorDashboardComponent_Conditional_26_Template(rf, ctx) { if (rf & 1) {
|
|
62746
62749
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
@@ -62819,10 +62822,6 @@ class SymphiqRevenueCalculatorDashboardComponent {
|
|
|
62819
62822
|
const hasAllMetrics = requiredMetrics.every(metric => currentYearTargets.some(target => target.metric === metric));
|
|
62820
62823
|
return hasAllMetrics && currentYearTargets.length > 0;
|
|
62821
62824
|
}, ...(ngDevMode ? [{ debugName: "hasCurrentYearTargets" }] : []));
|
|
62822
|
-
effect(() => {
|
|
62823
|
-
console.log('[RevCalcDashboard] targetHistories:', this.targetHistories(), 'length:', this.targetHistories().length);
|
|
62824
|
-
console.log('[RevCalcDashboard] users:', this.users(), 'length:', this.users().length);
|
|
62825
|
-
});
|
|
62826
62825
|
effect(() => {
|
|
62827
62826
|
const event = this.scrollEvent();
|
|
62828
62827
|
if (event?.detail) {
|
|
@@ -62973,7 +62972,7 @@ class SymphiqRevenueCalculatorDashboardComponent {
|
|
|
62973
62972
|
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(); });
|
|
62974
62973
|
i0.ɵɵelementEnd();
|
|
62975
62974
|
i0.ɵɵelementStart(21, "main", 11)(22, "div", 6);
|
|
62976
|
-
i0.ɵɵconditionalCreate(23, SymphiqRevenueCalculatorDashboardComponent_Conditional_23_Template, 2, 1, "div", 12)(24, SymphiqRevenueCalculatorDashboardComponent_Conditional_24_Template, 10, 8)(25, SymphiqRevenueCalculatorDashboardComponent_Conditional_25_Template, 3,
|
|
62975
|
+
i0.ɵɵconditionalCreate(23, SymphiqRevenueCalculatorDashboardComponent_Conditional_23_Template, 2, 1, "div", 12)(24, SymphiqRevenueCalculatorDashboardComponent_Conditional_24_Template, 10, 8)(25, SymphiqRevenueCalculatorDashboardComponent_Conditional_25_Template, 3, 20);
|
|
62977
62976
|
i0.ɵɵelementEnd()();
|
|
62978
62977
|
i0.ɵɵconditionalCreate(26, SymphiqRevenueCalculatorDashboardComponent_Conditional_26_Template, 8, 3, "div", 13);
|
|
62979
62978
|
i0.ɵɵelementEnd()();
|
|
@@ -63167,8 +63166,8 @@ class SymphiqRevenueCalculatorDashboardComponent {
|
|
|
63167
63166
|
[calculateRevenueResponse]="calculateRevenueResponse()"
|
|
63168
63167
|
[isCalculatingTargets]="isCalculatingTargets()"
|
|
63169
63168
|
[targets]="targets()"
|
|
63170
|
-
[targetHistories]="targetHistories()"
|
|
63171
|
-
[users]="users()"
|
|
63169
|
+
[targetHistories]="targetHistories() ?? []"
|
|
63170
|
+
[users]="users() ?? []"
|
|
63172
63171
|
(targetsCreated)="onTargetsCreated($event)"
|
|
63173
63172
|
(calculateRevenueReverseRequest)="calculateRevenueReverseRequest.emit($event)"
|
|
63174
63173
|
(calculateRevenueRequest)="onCalculateRevenueRequest($event)"
|