@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hulkapps/app-manager-vue",
3
- "version": "2.4.8",
3
+ "version": "2.4.9",
4
4
  "description": "Vue SDK to render app manager contents",
5
5
  "main": "dist/app-manager-vue.ssr.js",
6
6
  "browser": "dist/app-manager-vue.esm.js",
@@ -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
- :primary="isPlanButtonColor(plan)"
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
- if(this.has_active_charge && this.shop.plan){
555
- if(plan.price > this.shop.plan.price){
556
- return '';
557
- }
557
+ if(this.has_active_charge && this.shop.plan){
558
+ if(plan.price > this.shop.plan.price){
559
+ return '';
558
560
  }
559
- return 'custom-choose-button';
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: 12px;
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 12px;
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
- border-right: 0px !important;
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: transparent;
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
- </li>
158
- <li>
159
- <PButton v-if="isCurrentPlan(plan)" :disabled="isCurrentPlan(plan)"
160
- full-width
161
- :pressed="isCurrentPlan(plan)">
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
- </PButton>
164
- <PButton v-else-if="!plan.store_base_plan || plan.shopify_plans.includes(shop.shopify_plan)"
165
- full-width
166
- @click="plan ? getPlanUrl(plan):'javascript:void'"
167
- :primary="isPlanButtonColor(plan)"
168
- :class="planChooseButtonClass(plan)"
169
- >
170
- {{ translateMe('Choose Plan') }}
171
- </PButton>
172
- <PButton v-else :disabled="true"
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
- </PButton>
177
- </li>
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
- <PlanBanners @handlePlanBannerClose="handlePlanBannerClose" />
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="mappedStaticContentPlan && mappedStaticContentPlan.length">
4
- <div v-for="(staticContent, key) in mappedStaticContentPlan" :key="key">
5
-
6
- <PBanner
7
- v-if="staticContent.type === 'banner'"
8
- :id="`static-content-header-${key}`"
9
- :status="staticContent.status"
10
- @dismiss="() => dismissBanner(key)"
11
- >
12
- <div v-html="translateMe(staticContent.content)"></div>
13
- </PBanner>
14
- <div v-else v-html="translateMe(staticContent.content)"></div>
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
- import axios from 'axios'
22
- import {PLayoutSection} from "../polaris-vue/src/components/PLayout/components/PLayoutSection";
23
- import {PBanner} from "../polaris-vue/src/components/PBanner";
24
- export default {
25
- components: { PBanner, PLayoutSection },
26
- name: "PlanBanners",
27
- data() {
28
- return {
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
- methods: {
38
- translateMe(message) {
39
- return this.$translations.hasOwnProperty(message) ? this.$translations[message] : message;
40
- },
41
- dismissBanner(key) {
42
- this.$emit('handlePlanBannerClose', {action:'close',type: 'plan banners'})
43
- this.staticContent['plans'].splice(key, 1);
44
- },
45
- },
46
- async mounted() {
47
-
48
- const { data } = await axios.get(`${this.app_manager_config.baseUrl}/api/app-manager/marketing-banners`).catch(error => {
49
- console.error(error)
50
- });
51
-
52
- this.staticContent = data.banners
53
- Object.keys(this.staticContent).map((key) => {
54
- if (this.staticContent[key].length) {
55
- Object.keys(this.staticContent[key]).map((index) => {
56
- if (this.staticContent[key][index].length) {
57
- this.staticContent[key][index] = this.staticContent[key][index][Math.floor(Math.random()*this.staticContent[key][index].length)]
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
- margin-bottom: 20px;
69
- }
70
- </style>
73
+ .app-manager-plan-footer.Polaris-Layout__Section {
74
+ margin-bottom: 20px;
75
+ }
76
+ </style>