@eric-emg/symphiq-components 1.2.334 → 1.2.335

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.
@@ -86887,8 +86887,8 @@ function PlanCardComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
86887
86887
  function PlanCardComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
86888
86888
  i0.ɵɵelementStart(0, "button", 15);
86889
86889
  i0.ɵɵnamespaceSVG();
86890
- i0.ɵɵelementStart(1, "svg", 24);
86891
- i0.ɵɵelement(2, "path", 25);
86890
+ i0.ɵɵelementStart(1, "svg", 25);
86891
+ i0.ɵɵelement(2, "path", 26);
86892
86892
  i0.ɵɵelementEnd()();
86893
86893
  } if (rf & 2) {
86894
86894
  const ctx_r0 = i0.ɵɵnextContext();
@@ -86897,8 +86897,8 @@ function PlanCardComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
86897
86897
  function PlanCardComponent_Conditional_26_Template(rf, ctx) { if (rf & 1) {
86898
86898
  i0.ɵɵelementStart(0, "button", 15);
86899
86899
  i0.ɵɵnamespaceSVG();
86900
- i0.ɵɵelementStart(1, "svg", 24);
86901
- i0.ɵɵelement(2, "path", 25);
86900
+ i0.ɵɵelementStart(1, "svg", 25);
86901
+ i0.ɵɵelement(2, "path", 26);
86902
86902
  i0.ɵɵelementEnd()();
86903
86903
  } if (rf & 2) {
86904
86904
  const ctx_r0 = i0.ɵɵnextContext();
@@ -86930,11 +86930,14 @@ class PlanCardComponent {
86930
86930
  }
86931
86931
  getPlanTitle() {
86932
86932
  const info = this.planInfo();
86933
- return info.planItem.externalName || info.planItem.name || 'Plan';
86933
+ return info.planItemPrice.externalName || info.planItem.externalName || info.planItem.name || 'Plan';
86934
86934
  }
86935
86935
  formatPrice() {
86936
86936
  const info = this.planInfo();
86937
- const price = info.planItemPrice.price || 0;
86937
+ let price = info.planItemPrice.price || 0;
86938
+ if (info.periodUnit === ChargebeeItemPricePeriodUnitEnum.YEAR) {
86939
+ price = price / 12;
86940
+ }
86938
86941
  const symbol = this.getCurrencySymbol();
86939
86942
  const formattedPrice = Math.floor(price / 100).toLocaleString();
86940
86943
  return `${symbol}${formattedPrice}`;
@@ -87087,7 +87090,7 @@ class PlanCardComponent {
87087
87090
  : 'text-slate-600';
87088
87091
  }
87089
87092
  static { this.ɵfac = function PlanCardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PlanCardComponent)(); }; }
87090
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PlanCardComponent, selectors: [["symphiq-plan-card"]], inputs: { viewMode: [1, "viewMode"], planInfo: [1, "planInfo"], isSelected: [1, "isSelected"], selectedPeriodUnit: [1, "selectedPeriodUnit"] }, outputs: { planSelected: "planSelected" }, decls: 51, vars: 34, consts: [[1, "relative", "rounded-2xl", "border-2", "p-6", "transition-all", "duration-200", "cursor-pointer", "hover:scale-[1.02]", 3, "click", "ngClass"], [1, "absolute", "-top-3", "left-1/2", "transform", "-translate-x-1/2", "px-4", "py-1", "rounded-full", "text-xs", "font-bold", 3, "ngClass"], [1, "flex", "items-start", "justify-between", "mb-6"], [1, "flex-1"], [1, "text-xl", "font-bold", "mb-2", 3, "ngClass"], [1, "flex", "items-baseline", "gap-2"], [1, "text-4xl", "font-bold", 3, "ngClass"], [1, "text-base", 3, "ngClass"], [1, "flex-shrink-0", "ml-4"], [1, "w-6", "h-6", "rounded-full", "border-2", "flex", "items-center", "justify-center", "transition-all", "duration-200", 3, "ngClass"], [1, "w-3", "h-3", "rounded-full", 3, "ngClass"], [1, "space-y-4", 3, "ngClass"], [1, "flex", "justify-between", "items-center", "py-3", "border-b", 3, "ngClass"], [1, "flex", "items-center", "gap-2"], [1, "text-sm", "font-medium", 3, "ngClass"], [1, "w-4", "h-4", "rounded-full", "flex", "items-center", "justify-center", 3, "ngClass"], [1, "text-sm", "font-semibold", 3, "ngClass"], [1, "text-right"], [1, "text-xs", "mt-1", 3, "ngClass"], ["fill", "currentColor", "viewBox", "0 0 20 20", 1, "w-5", "h-5", 3, "ngClass"], ["fill-rule", "evenodd", "d", "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", "clip-rule", "evenodd"], [1, "pt-4", 3, "ngClass"], [1, "text-xs", "font-semibold", "uppercase", "tracking-wider", "mb-2", 3, "ngClass"], [1, "text-sm", "leading-relaxed", 3, "ngClass"], ["fill", "currentColor", "viewBox", "0 0 20 20", 1, "w-3", "h-3"], ["fill-rule", "evenodd", "d", "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z", "clip-rule", "evenodd"]], template: function PlanCardComponent_Template(rf, ctx) { if (rf & 1) {
87093
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PlanCardComponent, selectors: [["symphiq-plan-card"]], inputs: { viewMode: [1, "viewMode"], planInfo: [1, "planInfo"], isSelected: [1, "isSelected"], selectedPeriodUnit: [1, "selectedPeriodUnit"] }, outputs: { planSelected: "planSelected" }, decls: 51, vars: 34, consts: [[1, "relative", "rounded-2xl", "border-2", "p-6", "transition-all", "duration-200", "cursor-pointer", "hover:scale-[1.02]", 3, "click", "ngClass"], [1, "absolute", "-top-3", "left-1/2", "transform", "-translate-x-1/2", "px-4", "py-1", "rounded-full", "text-xs", "font-bold", 3, "ngClass"], [1, "flex", "items-start", "justify-between", "mb-6"], [1, "flex-1"], [1, "text-xl", "font-bold", "mb-2", 3, "ngClass"], [1, "flex", "items-baseline", "gap-2"], [1, "text-4xl", "font-bold", 3, "ngClass"], [1, "text-base", 3, "ngClass"], [1, "flex-shrink-0", "ml-4"], [1, "w-6", "h-6", "rounded-full", "border-2", "flex", "items-center", "justify-center", "transition-all", "duration-200", 3, "ngClass"], [1, "w-3", "h-3", "rounded-full", 3, "ngClass"], [1, "space-y-4", 3, "ngClass"], [1, "flex", "justify-between", "items-center", "py-3", "border-b", 3, "ngClass"], [1, "flex", "items-center", "gap-2"], [1, "text-sm", "font-medium", 3, "ngClass"], [1, "w-4", "h-4", "rounded-full", "flex", "items-center", "justify-center", 3, "ngClass"], [1, "text-sm", "font-semibold", 3, "ngClass"], [1, "text-right"], [1, "text-xs", "mt-1", 3, "ngClass"], ["fill", "currentColor", "viewBox", "0 0 20 20", 1, "w-5", "h-5", 3, "ngClass"], ["fill-rule", "evenodd", "d", "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", "clip-rule", "evenodd"], [1, "flex", "justify-between", "items-center", "py-3", 3, "ngClass"], [1, "pt-4", "mt-4", 3, "ngClass"], [1, "text-xs", "font-semibold", "uppercase", "tracking-wider", "mb-2", 3, "ngClass"], [1, "text-sm", "leading-relaxed", 3, "ngClass"], ["fill", "currentColor", "viewBox", "0 0 20 20", 1, "w-3", "h-3"], ["fill-rule", "evenodd", "d", "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z", "clip-rule", "evenodd"]], template: function PlanCardComponent_Template(rf, ctx) { if (rf & 1) {
87091
87094
  i0.ɵɵelementStart(0, "div", 0);
87092
87095
  i0.ɵɵlistener("click", function PlanCardComponent_Template_div_click_0_listener() { return ctx.handleCardClick(); });
87093
87096
  i0.ɵɵconditionalCreate(1, PlanCardComponent_Conditional_1_Template, 2, 1, "div", 1);
@@ -87137,7 +87140,7 @@ class PlanCardComponent {
87137
87140
  i0.ɵɵelement(40, "path", 20);
87138
87141
  i0.ɵɵelementEnd()();
87139
87142
  i0.ɵɵnamespaceHTML();
87140
- i0.ɵɵelementStart(41, "div", 12)(42, "span", 14);
87143
+ i0.ɵɵelementStart(41, "div", 21)(42, "span", 14);
87141
87144
  i0.ɵɵtext(43, "Google Analytics integration");
87142
87145
  i0.ɵɵelementEnd();
87143
87146
  i0.ɵɵnamespaceSVG();
@@ -87145,10 +87148,10 @@ class PlanCardComponent {
87145
87148
  i0.ɵɵelement(45, "path", 20);
87146
87149
  i0.ɵɵelementEnd()();
87147
87150
  i0.ɵɵnamespaceHTML();
87148
- i0.ɵɵelementStart(46, "div", 21)(47, "h4", 22);
87151
+ i0.ɵɵelementStart(46, "div", 22)(47, "h4", 23);
87149
87152
  i0.ɵɵtext(48, " Contract terms ");
87150
87153
  i0.ɵɵelementEnd();
87151
- i0.ɵɵelementStart(49, "p", 23);
87154
+ i0.ɵɵelementStart(49, "p", 24);
87152
87155
  i0.ɵɵtext(50);
87153
87156
  i0.ɵɵelementEnd()()()();
87154
87157
  } if (rf & 2) {
@@ -87317,14 +87320,14 @@ class PlanCardComponent {
87317
87320
  </svg>
87318
87321
  </div>
87319
87322
 
87320
- <div [ngClass]="featureRowClasses()" class="flex justify-between items-center py-3 border-b">
87323
+ <div [ngClass]="featureRowClasses()" class="flex justify-between items-center py-3">
87321
87324
  <span [ngClass]="labelClasses()" class="text-sm font-medium">Google Analytics integration</span>
87322
87325
  <svg [ngClass]="checkIconClasses()" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
87323
87326
  <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path>
87324
87327
  </svg>
87325
87328
  </div>
87326
87329
 
87327
- <div [ngClass]="contractTermsClasses()" class="pt-4">
87330
+ <div [ngClass]="contractTermsClasses()" class="pt-4 mt-4">
87328
87331
  <h4 [ngClass]="contractTermsLabelClasses()" class="text-xs font-semibold uppercase tracking-wider mb-2">
87329
87332
  Contract terms
87330
87333
  </h4>
@@ -87339,7 +87342,7 @@ class PlanCardComponent {
87339
87342
  }], null, { viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], planInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "planInfo", required: true }] }], isSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "isSelected", required: false }] }], selectedPeriodUnit: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedPeriodUnit", required: false }] }], planSelected: [{ type: i0.Output, args: ["planSelected"] }] }); })();
