@hulkapps/app-manager-vue 3.1.7 → 3.1.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": "3.1.7",
3
+ "version": "3.1.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",
@@ -53,7 +53,8 @@
53
53
  </strong>
54
54
  </SelectButton>
55
55
  </div>
56
- <ToggleButton
56
+ <!-- -------------------- Bundle Plan Toggle -------------------- -->
57
+ <!-- <ToggleButton
57
58
  id="pricing-tab"
58
59
  v-if="bundle_plan !== null"
59
60
  :toggled="selectedPlan === 'bundle'"
@@ -65,7 +66,7 @@
65
66
  <span>{{ translateMe(Math.floor((Number(bundle_plan.discount * 100) / bundle_plan.price) / 10) * 10) }}%</span>
66
67
  <span>{{ translateMe('Off') }}</span>
67
68
  </strong>
68
- </ToggleButton>
69
+ </ToggleButton> -->
69
70
  </div>
70
71
  <PlanShowcaseBanner
71
72
  v-if="bundle_plan"
@@ -97,6 +98,7 @@
97
98
  :plans="plans"
98
99
  :features="features"
99
100
  :currentPlan="plan"
101
+ :hasActiveCharge="has_active_charge"
100
102
  :shopifyPlan="shopify_plan"
101
103
  :promotionalDiscount="promotional_discount"
102
104
  :selectedInterval="selectedPlan"
@@ -109,6 +111,7 @@
109
111
  <PlanTable
110
112
  :plans="plans"
111
113
  :currentPlan="plan"
114
+ :hasActiveCharge="has_active_charge"
112
115
  :shopifyPlan="shopify_plan"
113
116
  :promotionalDiscount="promotional_discount"
114
117
  :selectedInterval="selectedPlan"
@@ -136,12 +139,13 @@
136
139
  :buttonText="translateMe('Get customization now')"
137
140
  style="flex-basis: 30%; flex-grow: 1;"
138
141
  /> -->
139
- <BundlePlanCard
142
+ <!-- -------------------- Bundle Block -------------------- -->
143
+ <!-- <BundlePlanCard
140
144
  v-if="bundle_plan"
141
145
  :plan="bundle_plan"
142
146
  :plan_details="bundle_details"
143
147
  @plan-clicked="selectPlan"
144
- />
148
+ /> -->
145
149
  </div>
146
150
  <CustomizationModal
147
151
  :visible="this.showCustomizationModal"
@@ -188,7 +192,7 @@ import GetCustomBlock from "../PolarisNew/GetCustomBlock.vue";
188
192
  import PlanTable from "../PolarisNew/PlanTable.vue";
189
193
  import BundlePlanCard from "../PolarisNew/BundlePlanCard.vue";
190
194
  import CustomizationModal from "@/components/PolarisNew/CustomizationModal.vue";
191
- import { calculatePlanPriceWithDiscounts } from "@/helpers";
195
+ import {calculatePlanPriceWithDiscounts} from "@/helpers";
192
196
  import PlanBanners from "@/components/Plans/PlanBanners.vue";
193
197
 
194
198
  export default {
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  import VariantButton from "./VariantButton";
3
3
  import Swiper, {Navigation, Pagination} from "swiper";
4
- import {calculatePlanPriceWithDiscounts, isPlanButtonDisabled, formatFeature, getPlanButtonText} from "@/helpers";
4
+ import {calculatePlanPriceWithDiscounts, isPlanButtonDisabled, formatFeature, getPlanButtonText, isPlanNote} from "@/helpers";
5
5
 
6
6
  export default {
7
7
  name: "PlanCardsHighlights",
@@ -17,6 +17,10 @@ export default {
17
17
  type: Object,
18
18
  required: false,
19
19
  },
20
+ hasActiveCharge: {
21
+ type: Boolean,
22
+ required: false,
23
+ },
20
24
  shopifyPlan: {
21
25
  type: String,
22
26
  required: false,
@@ -51,6 +55,8 @@ export default {
51
55
  },
52
56
  anyMonthlyPlanHasDiscount: false,
53
57
  anyAnnuallyPlanHasDiscount: false,
58
+ anyMonthlyPlanHasNote: false,
59
+ anyAnnuallyPlanHasNote: false,
54
60
  loadingPlanId: null
55
61
  };
56
62
  },
@@ -63,6 +69,13 @@ export default {
63
69
  if (planDetails.has_discount && !this.anyMonthlyPlanHasDiscount) {
64
70
  this.anyMonthlyPlanHasDiscount = true;
65
71
  }
72
+ if (
73
+ plan.store_base_plan
74
+ && this.anyMonthlyPlanHasNote === false
75
+ && isPlanNote(this.shopifyPlan, plan, this.currentPlan, this.hasActiveCharge)
76
+ ) {
77
+ this.anyMonthlyPlanHasNote = true;
78
+ }
66
79
  return planDetails;
67
80
  });
