@hulkapps/app-manager-vue 2.4.8 → 2.4.9
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 +74 -41
- package/dist/app-manager-vue.min.js +3 -3
- package/dist/app-manager-vue.ssr.js +84 -47
- 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/AppManagerGroupPlan.vue +34 -17
- package/src/components/Plans/AppManagerSliderPlan.vue +72 -21
- package/src/components/Plans/PlanBanners.vue +63 -57
package/package.json
CHANGED
|
@@ -45,12 +45,15 @@
|
|
|
45
45
|
image="https://cdn.shopify.com/s/files/1/0262/4071/2726/files/emptystate-files.png"
|
|
46
46
|
v-if="!this.planLoading && this.plans.length === 0"
|
|
47
47
|
/>
|
|
48
|
+
|
|
49
|
+
<div v-else-if="!this.planLoading && this.plans.length > 0"> <PlanBanners position="header" @handlePlanBannerClose="handlePlanBannerClose" />
|
|
50
|
+
|
|
48
51
|
<PPage
|
|
49
52
|
class="app-manager-plan-page custom-title"
|
|
50
53
|
:title="translateMe('Plans')"
|
|
51
54
|
:subtitle = "subtitleContent"
|
|
52
|
-
v-else-if="!this.planLoading && this.plans.length > 0"
|
|
53
55
|
>
|
|
56
|
+
|
|
54
57
|
<PStack slot="primaryAction">
|
|
55
58
|
<PStackItem style="margin-top: 20px">
|
|
56
59
|
<PButtonGroup class="btn-group" segmented>
|
|
@@ -211,8 +214,7 @@
|
|
|
211
214
|
<PButton v-else-if="!plan.store_base_plan || plan.shopify_plans.includes(shop.shopify_plan)"
|
|
212
215
|
full-width
|
|
213
216
|
@click="plan ? getPlanUrl(plan):'javascript:void'"
|
|
214
|
-
|
|
215
|
-
:class="planChooseButtonClass(plan)"
|
|
217
|
+
class="custom-choose-button"
|
|
216
218
|
>
|
|
217
219
|
{{ translateMe('Choose Plan') }}
|
|
218
220
|
</PButton>
|
|
@@ -235,11 +237,12 @@
|
|
|
235
237
|
<PButton plain @click="activePlan">{{ translateMe('I will choose the plan later') }}</PButton>
|
|
236
238
|
</PStackItem>
|
|
237
239
|
</PStack>
|
|
238
|
-
<PlanBanners @handlePlanBannerClose="handlePlanBannerClose" />
|
|
240
|
+
<PlanBanners position="footer" @handlePlanBannerClose="handlePlanBannerClose" />
|
|
239
241
|
</PLayoutSection>
|
|
240
242
|
</PLayout>
|
|
241
243
|
<!--====================================================================-->
|
|
242
244
|
</PPage>
|
|
245
|
+
</div>
|
|
243
246
|
</template>
|
|
244
247
|
|
|
245
248
|
<script>
|
|
@@ -551,12 +554,12 @@
|
|
|
551
554
|
return false;
|
|
552
555
|
},
|
|
553
556
|
planChooseButtonClass(plan){
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
}
|
|
557
|
+
if(this.has_active_charge && this.shop.plan){
|
|
558
|
+
if(plan.price > this.shop.plan.price){
|
|
559
|
+
return '';
|
|
558
560
|
}
|
|
559
|
-
|
|
561
|
+
}
|
|
562
|
+
return 'custom-choose-button';
|
|
560
563
|
},
|
|
561
564
|
handlePlanBannerClose(payload) {
|
|
562
565
|
this.$emit('handlePlanBannerClose', payload)
|
|
@@ -653,7 +656,7 @@
|
|
|
653
656
|
}
|
|
654
657
|
.app-manager .app-manager-plan-page .custom-plan table tbody tr:nth-last-child(2) {
|
|
655
658
|
overflow: hidden;
|
|
656
|
-
border-bottom-right-radius:
|
|
659
|
+
border-bottom-right-radius: 0;
|
|
657
660
|
border-bottom-left-radius: 12px;
|
|
658
661
|
}
|
|
659
662
|
.app-manager .app-manager-plan-page .custom-plan table tbody tr:nth-last-child(2) td:first-child {
|
|
@@ -663,7 +666,7 @@
|
|
|
663
666
|
}
|
|
664
667
|
.app-manager .app-manager-plan-page .custom-plan table tbody tr:nth-last-child(2) td:last-child {
|
|
665
668
|
overflow: hidden;
|
|
666
|
-
border-radius: 0 0
|
|
669
|
+
border-radius: 0 0 0;
|
|
667
670
|
}
|
|
668
671
|
.app-manager .app-manager-plan-page .custom-plan table tbody tr td:first-child {
|
|
669
672
|
border-left: 0px !important;
|
|
@@ -671,13 +674,10 @@
|
|
|
671
674
|
padding-left: 20px;
|
|
672
675
|
}
|
|
673
676
|
.app-manager .app-manager-plan-page .custom-plan table tbody tr td:last-child {
|
|
674
|
-
border-right: 0px !important;
|
|
675
|
-
border-bottom: 0px !important;
|
|
676
677
|
text-align: center !important;
|
|
677
678
|
}
|
|
678
679
|
.app-manager .app-manager-plan-page .custom-plan table thead tr td:last-child {
|
|
679
|
-
|
|
680
|
-
border-bottom: 0px !important;
|
|
680
|
+
|
|
681
681
|
text-align: center !important;
|
|
682
682
|
}
|
|
683
683
|
.app-manager .app-manager-plan-page .custom-plan table tbody td:not(:first-child) {
|
|
@@ -687,8 +687,10 @@
|
|
|
687
687
|
background: transparent;
|
|
688
688
|
border-radius: 0 0 12px 0;
|
|
689
689
|
}
|
|
690
|
+
.app-manager .app-manager-plan-page .custom-plan table tbody tr:last-child td:nth-child(2){
|
|
691
|
+
border-radius: 0 0 0 12px !important;
|
|
692
|
+
}
|
|
690
693
|
.app-manager .app-manager-plan-page .custom-plan table tbody tr:last-child td {
|
|
691
|
-
border: 0 !important;
|
|
692
694
|
background: transparent;
|
|
693
695
|
}
|
|
694
696
|
.app-manager .app-manager-plan-page .custom-plan table tbody tr:last-child td:hover {
|
|
@@ -699,11 +701,12 @@
|
|
|
699
701
|
background: transparent !important;
|
|
700
702
|
}
|
|
701
703
|
.app-manager .app-manager-plan-page .custom-plan table tbody tr:last-child {
|
|
702
|
-
background:
|
|
704
|
+
background: #fff!important;
|
|
703
705
|
opacity:1.0;
|
|
704
706
|
}
|
|
705
707
|
.app-manager .app-manager-plan-page .custom-plan table tbody tr:last-child td:first-child{
|
|
706
708
|
visibility: hidden;
|
|
709
|
+
border-bottom: none!important;
|
|
707
710
|
}
|
|
708
711
|
.app-manager .app-manager-plan-page .plan-heading {
|
|
709
712
|
padding-top: 30px;
|
|
@@ -789,4 +792,18 @@
|
|
|
789
792
|
color: #fff;
|
|
790
793
|
}
|
|
791
794
|
|
|
795
|
+
@media (min-width: 0px) and (max-width: 576px) {
|
|
796
|
+
.app-manager .app-manager, .app-manager .app-manager-body {
|
|
797
|
+
overflow-x: scroll;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
@media (max-width: 700px) {
|
|
802
|
+
.app-manager .Polaris-DataTable__Table{
|
|
803
|
+
width: auto !important;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
792
809
|
</style>
|
|
@@ -46,11 +46,13 @@
|
|
|
46
46
|
v-if="!this.planLoading && this.plans.length === 0"
|
|
47
47
|
>
|
|
48
48
|
</PEmptyState>
|
|
49
|
+
<div v-else-if="!this.planLoading && this.plans.length > 0" class="app-manager-plan-banner">
|
|
50
|
+
<PlanBanners position="header" @handlePlanBannerClose="handlePlanBannerClose" />
|
|
51
|
+
|
|
49
52
|
<PPage
|
|
50
53
|
class="app-manager-plan-page-slider custom-title"
|
|
51
54
|
:title="translateMe('Plans')"
|
|
52
55
|
:subtitle = "subtitleContent"
|
|
53
|
-
v-else-if="!this.planLoading && this.plans.length > 0"
|
|
54
56
|
>
|
|
55
57
|
|
|
56
58
|
<PStack slot="primaryAction">
|
|
@@ -138,6 +140,7 @@
|
|
|
138
140
|
</div>
|
|
139
141
|
<div>
|
|
140
142
|
<ul>
|
|
143
|
+
|
|
141
144
|
<li v-for="(feature, key) in features" :class="`${feature.value_type}__type__${feature.slug} feature__list feature__type__${feature.value_type}`" :key="key" :style="activePlanStyle(plan)">
|
|
142
145
|
<div>
|
|
143
146
|
<template v-if="plan.features && plan.features[feature.uuid]" style="display: flex">
|
|
@@ -154,27 +157,28 @@
|
|
|
154
157
|
<PIcon color="subdued" source="MinusMinor"/>
|
|
155
158
|
</template>
|
|
156
159
|
</div>
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
</li>
|
|
161
|
+
<li v-if="features.length > 0" :class="`${features[features.length - 1].value_type}__type__${features[features.length - 1].slug} feature__list feature__type__${features[features.length - 1].value_type}`">
|
|
162
|
+
<div>
|
|
163
|
+
<PButton v-if="isCurrentPlan(plan)" :disabled="isCurrentPlan(plan)"
|
|
164
|
+
full-width
|
|
165
|
+
:pressed="isCurrentPlan(plan)">
|
|
162
166
|
{{ translateMe('Current Plan') }}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
full-width
|
|
174
|
-
:pressed="true">
|
|
167
|
+
</PButton>
|
|
168
|
+
<PButton v-else-if="!plan.store_base_plan || plan.shopify_plans.includes(shop.shopify_plan)"
|
|
169
|
+
full-width
|
|
170
|
+
@click="plan ? getPlanUrl(plan) : 'javascript:void'"
|
|
171
|
+
class="custom-choose-button">
|
|
172
|
+
{{ translateMe('Choose Plan') }}
|
|
173
|
+
</PButton>
|
|
174
|
+
<PButton v-else :disabled="true"
|
|
175
|
+
full-width
|
|
176
|
+
:pressed="true">
|
|
175
177
|
{{ translateMe('Not applicable') }}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
</PButton>
|
|
179
|
+
</div>
|
|
180
|
+
</li>
|
|
181
|
+
<li></li>
|
|
178
182
|
</ul>
|
|
179
183
|
</div>
|
|
180
184
|
</slide>
|
|
@@ -189,8 +193,9 @@
|
|
|
189
193
|
<PButton plain @click="activePlan">{{ translateMe('I will choose the plan later') }}</PButton>
|
|
190
194
|
</PStackItem>
|
|
191
195
|
</PStack>
|
|
192
|
-
|
|
196
|
+
<PlanBanners position="footer" @handlePlanBannerClose="handlePlanBannerClose" />
|
|
193
197
|
</PPage>
|
|
198
|
+
</div>
|
|
194
199
|
</template>
|
|
195
200
|
|
|
196
201
|
<script>
|
|
@@ -717,6 +722,10 @@
|
|
|
717
722
|
{
|
|
718
723
|
border-bottom-right-radius: 12px;
|
|
719
724
|
}
|
|
725
|
+
.app-manager .app-manager-plan-page-slider .VueCarousel-inner .VueCarousel-slide.first-slide ul li:nth-last-child(2)
|
|
726
|
+
{
|
|
727
|
+
border-bottom-left-radius: 12px;
|
|
728
|
+
}
|
|
720
729
|
.app-manager .app-manager-plan-page-slider .VueCarousel-inner .VueCarousel-slide.last-slide .plan__price
|
|
721
730
|
{
|
|
722
731
|
border-right: 1px solid #dddddd;
|
|
@@ -770,4 +779,46 @@
|
|
|
770
779
|
color: #fff;
|
|
771
780
|
}
|
|
772
781
|
|
|
782
|
+
.app-manager-plan-banner {
|
|
783
|
+
margin-right: 30px;
|
|
784
|
+
margin-left: 30px;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
@media (min-width: 0px) and (max-width: 576px) {
|
|
788
|
+
.custom-plan>.Polaris-Layout__Section>.VueCarousel>.VueCarousel-wrapper>.VueCarousel-inner {
|
|
789
|
+
overflow-x: scroll;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
@media (max-width: 700px) {
|
|
794
|
+
.Polaris-ButtonGroup__Item {
|
|
795
|
+
width: auto !important;
|
|
796
|
+
}
|
|
797
|
+
.app-manager *, .app-manager :after, .app-manager :before {
|
|
798
|
+
box-sizing: revert !important;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
@media (min-width: 0px) and (max-width: 467px) {
|
|
804
|
+
|
|
805
|
+
.pro_title , .feature__list {
|
|
806
|
+
min-height: 164px !important;
|
|
807
|
+
}
|
|
808
|
+
.app-manager .Polaris-Page-Header__RightAlign {
|
|
809
|
+
margin-left: -34px !important;
|
|
810
|
+
}
|
|
811
|
+
#app_manager > div > div.Polaris-Page-Header.Polaris-Page-Header--hasNavigation.Polaris-Page-Header--mediumTitle.Polaris-Page-Header--mobileView > div > div.Polaris-Page-Header__RightAlign > div > div > div > div > div > div:nth-child(2) > button > span > span > div > div > div > span > span > div{
|
|
812
|
+
width: 222px !important;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
@media (min-width: 467px) and (max-width: 1003px) {
|
|
816
|
+
#app_manager > div > div.Polaris-Page-Header.Polaris-Page-Header--hasNavigation.Polaris-Page-Header--mediumTitle.Polaris-Page-Header--mobileView > div > div.Polaris-Page-Header__RightAlign > div > div > div > div > div > div:nth-child(2) > button > span > span > div > div > div > span > span > div{
|
|
817
|
+
width: 222px !important;
|
|
818
|
+
}
|
|
819
|
+
.pro_title , .feature__list {
|
|
820
|
+
min-height: 117px !important;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
|
|
773
824
|
</style>
|
|
@@ -1,70 +1,76 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<PLayoutSection class="app-manager-plan-footer"
|
|
3
|
-
v-if="
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</div>
|
|
3
|
+
v-if="filteredPlans && filteredPlans.length">
|
|
4
|
+
<div v-for="(plan, key) in filteredPlans" :key="key">
|
|
5
|
+
<PBanner
|
|
6
|
+
v-if="plan.type === 'banner'"
|
|
7
|
+
:id="`static-content-${plan.position}-${key}`"
|
|
8
|
+
:status="plan.status"
|
|
9
|
+
@dismiss="() => dismissBanner(key)"
|
|
10
|
+
>
|
|
11
|
+
<div v-html="translateMe(plan.content)"></div>
|
|
12
|
+
</PBanner>
|
|
13
|
+
<div v-else v-html="translateMe(plan.content)"></div>
|
|
14
|
+
</div>
|
|
16
15
|
</PLayoutSection>
|
|
17
16
|
</template>
|
|
18
17
|
|
|
19
18
|
<script>
|
|
19
|
+
import axios from 'axios'
|
|
20
|
+
import { PLayoutSection } from "../polaris-vue/src/components/PLayout/components/PLayoutSection";
|
|
21
|
+
import { PBanner } from "../polaris-vue/src/components/PBanner";
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
staticContent: {}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
computed: {
|
|
33
|
-
mappedStaticContentPlan() {
|
|
34
|
-
return this.staticContent['plans'];
|
|
35
|
-
},
|
|
23
|
+
export default {
|
|
24
|
+
components: { PBanner, PLayoutSection },
|
|
25
|
+
name: "PlanBanners",
|
|
26
|
+
props: {
|
|
27
|
+
position: {
|
|
28
|
+
type: String,
|
|
29
|
+
validator(value) {
|
|
30
|
+
return ['header', 'footer'].includes(value)
|
|
36
31
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
32
|
+
default: 'header'
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
staticContent: {}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
filteredPlans() {
|
|
42
|
+
if (!this.staticContent || !this.staticContent.plans) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
return this.staticContent.plans
|
|
46
|
+
.flat() // Flatten the array of plans if they are nested
|
|
47
|
+
.filter(plan => plan.position === this.position);
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
methods: {
|
|
51
|
+
translateMe(message) {
|
|
52
|
+
return this.$translations.hasOwnProperty(message) ? this.$translations[message] : message;
|
|
53
|
+
},
|
|
54
|
+
dismissBanner(key) {
|
|
55
|
+
this.$emit('handlePlanBannerClose', { action: 'close', type: 'plan banners' });
|
|
56
|
+
let planIndex = this.filteredPlans.findIndex((plan, index) => index === key);
|
|
57
|
+
if (planIndex !== -1) {
|
|
58
|
+
this.staticContent.plans.splice(planIndex, 1);
|
|
62
59
|
}
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
async mounted() {
|
|
63
|
+
const { data } = await axios.get(`${this.app_manager_config.baseUrl}/api/app-manager/marketing-banners`).catch(error => {
|
|
64
|
+
console.error(error)
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
this.staticContent = data.banners || {};
|
|
63
68
|
}
|
|
69
|
+
}
|
|
64
70
|
</script>
|
|
65
71
|
|
|
66
72
|
<style scoped>
|
|
67
|
-
.app-manager-plan-footer.Polaris-Layout__Section{
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
</style>
|
|
73
|
+
.app-manager-plan-footer.Polaris-Layout__Section {
|
|
74
|
+
margin-bottom: 20px;
|
|
75
|
+
}
|
|
76
|
+
</style>
|