@hulkapps/app-manager-vue 3.1.23 → 3.2.0
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/dist/app-manager-vue.esm.js +1632 -17731
- package/dist/app-manager-vue.min.js +2 -9
- package/dist/app-manager-vue.ssr.js +1434 -17260
- package/dist/hulkapps-app-manager.css +1 -1
- package/dist/hulkapps-app-manager.min.css +1 -1
- package/package.json +1 -1
- package/src/components/Plans/AppManagerSliderPlan.vue +3 -1
- package/src/components/PolarisNew/PlanCardsHighlights.vue +56 -55
- package/src/components/PolarisNew/PlanTable.vue +1 -26
- package/src/components/Plans/AppManagerGroupPlan.vue +0 -949
package/package.json
CHANGED
|
@@ -196,6 +196,8 @@ import CustomizationModal from "@/components/PolarisNew/CustomizationModal.vue";
|
|
|
196
196
|
import {calculatePlanPriceWithDiscounts} from "@/helpers";
|
|
197
197
|
import PlanBanners from "@/components/Plans/PlanBanners.vue";
|
|
198
198
|
|
|
199
|
+
const APP_MANAGER_VUE_VERSION = "3.2.0";
|
|
200
|
+
|
|
199
201
|
export default {
|
|
200
202
|
name: "AppManagerSliderPlan",
|
|
201
203
|
components: {
|
|
@@ -397,7 +399,7 @@ export default {
|
|
|
397
399
|
if (this.discount_code !== null) {
|
|
398
400
|
params['discount_code'] = this.discount_code;
|
|
399
401
|
}
|
|
400
|
-
params['frontend_sdk_version'] =
|
|
402
|
+
params['frontend_sdk_version'] = APP_MANAGER_VUE_VERSION
|
|
401
403
|
let {data} = await axios.get(`${this.app_manager_config.baseUrl}/api/app-manager/plans`, {params: params}).catch(error => {
|
|
402
404
|
console.error(error)
|
|
403
405
|
});
|
|
@@ -53,65 +53,37 @@ export default {
|
|
|
53
53
|
before: 0,
|
|
54
54
|
after: 0
|
|
55
55
|
},
|
|
56
|
-
anyMonthlyPlanHasDiscount: false,
|
|
57
|
-
anyAnnuallyPlanHasDiscount: false,
|
|
58
|
-
anyMonthlyPlanHasNote: false,
|
|
59
|
-
anyAnnuallyPlanHasNote: false,
|
|
60
|
-
anyMonthlyPlanHasDetail: false,
|
|
61
|
-
anyAnnuallyPlanHasDetail: false,
|
|
62
56
|
loadingPlanId: null
|
|
63
57
|
};
|
|
64
58
|
},
|
|
65
59
|
computed: {
|
|
66
60
|
monthlyPlans() {
|
|
67
|
-
this.anyMonthlyPlanHasDiscount = false;
|
|
68
|
-
this.anyMonthlyPlanHasNote = false;
|
|
69
|
-
this.anyMonthlyPlanHasDetail = false;
|
|
70
|
-
|
|
71
61
|
return this.plans
|
|
72
62
|
.filter(plan => plan.interval === "EVERY_30_DAYS")
|
|
73
|
-
.map(plan =>
|
|
74
|
-
const planDetails = calculatePlanPriceWithDiscounts(plan, this.promotionalDiscount);
|
|
75
|
-
if (planDetails.has_discount && !this.anyMonthlyPlanHasDiscount) {
|
|
76
|
-
this.anyMonthlyPlanHasDiscount = true;
|
|
77
|
-
}
|
|
78
|
-
if (
|
|
79
|
-
plan.store_base_plan
|
|
80
|
-
&& this.anyMonthlyPlanHasNote === false
|
|
81
|
-
&& isPlanNote(this.shopifyPlan, plan, this.currentPlan, this.hasActiveCharge)
|
|
82
|
-
) {
|
|
83
|
-
this.anyMonthlyPlanHasNote = true;
|
|
84
|
-
}
|
|
85
|
-
if (this.getSortedPlanDetails(plan).length > 0 && this.anyMonthlyPlanHasDetail === false) {
|
|
86
|
-
this.anyMonthlyPlanHasDetail = true;
|
|
87
|
-
}
|
|
88
|
-
return planDetails;
|
|
89
|
-
});
|
|
63
|
+
.map(plan => calculatePlanPriceWithDiscounts(plan, this.promotionalDiscount));
|
|
90
64
|
},
|
|
91
65
|
annualPlans() {
|
|
92
|
-
this.anyAnnuallyPlanHasDiscount = false;
|
|
93
|
-
this.anyAnnuallyPlanHasNote = false;
|
|
94
|
-
this.anyAnnuallyPlanHasDetail = false;
|
|
95
|
-
|
|
96
66
|
return this.plans
|
|
97
67
|
.filter(plan => plan.interval === "ANNUAL")
|
|
98
|
-
.map(plan =>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
68
|
+
.map(plan => calculatePlanPriceWithDiscounts(plan, this.promotionalDiscount));
|
|
69
|
+
},
|
|
70
|
+
anyMonthlyPlanHasDiscount() {
|
|
71
|
+
return this.monthlyPlans.some((plan) => plan.has_discount);
|
|
72
|
+
},
|
|
73
|
+
anyAnnuallyPlanHasDiscount() {
|
|
74
|
+
return this.annualPlans.some((plan) => plan.has_discount);
|
|
75
|
+
},
|
|
76
|
+
anyMonthlyPlanHasNote() {
|
|
77
|
+
return this.monthlyPlans.some((plan) => this.hasPlanNote(plan));
|
|
78
|
+
},
|
|
79
|
+
anyAnnuallyPlanHasNote() {
|
|
80
|
+
return this.annualPlans.some((plan) => this.hasPlanNote(plan));
|
|
81
|
+
},
|
|
82
|
+
anyMonthlyPlanHasDetail() {
|
|
83
|
+
return this.monthlyPlans.some((plan) => this.hasPlanDetail(plan));
|
|
84
|
+
},
|
|
85
|
+
anyAnnuallyPlanHasDetail() {
|
|
86
|
+
return this.annualPlans.some((plan) => this.hasPlanDetail(plan));
|
|
115
87
|
},
|
|
116
88
|
isMonthlyVisible() {
|
|
117
89
|
return this.selectedInterval === "monthly";
|
|
@@ -130,9 +102,36 @@ export default {
|
|
|
130
102
|
const normalized = Number(value);
|
|
131
103
|
return Number.isNaN(normalized) ? fallback : normalized;
|
|
132
104
|
},
|
|
105
|
+
normalizePlanDetailType(type) {
|
|
106
|
+
const normalized = String(type ?? "").trim().toLowerCase();
|
|
107
|
+
|
|
108
|
+
if (normalized === "details") {
|
|
109
|
+
return "detail";
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (normalized === "highlights") {
|
|
113
|
+
return "highlight";
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return normalized;
|
|
117
|
+
},
|
|
118
|
+
hasPlanNote(plan) {
|
|
119
|
+
return isPlanNote(this.shopifyPlan, plan, this.currentPlan, this.hasActiveCharge);
|
|
120
|
+
},
|
|
121
|
+
hasPlanDetail(plan) {
|
|
122
|
+
return this.getSortedPlanDetails(plan).length > 0;
|
|
123
|
+
},
|
|
124
|
+
debugAnyPlanHasDetail(interval) {
|
|
125
|
+
const isMonthlyInterval = interval === "monthly";
|
|
126
|
+
return isMonthlyInterval ? this.anyMonthlyPlanHasDetail : this.anyAnnuallyPlanHasDetail;
|
|
127
|
+
},
|
|
128
|
+
debugPlanDetailVisibility(plan, interval) {
|
|
129
|
+
const primaryDetail = this.getPrimaryPlanDetail(plan);
|
|
130
|
+
return this.selectedInterval === interval && Boolean(primaryDetail);
|
|
131
|
+
},
|
|
133
132
|
getSortedPlanHighlights(plan) {
|
|
134
133
|
return Object.values(plan.details || {})
|
|
135
|
-
.filter((highlight) => highlight.type === "highlight")
|
|
134
|
+
.filter((highlight) => this.normalizePlanDetailType(highlight.type) === "highlight")
|
|
136
135
|
.sort((a, b) => this.normalizeSortOrder(a.sort_order) - this.normalizeSortOrder(b.sort_order))
|
|
137
136
|
.map((highlight) => ({
|
|
138
137
|
plan_id: highlight.plan_id,
|
|
@@ -147,7 +146,7 @@ export default {
|
|
|
147
146
|
},
|
|
148
147
|
getSortedPlanDetails(plan) {
|
|
149
148
|
return Object.values(plan.details || {})
|
|
150
|
-
.filter((detail) => detail.type === "detail")
|
|
149
|
+
.filter((detail) => this.normalizePlanDetailType(detail.type) === "detail")
|
|
151
150
|
.sort((a, b) => this.normalizeSortOrder(a.sort_order) - this.normalizeSortOrder(b.sort_order))
|
|
152
151
|
.map((detail) => ({
|
|
153
152
|
plan_id: detail.plan_id,
|
|
@@ -577,10 +576,10 @@ export default {
|
|
|
577
576
|
</p>
|
|
578
577
|
<h6
|
|
579
578
|
class="plan-detail"
|
|
580
|
-
v-if="
|
|
579
|
+
v-if="debugAnyPlanHasDetail('monthly')"
|
|
581
580
|
:style="{
|
|
582
581
|
visibility:
|
|
583
|
-
|
|
582
|
+
debugPlanDetailVisibility(plan, 'monthly')
|
|
584
583
|
? 'visible'
|
|
585
584
|
: 'hidden',
|
|
586
585
|
}"
|
|
@@ -740,10 +739,10 @@ export default {
|
|
|
740
739
|
</p>
|
|
741
740
|
<h6
|
|
742
741
|
class="plan-detail"
|
|
743
|
-
v-if="
|
|
742
|
+
v-if="debugAnyPlanHasDetail('annually')"
|
|
744
743
|
:style="{
|
|
745
744
|
visibility:
|
|
746
|
-
|
|
745
|
+
debugPlanDetailVisibility(plan, 'annually')
|
|
747
746
|
? 'visible'
|
|
748
747
|
: 'hidden',
|
|
749
748
|
}"
|
|
@@ -848,6 +847,7 @@ export default {
|
|
|
848
847
|
font-size: 16px;
|
|
849
848
|
font-weight: 700;
|
|
850
849
|
color: #1A1A1A;
|
|
850
|
+
text-align: center;
|
|
851
851
|
}
|
|
852
852
|
|
|
853
853
|
.card .price-wrapper {
|
|
@@ -900,7 +900,7 @@ export default {
|
|
|
900
900
|
width: 100%;
|
|
901
901
|
justify-content: center;
|
|
902
902
|
border-top: 1px solid #cccccc;
|
|
903
|
-
margin-top:
|
|
903
|
+
margin-top: auto;
|
|
904
904
|
padding-top: 12px;
|
|
905
905
|
}
|
|
906
906
|
|
|
@@ -986,6 +986,7 @@ export default {
|
|
|
986
986
|
|
|
987
987
|
.features {
|
|
988
988
|
margin-top: 19px;
|
|
989
|
+
margin-bottom: 19px;
|
|
989
990
|
}
|
|
990
991
|
|
|
991
992
|
.features ul {
|
|
@@ -582,7 +582,6 @@ export default {
|
|
|
582
582
|
anyMonthlyPlanHasDiscount ? 'has-discount' : ''
|
|
583
583
|
]"
|
|
584
584
|
>
|
|
585
|
-
<h4 class="plan-name mobile-plan-name">{{ translateMe(plan.name) }}</h4>
|
|
586
585
|
<template v-if="plan.strike_price">
|
|
587
586
|
<h5>
|
|
588
587
|
<span class="strike-price">${{ Number(plan.strike_price).toFixed(2) }}</span>
|
|
@@ -695,7 +694,6 @@ export default {
|
|
|
695
694
|
anyAnnuallyPlanHasDiscount ? 'has-discount' : ''
|
|
696
695
|
]"
|
|
697
696
|
>
|
|
698
|
-
<h4 class="plan-name mobile-plan-name">{{ translateMe(plan.name) }}</h4>
|
|
699
697
|
<template v-if="plan.strike_price">
|
|
700
698
|
<h5>
|
|
701
699
|
<span class="strike-price">${{ Number(plan.strike_price).toFixed(2) }}</span>
|
|
@@ -900,7 +898,7 @@ export default {
|
|
|
900
898
|
|
|
901
899
|
.plan-header-wrapper .price-wrapper .main-price {
|
|
902
900
|
display: flex;
|
|
903
|
-
flex-direction:
|
|
901
|
+
flex-direction: column;
|
|
904
902
|
gap: 8px;
|
|
905
903
|
justify-content: center;
|
|
906
904
|
align-items: center;
|
|
@@ -923,15 +921,6 @@ export default {
|
|
|
923
921
|
line-height: 20px;
|
|
924
922
|
font-weight: 700;
|
|
925
923
|
color: #1A1A1A;
|
|
926
|
-
width: max-content;
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
.plan-header-wrapper .price-wrapper h4.plan-name {
|
|
930
|
-
width: 100%;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
.plan-header-wrapper .price-wrapper .mobile-plan-name {
|
|
934
|
-
display: none;
|
|
935
924
|
}
|
|
936
925
|
|
|
937
926
|
.plan-header-wrapper .price-wrapper h4 h6 {
|
|
@@ -1062,20 +1051,6 @@ export default {
|
|
|
1062
1051
|
overscroll-behavior: none !important;
|
|
1063
1052
|
}
|
|
1064
1053
|
|
|
1065
|
-
@media (max-width: 1024px) {
|
|
1066
|
-
.plan-header-wrapper .price-wrapper .mobile-plan-name {
|
|
1067
|
-
display: inline-block;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
.plan-header-wrapper .price-wrapper .desktop-plan-name {
|
|
1071
|
-
display: none;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
.plan-header-wrapper .price-wrapper .main-price {
|
|
1075
|
-
flex-direction: column;
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
1054
|
@media (max-width: 640px) {
|
|
1080
1055
|
.swiper-plan-navigation {
|
|
1081
1056
|
display: none !important;
|