68
81
  },
@@ -74,6 +87,13 @@ export default {
74
87
  if (planDetails.has_discount && !this.anyAnnuallyPlanHasDiscount) {
75
88
  this.anyAnnuallyPlanHasDiscount = true;
76
89
  }
90
+ if (
91
+ plan.store_base_plan
92
+ && this.anyAnnuallyPlanHasNote === false
93
+ && isPlanNote(this.shopifyPlan, plan, this.currentPlan, this.hasActiveCharge)
94
+ ) {
95
+ this.anyAnnuallyPlanHasNote = true;
96
+ }
77
97
  return planDetails;
78
98
  });
79
99
  },
@@ -113,6 +133,7 @@ export default {
113
133
  },
114
134
  methods: {
115
135
  getPlanButtonText,
136
+ isPlanNote,
116
137
  isPlanButtonDisabled,
117
138
  formatFeature,
118
139
  async handlePlanClick(plan) {
@@ -428,12 +449,23 @@ export default {
428
449
  </h6>
429
450
  <VariantButton
430
451
  :variant="'secondary'"
431
- :disabled="isPlanButtonDisabled(shopifyPlan, plan, currentPlan)"
452
+ :disabled="isPlanButtonDisabled(shopifyPlan, plan, currentPlan, hasActiveCharge)"
432
453
  :loading="loadingPlanId === plan.id"
433
454
  @click="handlePlanClick(plan)"
434
- >{{ getPlanButtonText(shopifyPlan, plan, translateMe, currentPlan) }}
435
- </VariantButton
455
+ >{{ getPlanButtonText(shopifyPlan, plan, translateMe, currentPlan, false, hasActiveCharge) }}
456
+ </VariantButton>
457
+ <h6
458
+ class="trial_days"
459
+ :style="{
460
+ visibility:
461
+ plan.trial_days > 0
462
+ && selectedInterval === 'monthly'
463
+ ? 'visible'
464
+ : 'hidden',
465
+ }"
436
466
  >
467
+ {{plan.trial_days + translateMe("-") + translateMe("day free trial") }}
468
+ </h6>
437
469
  <div class="features">
438
470
  <ul>
439
471
  <li
@@ -463,6 +495,19 @@ export default {
463
495
  </li>
464
496
  </ul>
465
497
  </div>
498
+ <p
499
+ class="plan-note"
500
+ v-if="anyMonthlyPlanHasNote"
501
+ :style="{
502
+ visibility:
503
+ selectedInterval === 'monthly'
504
+ && isPlanNote(shopifyPlan, plan, currentPlan, hasActiveCharge)
505
+ ? 'visible'
506
+ : 'hidden',
507
+ }"
508
+ >
509
+ {{ translateMe('Note: On account of your recent Shopify plan upgrade, you should consider upgrading your current app plan') }}
510
+ </p>
466
511
  </div>
467
512
  </div>
468
513
  </div>
@@ -535,12 +580,23 @@ export default {
535
580
  </h6>
536
581
  <VariantButton
537
582
  :variant="'secondary'"
538
- :disabled="isPlanButtonDisabled(shopifyPlan, plan, currentPlan)"
583
+ :disabled="isPlanButtonDisabled(shopifyPlan, plan, currentPlan, hasActiveCharge)"
539
584
  :loading="loadingPlanId === plan.id"
540
585
  @click="handlePlanClick(plan)"
541
- >{{ getPlanButtonText(shopifyPlan, plan, translateMe, currentPlan) }}
542
- </VariantButton
586
+ >{{ getPlanButtonText(shopifyPlan, plan, translateMe, currentPlan, false, hasActiveCharge) }}
587
+ </VariantButton>
588
+ <h6
589
+ class="trial_days"
590
+ :style="{
591
+ visibility:
592
+ plan.trial_days > 0
593
+ && selectedInterval === 'annually'
594
+ ? 'visible'
595
+ : 'hidden',
596
+ }"
543
597
  >
598
+ {{plan.trial_days + translateMe("-") + translateMe("day free trial") }}
599
+ </h6>
544
600
  <div class="features">
545
601
  <ul>
546
602
  <li
@@ -570,6 +626,19 @@ export default {
570
626
  </li>
571
627
  </ul>
572
628
  </div>
629
+ <p
630
+ class="plan-note"
631
+ v-if="anyAnnuallyPlanHasNote"
632
+ :style="{
633
+ visibility:
634
+ selectedInterval === 'annually'
635
+ && isPlanNote(shopifyPlan, plan, currentPlan, hasActiveCharge)
636
+ ? 'visible'
637
+ : 'hidden',
638
+ }"
639
+ >
640
+ {{ translateMe('Note: On account of your recent Shopify plan upgrade, you should consider upgrading your current app plan') }}
641
+ </p>
573
642
  </div>
574
643
  </div>
575
644
  </div>
@@ -665,12 +734,19 @@ export default {
665
734
  line-height: 0;
666
735
  }
667
736
 
668
- .card .description {
737
+ .card .trial_days,
738
+ .card .description,
739
+ .card .plan-note {
669
740
  font-size: 13px;
670
741
  font-weight: 400;
671
742
  color: #4A4A4A;
672
743
  }
673
744
 
745
+ .card .plan-note {
746
+ margin-top: 8px;
747
+ text-align: center;
748
+ }
749
+
674
750
  .button {
675
751
  display: flex;
676
752
  justify-content: center;
@@ -35,6 +35,10 @@ export default {
35
35
  type: Object,
36
36
  required: false,
37
37
  },
38
+ hasActiveCharge: {
39
+ type: Boolean,
40
+ required: false,
41
+ },
38
42
  shopifyPlan: {
39
43
  type: String,
40
44
  required: false,
@@ -574,11 +578,11 @@ export default {
574
578
  </div>
575
579
  <VariantButton
576
580
  :variant="'secondary'"
577
- :disabled="isPlanButtonDisabled(shopifyPlan, plan, currentPlan)"
581
+ :disabled="isPlanButtonDisabled(shopifyPlan, plan, currentPlan, hasActiveCharge)"
578
582
  :loading="loadingPlanId === plan.id"
579
583
  @click="handlePlanClick(plan)"
580
584
  class="button"
581
- >{{ getPlanButtonText(shopifyPlan, plan, translateMe, currentPlan, true) }}</VariantButton>
585
+ >{{ getPlanButtonText(shopifyPlan, plan, translateMe, currentPlan, true, hasActiveCharge) }}</VariantButton>
582
586
  </div>
583
587
  <template v-for="group in monthlyPlansFeatures">
584
588
  <div v-if="group.name" class="feature-group-header plan-feature plan-feature-monthly">
@@ -687,11 +691,11 @@ export default {
687
691
  </div>
688
692
  <VariantButton
689
693
  :variant="'secondary'"
690
- :disabled="isPlanButtonDisabled(shopifyPlan, plan, currentPlan)"
694
+ :disabled="isPlanButtonDisabled(shopifyPlan, plan, currentPlan, hasActiveCharge)"
691
695
  :loading="loadingPlanId === plan.id"
692
696
  @click="handlePlanClick(plan)"
693
697
  class="button"
694
- >{{ getPlanButtonText(shopifyPlan, plan, translateMe, currentPlan, true) }}</VariantButton>
698
+ >{{ getPlanButtonText(shopifyPlan, plan, translateMe, currentPlan, true, hasActiveCharge) }}</VariantButton>
695
699
  </div>
696
700
  <template v-for="group in annualPlansFeatures">
697
701
  <div v-if="group.name" class="feature-group-header plan-feature plan-feature-annually">