87340
87343
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PlanCardComponent, { className: "PlanCardComponent", filePath: "lib/components/profile-analysis-dashboard/cards/plan-card.component.ts", lineNumber: 118 }); })();
87341
87344
 
87342
- const _forTrack0$1 = ($index, $item) => $item.planItem.id;
87345
+ const _forTrack0$1 = ($index, $item) => $item.planItemPrice.id;
87343
87346
  function PlanSelectionContainerComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
87344
87347
  i0.ɵɵelementStart(0, "div", 14);
87345
87348
  i0.ɵɵelement(1, "symphiq-indeterminate-spinner", 17);
@@ -87412,11 +87415,11 @@ class PlanSelectionContainerComponent {
87412
87415
  this.periodUnitChanged.emit(period);
87413
87416
  }
87414
87417
  handlePlanSelection(plan) {
87415
- this.selectedPlanId.set(plan.planItem.id);
87418
+ this.selectedPlanId.set(plan.planItemPrice.id);
87416
87419
  this.planSelected.emit(plan);
87417
87420
  }
87418
87421
  isSelectedPlan(plan) {
87419
- return this.selectedPlanId() === plan.planItem.id;
87422
+ return this.selectedPlanId() === plan.planItemPrice.id;
87420
87423
  }
87421
87424
  containerClasses() {
87422
87425
  return this.viewMode() === ViewModeEnum.DARK
@@ -87585,7 +87588,7 @@ class PlanSelectionContainerComponent {
87585
87588
  </div>
87586
87589
  } @else if (planCardInfos() && planCardInfos()!.length > 0) {
87587
87590
  <div class="flex flex-col gap-8 mb-32">
87588
- @for (plan of planCardInfos(); track plan.planItem.id) {
87591
+ @for (plan of planCardInfos(); track plan.planItemPrice.id) {
87589
87592
  <symphiq-plan-card
87590
87593
  [viewMode]="viewMode()"
87591
87594
  [planInfo]="plan"
@@ -88973,8 +88976,9 @@ class SymphiqProfileAnalysisDashboardComponent {
88973
88976
  }, ...(ngDevMode ? [{ debugName: "currencySelectionEffect" }] : []));
88974
88977
  this.planLoadingEffect = effect(() => {
88975
88978
  const planCardInfos = this.planCardInfos();
88976
- console.log('[planLoadingEffect] triggered', { planCardInfos: planCardInfos?.length, isPlanLoading: this.isPlanLoading() });
88977
- if (planCardInfos && this.isPlanLoading()) {
88979
+ const isLoading = untracked(() => this.isPlanLoading());
88980
+ console.log('[planLoadingEffect] triggered', { planCardInfos: planCardInfos?.length, isPlanLoading: isLoading });
88981
+ if (planCardInfos && isLoading) {
88978
88982
  console.log('[planLoadingEffect] resetting isPlanLoading to false');
88979
88983
  this.isPlanLoading.set(false);
88980
88984
  }
@@ -90479,7 +90483,7 @@ class SymphiqProfileAnalysisDashboardComponent {
90479
90483
  type: HostListener,
90480
90484
  args: ['window:scroll', ['$event']]
90481
90485
  }] }); })();
90482
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SymphiqProfileAnalysisDashboardComponent, { className: "SymphiqProfileAnalysisDashboardComponent", filePath: "lib/components/profile-analysis-dashboard/symphiq-profile-analysis-dashboard.component.ts", lineNumber: 720 }); })();
90486
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SymphiqProfileAnalysisDashboardComponent, { className: "SymphiqProfileAnalysisDashboardComponent", filePath: "lib/components/profile-analysis-dashboard/symphiq-profile-analysis-dashboard.component.ts", lineNumber: 721 }); })();
90483
90487
 
90484
90488
  class ScrollProgressBarComponent {
90485
90489
  constructor() {