@eric-emg/symphiq-components 1.2.335 → 1.2.337
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 +44 -91
- package/fesm2022/symphiq-components.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -86887,33 +86887,13 @@ 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",
|
|
86891
|
-
i0.ɵɵelement(2, "path",
|
|
86892
|
-
i0.ɵɵelementEnd()();
|
|
86893
|
-
} if (rf & 2) {
|
|
86894
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
86895
|
-
i0.ɵɵproperty("ngClass", ctx_r0.tooltipButtonClasses());
|
|
86896
|
-
} }
|
|
86897
|
-
function PlanCardComponent_Conditional_26_Template(rf, ctx) { if (rf & 1) {
|
|
86898
|
-
i0.ɵɵelementStart(0, "button", 15);
|
|
86899
|
-
i0.ɵɵnamespaceSVG();
|
|
86900
|
-
i0.ɵɵelementStart(1, "svg", 25);
|
|
86901
|
-
i0.ɵɵelement(2, "path", 26);
|
|
86890
|
+
i0.ɵɵelementStart(1, "svg", 23);
|
|
86891
|
+
i0.ɵɵelement(2, "path", 24);
|
|
86902
86892
|
i0.ɵɵelementEnd()();
|
|
86903
86893
|
} if (rf & 2) {
|
|
86904
86894
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
86905
86895
|
i0.ɵɵproperty("ngClass", ctx_r0.tooltipButtonClasses());
|
|
86906
86896
|
} }
|
|
86907
|
-
function PlanCardComponent_Conditional_30_Template(rf, ctx) { if (rf & 1) {
|
|
86908
|
-
i0.ɵɵelementStart(0, "div", 18);
|
|
86909
|
-
i0.ɵɵtext(1);
|
|
86910
|
-
i0.ɵɵelementEnd();
|
|
86911
|
-
} if (rf & 2) {
|
|
86912
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
86913
|
-
i0.ɵɵproperty("ngClass", ctx_r0.subValueClasses());
|
|
86914
|
-
i0.ɵɵadvance();
|
|
86915
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r0.getAdditionalShopsPrice(), " ");
|
|
86916
|
-
} }
|
|
86917
86897
|
class PlanCardComponent {
|
|
86918
86898
|
constructor() {
|
|
86919
86899
|
this.viewMode = input(ViewModeEnum.LIGHT, ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
|
|
@@ -86935,11 +86915,21 @@ class PlanCardComponent {
|
|
|
86935
86915
|
formatPrice() {
|
|
86936
86916
|
const info = this.planInfo();
|
|
86937
86917
|
let price = info.planItemPrice.price || 0;
|
|
86938
|
-
|
|
86918
|
+
const periodUnit = info.planItemPrice.periodUnit;
|
|
86919
|
+
console.log('[formatPrice]', {
|
|
86920
|
+
externalName: info.planItemPrice.externalName,
|
|
86921
|
+
originalPrice: info.planItemPrice.price,
|
|
86922
|
+
periodUnit,
|
|
86923
|
+
isYear: periodUnit === ChargebeeItemPricePeriodUnitEnum.YEAR,
|
|
86924
|
+
yearEnumValue: ChargebeeItemPricePeriodUnitEnum.YEAR
|
|
86925
|
+
});
|
|
86926
|
+
if (periodUnit === ChargebeeItemPricePeriodUnitEnum.YEAR) {
|
|
86939
86927
|
price = price / 12;
|
|
86928
|
+
console.log('[formatPrice] divided by 12:', price);
|
|
86940
86929
|
}
|
|
86941
86930
|
const symbol = this.getCurrencySymbol();
|
|
86942
86931
|
const formattedPrice = Math.floor(price / 100).toLocaleString();
|
|
86932
|
+
console.log('[formatPrice] final:', `${symbol}${formattedPrice}`);
|
|
86943
86933
|
return `${symbol}${formattedPrice}`;
|
|
86944
86934
|
}
|
|
86945
86935
|
getCurrencySymbol() {
|
|
@@ -87090,7 +87080,7 @@ class PlanCardComponent {
|
|
|
87090
87080
|
: 'text-slate-600';
|
|
87091
87081
|
}
|
|
87092
87082
|
static { this.ɵfac = function PlanCardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PlanCardComponent)(); }; }
|
|
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:
|
|
87083
|
+
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: 42, vars: 28, 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"], ["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) {
|
|
87094
87084
|
i0.ɵɵelementStart(0, "div", 0);
|
|
87095
87085
|
i0.ɵɵlistener("click", function PlanCardComponent_Template_div_click_0_listener() { return ctx.handleCardClick(); });
|
|
87096
87086
|
i0.ɵɵconditionalCreate(1, PlanCardComponent_Conditional_1_Template, 2, 1, "div", 1);
|
|
@@ -87114,45 +87104,35 @@ class PlanCardComponent {
|
|
|
87114
87104
|
i0.ɵɵelementStart(20, "span", 16);
|
|
87115
87105
|
i0.ɵɵtext(21, " charged monthly based on your actual usage ");
|
|
87116
87106
|
i0.ɵɵelementEnd()();
|
|
87117
|
-
i0.ɵɵelementStart(22, "div", 12)(23, "
|
|
87118
|
-
i0.ɵɵtext(
|
|
87119
|
-
i0.ɵɵelementEnd();
|
|
87120
|
-
i0.ɵɵconditionalCreate(26, PlanCardComponent_Conditional_26_Template, 3, 1, "button", 15);
|
|
87121
|
-
i0.ɵɵelementEnd();
|
|
87122
|
-
i0.ɵɵelementStart(27, "div", 17)(28, "div", 16);
|
|
87123
|
-
i0.ɵɵtext(29);
|
|
87124
|
-
i0.ɵɵelementEnd();
|
|
87125
|
-
i0.ɵɵconditionalCreate(30, PlanCardComponent_Conditional_30_Template, 2, 2, "div", 18);
|
|
87126
|
-
i0.ɵɵelementEnd()();
|
|
87127
|
-
i0.ɵɵelementStart(31, "div", 12)(32, "span", 14);
|
|
87128
|
-
i0.ɵɵtext(33, "Unlimited recommendations");
|
|
87107
|
+
i0.ɵɵelementStart(22, "div", 12)(23, "span", 14);
|
|
87108
|
+
i0.ɵɵtext(24, "Unlimited recommendations");
|
|
87129
87109
|
i0.ɵɵelementEnd();
|
|
87130
87110
|
i0.ɵɵnamespaceSVG();
|
|
87131
|
-
i0.ɵɵelementStart(
|
|
87132
|
-
i0.ɵɵelement(
|
|
87111
|
+
i0.ɵɵelementStart(25, "svg", 17);
|
|
87112
|
+
i0.ɵɵelement(26, "path", 18);
|
|
87133
87113
|
i0.ɵɵelementEnd()();
|
|
87134
87114
|
i0.ɵɵnamespaceHTML();
|
|
87135
|
-
i0.ɵɵelementStart(
|
|
87136
|
-
i0.ɵɵtext(
|
|
87115
|
+
i0.ɵɵelementStart(27, "div", 12)(28, "span", 14);
|
|
87116
|
+
i0.ɵɵtext(29, "Unlimited seats");
|
|
87137
87117
|
i0.ɵɵelementEnd();
|
|
87138
87118
|
i0.ɵɵnamespaceSVG();
|
|
87139
|
-
i0.ɵɵelementStart(
|
|
87140
|
-
i0.ɵɵelement(
|
|
87119
|
+
i0.ɵɵelementStart(30, "svg", 17);
|
|
87120
|
+
i0.ɵɵelement(31, "path", 18);
|
|
87141
87121
|
i0.ɵɵelementEnd()();
|
|
87142
87122
|
i0.ɵɵnamespaceHTML();
|
|
87143
|
-
i0.ɵɵelementStart(
|
|
87144
|
-
i0.ɵɵtext(
|
|
87123
|
+
i0.ɵɵelementStart(32, "div", 19)(33, "span", 14);
|
|
87124
|
+
i0.ɵɵtext(34, "Google Analytics integration");
|
|
87145
87125
|
i0.ɵɵelementEnd();
|
|
87146
87126
|
i0.ɵɵnamespaceSVG();
|
|
87147
|
-
i0.ɵɵelementStart(
|
|
87148
|
-
i0.ɵɵelement(
|
|
87127
|
+
i0.ɵɵelementStart(35, "svg", 17);
|
|
87128
|
+
i0.ɵɵelement(36, "path", 18);
|
|
87149
87129
|
i0.ɵɵelementEnd()();
|
|
87150
87130
|
i0.ɵɵnamespaceHTML();
|
|
87151
|
-
i0.ɵɵelementStart(
|
|
87152
|
-
i0.ɵɵtext(
|
|
87131
|
+
i0.ɵɵelementStart(37, "div", 20)(38, "h4", 21);
|
|
87132
|
+
i0.ɵɵtext(39, " Contract terms ");
|
|
87153
87133
|
i0.ɵɵelementEnd();
|
|
87154
|
-
i0.ɵɵelementStart(
|
|
87155
|
-
i0.ɵɵtext(
|
|
87134
|
+
i0.ɵɵelementStart(40, "p", 22);
|
|
87135
|
+
i0.ɵɵtext(41);
|
|
87156
87136
|
i0.ɵɵelementEnd()()()();
|
|
87157
87137
|
} if (rf & 2) {
|
|
87158
87138
|
i0.ɵɵproperty("ngClass", ctx.cardContainerClasses());
|
|
@@ -87186,18 +87166,6 @@ class PlanCardComponent {
|
|
|
87186
87166
|
i0.ɵɵproperty("ngClass", ctx.valueClasses());
|
|
87187
87167
|
i0.ɵɵadvance(2);
|
|
87188
87168
|
i0.ɵɵproperty("ngClass", ctx.featureRowClasses());
|
|
87189
|
-
i0.ɵɵadvance(2);
|
|
87190
|
-
i0.ɵɵproperty("ngClass", ctx.labelClasses());
|
|
87191
|
-
i0.ɵɵadvance(2);
|
|
87192
|
-
i0.ɵɵconditional(ctx.hasTooltip("shops") ? 26 : -1);
|
|
87193
|
-
i0.ɵɵadvance(2);
|
|
87194
|
-
i0.ɵɵproperty("ngClass", ctx.valueClasses());
|
|
87195
|
-
i0.ɵɵadvance();
|
|
87196
|
-
i0.ɵɵtextInterpolate1(" ", ctx.getShopsQuantity(), " ");
|
|
87197
|
-
i0.ɵɵadvance();
|
|
87198
|
-
i0.ɵɵconditional(ctx.getAdditionalShopsPrice() ? 30 : -1);
|
|
87199
|
-
i0.ɵɵadvance();
|
|
87200
|
-
i0.ɵɵproperty("ngClass", ctx.featureRowClasses());
|
|
87201
87169
|
i0.ɵɵadvance();
|
|
87202
87170
|
i0.ɵɵproperty("ngClass", ctx.labelClasses());
|
|
87203
87171
|
i0.ɵɵadvance(2);
|
|
@@ -87283,29 +87251,6 @@ class PlanCardComponent {
|
|
|
87283
87251
|
</span>
|
|
87284
87252
|
</div>
|
|
87285
87253
|
|
|
87286
|
-
<div [ngClass]="featureRowClasses()" class="flex justify-between items-center py-3 border-b">
|
|
87287
|
-
<div class="flex items-center gap-2">
|
|
87288
|
-
<span [ngClass]="labelClasses()" class="text-sm font-medium">Shops</span>
|
|
87289
|
-
@if (hasTooltip('shops')) {
|
|
87290
|
-
<button [ngClass]="tooltipButtonClasses()" class="w-4 h-4 rounded-full flex items-center justify-center">
|
|
87291
|
-
<svg class="w-3 h-3" fill="currentColor" viewBox="0 0 20 20">
|
|
87292
|
-
<path 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"></path>
|
|
87293
|
-
</svg>
|
|
87294
|
-
</button>
|
|
87295
|
-
}
|
|
87296
|
-
</div>
|
|
87297
|
-
<div class="text-right">
|
|
87298
|
-
<div [ngClass]="valueClasses()" class="text-sm font-semibold">
|
|
87299
|
-
{{ getShopsQuantity() }}
|
|
87300
|
-
</div>
|
|
87301
|
-
@if (getAdditionalShopsPrice()) {
|
|
87302
|
-
<div [ngClass]="subValueClasses()" class="text-xs mt-1">
|
|
87303
|
-
{{ getAdditionalShopsPrice() }}
|
|
87304
|
-
</div>
|
|
87305
|
-
}
|
|
87306
|
-
</div>
|
|
87307
|
-
</div>
|
|
87308
|
-
|
|
87309
87254
|
<div [ngClass]="featureRowClasses()" class="flex justify-between items-center py-3 border-b">
|
|
87310
87255
|
<span [ngClass]="labelClasses()" class="text-sm font-medium">Unlimited recommendations</span>
|
|
87311
87256
|
<svg [ngClass]="checkIconClasses()" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
@@ -87340,7 +87285,7 @@ class PlanCardComponent {
|
|
|
87340
87285
|
`
|
|
87341
87286
|
}]
|
|
87342
87287
|
}], 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"] }] }); })();
|
|
87343
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PlanCardComponent, { className: "PlanCardComponent", filePath: "lib/components/profile-analysis-dashboard/cards/plan-card.component.ts", lineNumber:
|
|
87288
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PlanCardComponent, { className: "PlanCardComponent", filePath: "lib/components/profile-analysis-dashboard/cards/plan-card.component.ts", lineNumber: 95 }); })();
|
|
87344
87289
|
|
|
87345
87290
|
const _forTrack0$1 = ($index, $item) => $item.planItemPrice.id;
|
|
87346
87291
|
function PlanSelectionContainerComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -88934,6 +88879,7 @@ class SymphiqProfileAnalysisDashboardComponent {
|
|
|
88934
88879
|
this.isCurrencySelectionLoading = signal(false, ...(ngDevMode ? [{ debugName: "isCurrencySelectionLoading" }] : []));
|
|
88935
88880
|
this.selectedCurrency = signal(null, ...(ngDevMode ? [{ debugName: "selectedCurrency" }] : []));
|
|
88936
88881
|
this.isPlanLoading = signal(false, ...(ngDevMode ? [{ debugName: "isPlanLoading" }] : []));
|
|
88882
|
+
this.planLoadingStartTime = signal(0, ...(ngDevMode ? [{ debugName: "planLoadingStartTime" }] : []));
|
|
88937
88883
|
this.isEditingCurrency = signal(false, ...(ngDevMode ? [{ debugName: "isEditingCurrency" }] : []));
|
|
88938
88884
|
this.editingCurrencySelection = signal(null, ...(ngDevMode ? [{ debugName: "editingCurrencySelection" }] : []));
|
|
88939
88885
|
this.selectedPeriodUnit = computed(() => {
|
|
@@ -88977,10 +88923,18 @@ class SymphiqProfileAnalysisDashboardComponent {
|
|
|
88977
88923
|
this.planLoadingEffect = effect(() => {
|
|
88978
88924
|
const planCardInfos = this.planCardInfos();
|
|
88979
88925
|
const isLoading = untracked(() => this.isPlanLoading());
|
|
88980
|
-
console.log('[planLoadingEffect] triggered', { planCardInfos: planCardInfos?.length, isPlanLoading: isLoading });
|
|
88981
88926
|
if (planCardInfos && isLoading) {
|
|
88982
|
-
|
|
88983
|
-
|
|
88927
|
+
const startTime = untracked(() => this.planLoadingStartTime());
|
|
88928
|
+
const elapsed = Date.now() - startTime;
|
|
88929
|
+
const minDelay = 300;
|
|
88930
|
+
if (elapsed >= minDelay) {
|
|
88931
|
+
this.isPlanLoading.set(false);
|
|
88932
|
+
}
|
|
88933
|
+
else {
|
|
88934
|
+
setTimeout(() => {
|
|
88935
|
+
this.isPlanLoading.set(false);
|
|
88936
|
+
}, minDelay - elapsed);
|
|
88937
|
+
}
|
|
88984
88938
|
}
|
|
88985
88939
|
}, ...(ngDevMode ? [{ debugName: "planLoadingEffect" }] : []));
|
|
88986
88940
|
this.embeddedScrollEffect = effect(() => {
|
|
@@ -89703,9 +89657,8 @@ class SymphiqProfileAnalysisDashboardComponent {
|
|
|
89703
89657
|
}
|
|
89704
89658
|
}
|
|
89705
89659
|
handlePeriodUnitChange(periodUnit) {
|
|
89706
|
-
|
|
89660
|
+
this.planLoadingStartTime.set(Date.now());
|
|
89707
89661
|
this.isPlanLoading.set(true);
|
|
89708
|
-
console.log('[handlePeriodUnitChange] isPlanLoading is now:', this.isPlanLoading());
|
|
89709
89662
|
this.periodUnitChanged.emit(periodUnit);
|
|
89710
89663
|
}
|
|
89711
89664
|
handlePlanSelection(plan) {
|