@kompasid/lit-web-components 0.7.4 → 0.7.6
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/demo/index.html +1 -1
- package/dist/src/components/kompasid-grace-period/KompasGracePeriod.d.ts +32 -2
- package/dist/src/components/kompasid-grace-period/KompasGracePeriod.js +110 -4
- package/dist/src/components/kompasid-grace-period/KompasGracePeriod.js.map +1 -1
- package/dist/src/components/kompasid-paywall-body/KompasPaywallBody.js +136 -186
- package/dist/src/components/kompasid-paywall-body/KompasPaywallBody.js.map +1 -1
- package/dist/tailwind/tailwind.js +117 -22
- package/dist/tailwind/tailwind.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/kompasid-grace-period/KompasGracePeriod.ts +74 -3
- package/src/components/kompasid-grace-period/readme.md +21 -7
- package/src/components/kompasid-paywall-body/KompasPaywallBody.ts +186 -188
- package/tailwind/tailwind.css +117 -22
- package/tailwind/tailwind.ts +117 -22
|
@@ -488,12 +488,12 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
488
488
|
*/
|
|
489
489
|
headerSection(type, title) {
|
|
490
490
|
let buttonContent;
|
|
491
|
+
const textColorClass = this.isDark ? 'text-blue-300' : 'text-blue-600';
|
|
492
|
+
const buttonTextColorClass = this.isDark ? 'text-white' : 'text-grey-600';
|
|
491
493
|
if (type === 'epaper') {
|
|
492
494
|
buttonContent = html ` <button
|
|
493
495
|
@click=${this.redirectToPrevUrl}
|
|
494
|
-
class="hidden md:block w-8 h-8 pl-4 ${
|
|
495
|
-
? 'text-blue-300'
|
|
496
|
-
: 'text-blue-600'}"
|
|
496
|
+
class="hidden md:block w-8 h-8 pl-4 ${textColorClass}"
|
|
497
497
|
>
|
|
498
498
|
${unsafeSVG(getFontAwesomeIcon('fas', 'arrow-left'))}
|
|
499
499
|
</button>`;
|
|
@@ -501,9 +501,7 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
501
501
|
else if (type === 'audio') {
|
|
502
502
|
buttonContent = html ` <button
|
|
503
503
|
@click=${this.togglePaywall}
|
|
504
|
-
class="hidden md:block w-8 h-8 pl-4 ${
|
|
505
|
-
? 'text-blue-300'
|
|
506
|
-
: 'text-blue-600'}"
|
|
504
|
+
class="hidden md:block w-8 h-8 pl-4 ${textColorClass}"
|
|
507
505
|
>
|
|
508
506
|
${unsafeSVG(getFontAwesomeIcon('fas', 'xmark', 24, 24))}
|
|
509
507
|
</button>`;
|
|
@@ -511,7 +509,7 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
511
509
|
else {
|
|
512
510
|
buttonContent = nothing;
|
|
513
511
|
}
|
|
514
|
-
const headerClass = `text-base flex justify-center self-center md:block md:text-xl ${
|
|
512
|
+
const headerClass = `text-base flex justify-center self-center md:block md:text-xl ${buttonTextColorClass} text-center font-lora font-bold tracking-wide md:tracking-normal max-w-xs sm:max-w-lg md:w-full md:max-w-full ${type === 'audio' && 'sm:px-16 md:px-20'}`;
|
|
515
513
|
return html `
|
|
516
514
|
<div class="flex w-full items-start justify-center">
|
|
517
515
|
${buttonContent}
|
|
@@ -523,17 +521,18 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
523
521
|
`;
|
|
524
522
|
}
|
|
525
523
|
descriptionSection(data) {
|
|
526
|
-
|
|
527
|
-
|
|
524
|
+
const spaceYClass = this.type === 'audio' ? 'space-y-2 md:space-y-1' : 'space-y-2';
|
|
525
|
+
const textColorClass = this.isDark ? 'text-green-400' : 'text-green-500';
|
|
526
|
+
const buttonTextColorClass = this.isDark ? 'text-white' : 'text-grey-600';
|
|
527
|
+
return html ` <div class=" flex flex-col items-center">
|
|
528
|
+
<div class="flex flex-col md:max-w-[464px] mt-2.5 md:mt-3 ${spaceYClass}">
|
|
528
529
|
${data.map(item => html `
|
|
529
530
|
<div class="flex items-center">
|
|
530
|
-
<div class
|
|
531
|
+
<div class="${textColorClass}">
|
|
531
532
|
${unsafeSVG(getFontAwesomeIcon('fas', 'check', 12, 12))}
|
|
532
533
|
</div>
|
|
533
534
|
<h6
|
|
534
|
-
class="text-xs md:text-base ${
|
|
535
|
-
? 'text-white'
|
|
536
|
-
: 'text-grey-600'} ml-0.5 md:ml-1"
|
|
535
|
+
class="text-xs md:text-base ml-0.5 md:ml-1 ${buttonTextColorClass}"
|
|
537
536
|
>
|
|
538
537
|
${item}
|
|
539
538
|
</h6>
|
|
@@ -543,18 +542,20 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
543
542
|
</div>`;
|
|
544
543
|
}
|
|
545
544
|
informationPackages() {
|
|
546
|
-
|
|
545
|
+
const marginTopClass = this.type === 'audio' ? 'mt-4 md:mt-2' : 'mt-4';
|
|
546
|
+
const textColorClass = this.isDark ? 'text-blue-300' : 'text-blue-600';
|
|
547
|
+
return html ` <div class="flex justify-center ${marginTopClass}">
|
|
547
548
|
<button
|
|
548
549
|
@click=${this.otherPackagesClicked}
|
|
549
|
-
class="text-sm md:text-base font-bold ${
|
|
550
|
-
? 'text-blue-300'
|
|
551
|
-
: 'text-blue-600'} underline"
|
|
550
|
+
class="text-sm md:text-base font-bold underline ${textColorClass}"
|
|
552
551
|
>
|
|
553
552
|
Lihat Paket Lainnya
|
|
554
553
|
</button>
|
|
555
554
|
</div>`;
|
|
556
555
|
}
|
|
557
556
|
epaperRegistrationSection() {
|
|
557
|
+
const textColorClass = this.isDark ? 'text-blue-300' : 'text-blue-600';
|
|
558
|
+
const buttonTextColorClass = this.isDark ? 'text-white' : 'text-grey-600';
|
|
558
559
|
return html `
|
|
559
560
|
<div>
|
|
560
561
|
<button
|
|
@@ -562,49 +563,39 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
562
563
|
loc: 'hard_paywall',
|
|
563
564
|
next: this.epaperHost + window.location.pathname,
|
|
564
565
|
})}
|
|
565
|
-
class="text-sm md:text-base font-bold ${
|
|
566
|
-
? 'text-blue-300'
|
|
567
|
-
: 'text-blue-600'} underline"
|
|
566
|
+
class="text-sm md:text-base font-bold underline ${textColorClass}"
|
|
568
567
|
>
|
|
569
568
|
Masuk
|
|
570
569
|
</button>
|
|
571
|
-
<span class
|
|
572
|
-
jika sudah berlangganan.</span
|
|
573
|
-
>
|
|
570
|
+
<span class="${buttonTextColorClass}">jika sudah berlangganan.</span>
|
|
574
571
|
</div>
|
|
575
572
|
`;
|
|
576
573
|
}
|
|
577
574
|
regulerRegistrationSection() {
|
|
575
|
+
const textColorClass = this.isDark ? 'text-blue-300' : 'text-blue-600';
|
|
576
|
+
const buttonTextColorClass = this.isDark ? 'text-white' : 'text-grey-600';
|
|
578
577
|
return html `
|
|
579
578
|
<div class="flex flex-col items-center justify-center">
|
|
580
579
|
<div>
|
|
581
580
|
<button
|
|
582
581
|
@click=${() => redirectToRegister('hard_paywall')}
|
|
583
|
-
class="text-sm md:text-base font-bold ${
|
|
584
|
-
? 'text-blue-300'
|
|
585
|
-
: 'text-blue-600'} underline"
|
|
582
|
+
class="text-sm md:text-base font-bold underline ${textColorClass}"
|
|
586
583
|
>
|
|
587
584
|
Daftar
|
|
588
585
|
</button>
|
|
589
|
-
<span class
|
|
590
|
-
untuk kuota artikel gratis</span
|
|
586
|
+
<span class="${buttonTextColorClass}"
|
|
587
|
+
>untuk kuota artikel gratis</span
|
|
591
588
|
>
|
|
592
589
|
</div>
|
|
593
590
|
<div>
|
|
594
|
-
<span class
|
|
595
|
-
>atau
|
|
596
|
-
</span>
|
|
591
|
+
<span class="${buttonTextColorClass}">atau</span>
|
|
597
592
|
<button
|
|
598
593
|
@click=${() => redirectToLogin({ loc: 'hard_paywall' })}
|
|
599
|
-
class="text-sm md:text-base font-bold ${
|
|
600
|
-
? 'text-blue-300'
|
|
601
|
-
: 'text-blue-600'} underline"
|
|
594
|
+
class="text-sm md:text-base font-bold underline ${textColorClass}"
|
|
602
595
|
>
|
|
603
596
|
Masuk
|
|
604
597
|
</button>
|
|
605
|
-
<span class
|
|
606
|
-
jika sudah punya akun.</span
|
|
607
|
-
>
|
|
598
|
+
<span class="${buttonTextColorClass}">jika sudah punya akun.</span>
|
|
608
599
|
</div>
|
|
609
600
|
</div>
|
|
610
601
|
`;
|
|
@@ -617,19 +608,20 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
617
608
|
paymentMobileExtension(data) {
|
|
618
609
|
return html `
|
|
619
610
|
<div
|
|
620
|
-
class="w-full ${this.isDark
|
|
611
|
+
class="w-full max-w-xs mb-1 ml-8 md:hidden absolute px-4 ${this.isDark
|
|
621
612
|
? '-bottom-6'
|
|
622
|
-
: 'bottom-0'}
|
|
613
|
+
: 'bottom-0'}"
|
|
623
614
|
>
|
|
624
615
|
<div
|
|
625
|
-
class="w-full ${this.isDark
|
|
616
|
+
class="w-full rounded p-3 max-w-xs ${this.isDark
|
|
626
617
|
? 'bg-dark-6 border-dark-6'
|
|
627
|
-
: 'bg-white border-white'}
|
|
618
|
+
: 'bg-white border-white'}"
|
|
628
619
|
>
|
|
629
620
|
<svg
|
|
630
|
-
class="right-0 ${this
|
|
621
|
+
class="right-0 h-4 mr-10 -mt-7 z-0 transform rotate-180 absolute ${this
|
|
622
|
+
.isDark
|
|
631
623
|
? 'text-dark-6 border-dark-6'
|
|
632
|
-
: 'text-white border-white '}
|
|
624
|
+
: 'text-white border-white '}"
|
|
633
625
|
x="0px"
|
|
634
626
|
y="0px"
|
|
635
627
|
viewBox="0 0 255 255"
|
|
@@ -637,7 +629,7 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
637
629
|
<polygon class="fill-current" points="0,0 127.5,127.5 255,0" />
|
|
638
630
|
</svg>
|
|
639
631
|
<div
|
|
640
|
-
class="grid place-items-center items-center grid-flow-row grid-cols-5 grid-rows-2
|
|
632
|
+
class="grid place-items-center items-center grid-flow-row grid-cols-5 grid-rows-2 gap-y-4"
|
|
641
633
|
>
|
|
642
634
|
${data.map(item => html `<img
|
|
643
635
|
class="object-cover"
|
|
@@ -650,34 +642,27 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
650
642
|
`;
|
|
651
643
|
}
|
|
652
644
|
primaryPackages(product) {
|
|
645
|
+
const { isDark } = this;
|
|
646
|
+
const isAudio = this.type === 'audio';
|
|
647
|
+
const containerClass = `flex flex-wrap justify-between h-[68px] items-center rounded-lg md:mx-0 w-full max-w-xs md:max-w-sm md:w-3/5 mt-2.5${isDark ? ' bg-grey-600' : ' bg-white'}${isAudio ? ' md:mt-3' : ' md:mt-4'} border border-yellow-400 relative`;
|
|
648
|
+
const textColorClass = isDark ? 'text-dark-7' : 'text-grey-600';
|
|
649
|
+
const buttonClass = `h-8 rounded mr-4 flex items-center${isDark ? ' bg-green-300 border border-green-400' : ' bg-green-500'}`;
|
|
650
|
+
const buttonTextClass = `text-xs md:text-sm font-bold py-2 px-4${isDark ? ' text-black' : ' text-white'}`;
|
|
653
651
|
return html `
|
|
654
|
-
<div
|
|
655
|
-
class="flex flex-wrap justify-between h-[68px] items-center ${this
|
|
656
|
-
.isDark
|
|
657
|
-
? 'bg-grey-600'
|
|
658
|
-
: 'bg-white'} rounded-lg md:mx-0 w-full max-w-xs md:max-w-sm md:w-3/5 mt-2.5 md:mt-4 border border-yellow-400 relative"
|
|
659
|
-
>
|
|
652
|
+
<div class="${containerClass}">
|
|
660
653
|
<div class="flex flex-col py-3 px-4">
|
|
661
654
|
<div class="flex flex-none items-center">
|
|
662
655
|
<h5 class="text-base md:text-lg font-bold text-orange-400">
|
|
663
656
|
${formatRupiah(product.price)}
|
|
664
657
|
</h5>
|
|
665
|
-
<h6
|
|
666
|
-
class="text-xs md:text-base ${this.isDark
|
|
667
|
-
? 'text-dark-7'
|
|
668
|
-
: 'text-grey-600'} font-bold pl-1"
|
|
669
|
-
>
|
|
658
|
+
<h6 class="text-xs md:text-base font-bold pl-1 ${textColorClass}">
|
|
670
659
|
/ ${product.periode}
|
|
671
660
|
</h6>
|
|
672
661
|
</div>
|
|
673
662
|
${product.savingPrice
|
|
674
663
|
? html `
|
|
675
664
|
<div class="flex items-center">
|
|
676
|
-
<p
|
|
677
|
-
class="text-xs ${this.isDark
|
|
678
|
-
? 'text-dark-7'
|
|
679
|
-
: 'text-grey-600'}"
|
|
680
|
-
>
|
|
665
|
+
<p class="text-xs ${textColorClass}">
|
|
681
666
|
hanya
|
|
682
667
|
<span class="text-orange-400"
|
|
683
668
|
>${formatRupiah(product.savingPrice)}</span
|
|
@@ -689,18 +674,10 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
689
674
|
: nothing}
|
|
690
675
|
</div>
|
|
691
676
|
<button
|
|
692
|
-
class="
|
|
693
|
-
? 'bg-green-300 border border-green-400'
|
|
694
|
-
: 'bg-green-500'} rounded mr-4 flex items-center"
|
|
677
|
+
class="${buttonClass}"
|
|
695
678
|
@click=${() => this.redirectToCheckout(product.url, product.package, product.subscriptionId, product.price, product.position)}
|
|
696
679
|
>
|
|
697
|
-
<h6
|
|
698
|
-
class="text-xs md:text-sm ${this.isDark
|
|
699
|
-
? 'text-black'
|
|
700
|
-
: 'text-white'} font-bold py-2 px-4"
|
|
701
|
-
>
|
|
702
|
-
Langganan
|
|
703
|
-
</h6>
|
|
680
|
+
<h6 class="${buttonTextClass}">Langganan</h6>
|
|
704
681
|
</button>
|
|
705
682
|
<div class="absolute -top-2 left-4">
|
|
706
683
|
<div class="rounded bg-yellow-300 px-2 py-0.5 text-xs">
|
|
@@ -711,33 +688,27 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
711
688
|
`;
|
|
712
689
|
}
|
|
713
690
|
secondaryPackages(product) {
|
|
691
|
+
const { isDark } = this;
|
|
692
|
+
const isAudio = this.type === 'audio';
|
|
693
|
+
const containerClass = `flex flex-wrap items-center justify-between py-3 px-4 rounded-lg md:mx-0 w-full h-[68px] max-w-xs md:max-w-sm md:w-3/5 mt-3${isDark ? ' bg-grey-600' : ' bg-white'}${isAudio ? ' md:mt-2.5' : ' md:mt-4'}`;
|
|
694
|
+
const textColorClass = isDark ? 'text-dark-7' : 'text-grey-600';
|
|
695
|
+
const buttonClass = `h-8 rounded border border-green-500${isDark ? ' text-green-300' : ' bg-white text-green-500'}`;
|
|
696
|
+
const buttonTextClass = `text-xs md:text-sm font-bold px-4${isDark ? ' text-green-300' : ' text-green-500'}`;
|
|
714
697
|
return html `
|
|
715
|
-
<div
|
|
716
|
-
class="flex flex-wrap items-center justify-between ${this.isDark
|
|
717
|
-
? 'bg-grey-600'
|
|
718
|
-
: 'bg-white'} py-3 px-4 rounded-lg md:mx-0 w-full h-[68px] max-w-xs md:max-w-sm md:w-3/5 mt-3 md:mt-4"
|
|
719
|
-
>
|
|
698
|
+
<div class="${containerClass}">
|
|
720
699
|
<div class="flex flex-col">
|
|
721
700
|
<div class="flex items-center">
|
|
722
701
|
<h5 class="text-base md:text-lg font-bold text-orange-400">
|
|
723
702
|
${formatRupiah(product.price)}
|
|
724
703
|
</h5>
|
|
725
|
-
<h6
|
|
726
|
-
class="text-xs md:text-base ${this.isDark
|
|
727
|
-
? 'text-dark-7'
|
|
728
|
-
: 'text-grey-600'} font-bold pl-1"
|
|
729
|
-
>
|
|
704
|
+
<h6 class="text-xs md:text-base font-bold pl-1 ${textColorClass}">
|
|
730
705
|
/ ${product.periode}
|
|
731
706
|
</h6>
|
|
732
707
|
</div>
|
|
733
708
|
${product.savingPrice
|
|
734
709
|
? html `
|
|
735
710
|
<div class="flex items-center">
|
|
736
|
-
<p
|
|
737
|
-
class="text-xs ${this.isDark
|
|
738
|
-
? 'text-dark-7'
|
|
739
|
-
: 'text-grey-600'}"
|
|
740
|
-
>
|
|
711
|
+
<p class="text-xs ${textColorClass}">
|
|
741
712
|
hanya
|
|
742
713
|
<span class="text-orange-400"
|
|
743
714
|
>${formatRupiah(product.savingPrice)}</span
|
|
@@ -750,23 +721,16 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
750
721
|
</div>
|
|
751
722
|
<button
|
|
752
723
|
@click=${() => this.redirectToCheckout(product.url, product.package, product.subscriptionId, product.price, product.position)}
|
|
753
|
-
class="
|
|
754
|
-
'bg-white'} border border-green-500 rounded"
|
|
724
|
+
class="${buttonClass}"
|
|
755
725
|
>
|
|
756
|
-
<h6
|
|
757
|
-
class="text-xs md:text-sm ${this.isDark
|
|
758
|
-
? 'text-green-300'
|
|
759
|
-
: 'text-green-500'} font-bold px-4"
|
|
760
|
-
>
|
|
761
|
-
Langganan
|
|
762
|
-
</h6>
|
|
726
|
+
<h6 class="${buttonTextClass}">Langganan</h6>
|
|
763
727
|
</button>
|
|
764
728
|
</div>
|
|
765
729
|
`;
|
|
766
730
|
}
|
|
767
731
|
packagesSection(data) {
|
|
768
732
|
return html `
|
|
769
|
-
<div class="flex flex-col w-full items-center mt-8
|
|
733
|
+
<div class="flex flex-col w-full items-center mt-8 md:mt-2 px-4">
|
|
770
734
|
${data.memberships.map(item => item.isHighlight
|
|
771
735
|
? this.primaryPackages(item)
|
|
772
736
|
: this.secondaryPackages(item))}
|
|
@@ -804,12 +768,9 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
804
768
|
`;
|
|
805
769
|
}
|
|
806
770
|
helpDesk() {
|
|
771
|
+
const textColorClass = this.isDark ? 'text-dark-7' : 'text-white';
|
|
807
772
|
return html `
|
|
808
|
-
<div
|
|
809
|
-
class="${this.isDark
|
|
810
|
-
? 'text-dark-7'
|
|
811
|
-
: 'text-white'} self-center text-xs md:text-sm"
|
|
812
|
-
>
|
|
773
|
+
<div class="self-center text-xs md:text-sm ${textColorClass}">
|
|
813
774
|
Butuh bantuan? Hubungi
|
|
814
775
|
<button
|
|
815
776
|
@click=${this.customerServiceClicked}
|
|
@@ -821,65 +782,57 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
821
782
|
`;
|
|
822
783
|
}
|
|
823
784
|
userAction() {
|
|
785
|
+
const isAudio = this.type === 'audio';
|
|
786
|
+
const paddingClass = isAudio ? 'md:py-3.5' : 'md:py-6';
|
|
787
|
+
const marginClass = isAudio ? 'md:mt-4' : 'md:mt-8';
|
|
788
|
+
const backgroundClass = this.isDark ? 'bg-dark-4' : 'bg-blue-600';
|
|
824
789
|
return html `
|
|
825
790
|
<div
|
|
826
|
-
class="flex py-5 px-8
|
|
827
|
-
? 'bg-dark-4'
|
|
828
|
-
: 'bg-blue-600'} w-full justify-evenly rounded-b-xl mt-6 md:mt-8 relative"
|
|
791
|
+
class="flex py-5 px-8 w-full justify-evenly rounded-b-xl mt-6 relative ${paddingClass} ${marginClass} ${backgroundClass}"
|
|
829
792
|
>
|
|
830
793
|
${this.helpDesk()}
|
|
831
794
|
</div>
|
|
832
795
|
`;
|
|
833
796
|
}
|
|
834
797
|
introductoryPrice() {
|
|
798
|
+
const textColorClass = this.isDark ? 'text-dark-7' : 'text-grey-600';
|
|
835
799
|
return html ` <div
|
|
836
800
|
class="flex space-x-1 h-5 md:h-max overflow-hidden md:flex-col md:space-x-0 items-center md:items-start md:justify-center"
|
|
837
801
|
>
|
|
838
802
|
<h5 class="text-base md:text-lg font-bold text-orange-400">Rp 10.000</h5>
|
|
839
|
-
<p class="text-xs ${
|
|
840
|
-
untuk 1 bulan pertama
|
|
841
|
-
</p>
|
|
803
|
+
<p class="text-xs ${textColorClass}">untuk 1 bulan pertama</p>
|
|
842
804
|
</div>`;
|
|
843
805
|
}
|
|
844
806
|
swgRegonText() {
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
? 'text-dark-7'
|
|
848
|
-
: 'text-grey-600'}"
|
|
849
|
-
>
|
|
807
|
+
const textColorClass = this.isDark ? 'text-dark-7' : 'text-grey-600';
|
|
808
|
+
return html `<p class="text-xs leading-4 md:max-w-[137px] ${textColorClass}">
|
|
850
809
|
Berlangganan lebih mudah dengan Google
|
|
851
810
|
</p>`;
|
|
852
811
|
}
|
|
853
812
|
swgPackageSection() {
|
|
813
|
+
const { isDark } = this;
|
|
814
|
+
const isAudio = this.type === 'audio';
|
|
815
|
+
const containerClass = `flex flex-col space-y-2 md:space-x-2 md:space-y-0 md:flex-row justify-between items-center py-3 px-4 rounded-lg md:mx-0 w-full h-[76px] md:h-[68px] max-w-xs md:max-w-sm md:w-3/5 mt-3${isDark ? ' bg-grey-600' : ' bg-white'}${isAudio ? ' md:mt-2.5' : ' md:mt-4'}`;
|
|
816
|
+
const buttonClass = `border space-x-2 justify-center border-grey-400 rounded-md px-[22px] md:px-6 shadow-sm flex h-max flex-row flex-nowrap py-[5.6px] md:py-1.5 items-center${isDark ? ' bg-grey-600' : ' bg-grey-100 border-grey-100'}`;
|
|
817
|
+
const textColorClass = isDark ? 'text-dark-7' : 'text-grey-500';
|
|
818
|
+
const googleImageSrc = isDark
|
|
819
|
+
? 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/paywall-asset/google-white.png'
|
|
820
|
+
: 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/paywall-asset/google.png';
|
|
854
821
|
return html `
|
|
855
|
-
<div
|
|
856
|
-
class="flex flex-col space-y-2 md:space-x-2 md:space-y-0 md:flex-row justify-between items-center ${this
|
|
857
|
-
.isDark
|
|
858
|
-
? 'bg-grey-600'
|
|
859
|
-
: 'bg-white'} py-3 px-4 rounded-lg md:mx-0 w-full h-[76px] md:h-[68px] max-w-xs md:max-w-sm md:w-3/5 mt-3 md:mt-4"
|
|
860
|
-
>
|
|
822
|
+
<div class="${containerClass}">
|
|
861
823
|
${this.isEntitledForIntroductoryPrice
|
|
862
824
|
? this.introductoryPrice()
|
|
863
825
|
: this.swgRegonText()}
|
|
864
826
|
<div>
|
|
865
|
-
<button
|
|
866
|
-
class="${this.isDark
|
|
867
|
-
? 'bg-grey-600'
|
|
868
|
-
: 'bg-grey-100 border-grey-100'} border space-x-2 justify-center border-grey-400 rounded-md px-[22px] md:px-6 shadow-sm flex h-max flex-row flex-nowrap py-[5.6px] md:py-1.5 items-center"
|
|
869
|
-
id="subscribe-with-google"
|
|
870
|
-
>
|
|
827
|
+
<button class="${buttonClass}" id="subscribe-with-google">
|
|
871
828
|
<p
|
|
872
|
-
class="${
|
|
873
|
-
? 'text-dark-7'
|
|
874
|
-
: 'text-grey-500'} text-[11px] md:text-xs whitespace-nowrap w-full"
|
|
829
|
+
class="text-[11px] md:text-xs whitespace-nowrap w-full ${textColorClass}"
|
|
875
830
|
>
|
|
876
831
|
Subscribe with
|
|
877
832
|
</p>
|
|
878
833
|
<img
|
|
879
834
|
class="object-scale-down h-[17px] md:h-5"
|
|
880
|
-
src=${
|
|
881
|
-
? 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/paywall-asset/google-white.png'
|
|
882
|
-
: 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/paywall-asset/google.png'}
|
|
835
|
+
src=${googleImageSrc}
|
|
883
836
|
alt="subscribe with google"
|
|
884
837
|
/>
|
|
885
838
|
</button>
|
|
@@ -898,22 +851,27 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
898
851
|
popup === null || popup === void 0 ? void 0 : popup.classList.add('hidden');
|
|
899
852
|
}
|
|
900
853
|
freeTrialPopUp() {
|
|
854
|
+
const { isDark } = this;
|
|
855
|
+
const googlePlayBadgeSrc = isDark
|
|
856
|
+
? 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/web-component/Button_Download%20Google%20Play_Dark%20Mode.svg'
|
|
857
|
+
: 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/web-component/Button_Download%20Google%20Play_Light%20Mode.svg';
|
|
858
|
+
const appStoreBadgeSrc = isDark
|
|
859
|
+
? 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/web-component/Button_Download%20App%20Store_Dark%20Mode.svg'
|
|
860
|
+
: 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/web-component/Button_Download%20App%20Store_Light%20Mode.svg';
|
|
901
861
|
return html `
|
|
902
862
|
<div
|
|
903
863
|
id="freeTrialPopup"
|
|
904
864
|
class="fixed w-full h-full inset-0 flex justify-center items-center z-50 bg-black bg-opacity-75 hidden"
|
|
905
865
|
>
|
|
906
866
|
<div
|
|
907
|
-
class="${
|
|
867
|
+
class="rounded w-11/12 sm:w-3/4 md:w-1/2 lg:w-1/3 2xl:w-1/4 p-6 text-center ${isDark
|
|
908
868
|
? 'bg-dark-4'
|
|
909
|
-
: 'bg-white'}
|
|
869
|
+
: 'bg-white'}"
|
|
910
870
|
>
|
|
911
871
|
<div class="w-full flex justify-end px-2">
|
|
912
872
|
<button
|
|
913
873
|
@click=${this.closeFreeTrialPopup}
|
|
914
|
-
class="w-8 h-8 pl-4 ${
|
|
915
|
-
? 'text-grey-300'
|
|
916
|
-
: 'text-grey-400'}"
|
|
874
|
+
class="w-8 h-8 pl-4 ${isDark ? 'text-grey-300' : 'text-grey-400'}"
|
|
917
875
|
>
|
|
918
876
|
${unsafeSVG(getFontAwesomeIcon('fas', 'xmark', 24, 24))}
|
|
919
877
|
</button>
|
|
@@ -927,16 +885,16 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
927
885
|
</div>
|
|
928
886
|
</div>
|
|
929
887
|
<p
|
|
930
|
-
class="font-bold text-lg ${
|
|
888
|
+
class="font-bold text-lg mt-4 ${isDark
|
|
931
889
|
? 'text-white'
|
|
932
|
-
: 'text-grey-600'}
|
|
890
|
+
: 'text-grey-600'}"
|
|
933
891
|
>
|
|
934
892
|
Coba Gratis Kompas.id di Aplikasi
|
|
935
893
|
</p>
|
|
936
894
|
<div
|
|
937
|
-
class="${
|
|
895
|
+
class="hidden lg:block lg:flex flex rounded mt-4 px-8 py-4 items-center ${isDark
|
|
938
896
|
? 'bg-dark-3 border border-dark-9'
|
|
939
|
-
: 'bg-white border border-grey-300'}
|
|
897
|
+
: 'bg-white border border-grey-300'}"
|
|
940
898
|
>
|
|
941
899
|
<div class="w-1/3 flex mr-6">
|
|
942
900
|
<img
|
|
@@ -945,18 +903,18 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
945
903
|
/>
|
|
946
904
|
</div>
|
|
947
905
|
<div
|
|
948
|
-
class="w-2/3 text-base ${
|
|
906
|
+
class="w-2/3 text-base text-left ${isDark
|
|
949
907
|
? 'text-dark-7'
|
|
950
|
-
: 'text-grey-600'}
|
|
908
|
+
: 'text-grey-600'}"
|
|
951
909
|
>
|
|
952
910
|
Coba gratis 3 hari Kompas.id melalui aplikasi. Pindai kode QR
|
|
953
911
|
dengan ponsel atau tablet untuk mengunduh aplikasi.
|
|
954
912
|
</div>
|
|
955
913
|
</div>
|
|
956
914
|
<div
|
|
957
|
-
class="text-base ${
|
|
915
|
+
class="text-base text-center lg:hidden px-2 md:px-8 ${isDark
|
|
958
916
|
? 'text-dark-7'
|
|
959
|
-
: 'text-grey-600'}
|
|
917
|
+
: 'text-grey-600'}"
|
|
960
918
|
>
|
|
961
919
|
Dapatkan akses gratis selama 3 hari ke konten dan fitur premium
|
|
962
920
|
Kompas.id di aplikasi.
|
|
@@ -965,33 +923,21 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
965
923
|
<a
|
|
966
924
|
href="https://play.google.com/store/apps/details?id=id.kompas.app"
|
|
967
925
|
target="_blank"
|
|
968
|
-
><img
|
|
969
|
-
src="${this.isDark
|
|
970
|
-
? 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/web-component/Button_Download%20Google%20Play_Dark%20Mode.svg'
|
|
971
|
-
: 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/web-component/Button_Download%20Google%20Play_Light%20Mode.svg'}"
|
|
972
|
-
alt="Google Play Badge"
|
|
926
|
+
><img src="${googlePlayBadgeSrc}" alt="Google Play Badge"
|
|
973
927
|
/></a>
|
|
974
928
|
<a
|
|
975
929
|
href="https://apps.apple.com/id/app/kompas-id/id1242195037?l=id"
|
|
976
930
|
target="_blank"
|
|
977
|
-
><img
|
|
978
|
-
src="${this.isDark
|
|
979
|
-
? 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/web-component/Button_Download%20App%20Store_Dark%20Mode.svg'
|
|
980
|
-
: 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/web-component/Button_Download%20App%20Store_Light%20Mode.svg'}"
|
|
981
|
-
alt="iOS App Store Badge"
|
|
931
|
+
><img src="${appStoreBadgeSrc}" alt="iOS App Store Badge"
|
|
982
932
|
/></a>
|
|
983
933
|
</div>
|
|
984
934
|
<button
|
|
985
935
|
onclick="window.open('https://app.komp.as/langganan', '_blank')"
|
|
986
|
-
class="h-12 ${
|
|
936
|
+
class="h-12 rounded-md mt-4 flex w-full items-center justify-center lg:hidden ${isDark
|
|
987
937
|
? 'bg-green-300'
|
|
988
|
-
: 'bg-green-500'}
|
|
938
|
+
: 'bg-green-500'}"
|
|
989
939
|
>
|
|
990
|
-
<h6
|
|
991
|
-
class="${this.isDark
|
|
992
|
-
? 'text-dark-5'
|
|
993
|
-
: 'text-white'} font-bold p-4"
|
|
994
|
-
>
|
|
940
|
+
<h6 class="font-bold p-4 ${isDark ? 'text-dark-5' : 'text-white'}">
|
|
995
941
|
Unduh Sekarang
|
|
996
942
|
</h6>
|
|
997
943
|
</button>
|
|
@@ -1005,9 +951,10 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
1005
951
|
if (packages.freeTrial) {
|
|
1006
952
|
return html `
|
|
1007
953
|
<div
|
|
1008
|
-
class="flex flex-wrap items-center justify-between ${this
|
|
954
|
+
class="flex flex-wrap items-center justify-between py-3 px-4 rounded-lg md:mx-0 w-full h-[68px] max-w-xs md:max-w-sm md:w-3/5 mt-3 md:mt-4 ${this
|
|
955
|
+
.isDark
|
|
1009
956
|
? 'bg-grey-600'
|
|
1010
|
-
: 'bg-white'}
|
|
957
|
+
: 'bg-white'}"
|
|
1011
958
|
>
|
|
1012
959
|
<div class="flex flex-col">
|
|
1013
960
|
<div class="flex items-center">
|
|
@@ -1025,13 +972,13 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
1025
972
|
</div>
|
|
1026
973
|
<button
|
|
1027
974
|
@click=${this.openFreeTrialPopup}
|
|
1028
|
-
class="h-8 ${!this.isDark &&
|
|
1029
|
-
'bg-white'}
|
|
975
|
+
class="h-8 border border-green-500 rounded ${!this.isDark &&
|
|
976
|
+
'bg-white'}"
|
|
1030
977
|
>
|
|
1031
978
|
<h6
|
|
1032
|
-
class="text-xs md:text-sm ${this.isDark
|
|
979
|
+
class="text-xs md:text-sm font-bold px-4 ${this.isDark
|
|
1033
980
|
? 'text-green-300'
|
|
1034
|
-
: 'text-green-500'}
|
|
981
|
+
: 'text-green-500'}"
|
|
1035
982
|
>
|
|
1036
983
|
Coba Gratis
|
|
1037
984
|
</h6>
|
|
@@ -1046,37 +993,36 @@ let KompasIdPaywallBody = class KompasIdPaywallBody extends LitElement {
|
|
|
1046
993
|
*/
|
|
1047
994
|
render() {
|
|
1048
995
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
996
|
+
const isEpaper = this.type === 'epaper';
|
|
997
|
+
const isAudio = this.type === 'audio';
|
|
998
|
+
const { isDark } = this;
|
|
999
|
+
const { isLogin } = this;
|
|
1000
|
+
const wrapperBodyClass = `wrapper-body
|
|
1001
|
+
${isEpaper ? 'bg-transparent mx-2' : ''}
|
|
1002
|
+
${isAudio
|
|
1003
|
+
? 'fixed w-full h-full inset-0 flex justify-center items-center z-index-max bg-black bg-opacity-75'
|
|
1004
|
+
: ''}`
|
|
1005
|
+
.trim()
|
|
1006
|
+
.replace(/\s+/g, ' ');
|
|
1007
|
+
const containerClass = `flex w-full flex-col items-center justify-center rounded-xl pt-6 relative ${isDark ? 'bg-dark-3' : 'bg-blue-100'} ${isAudio ? 'md:pt-5' : 'md:pt-8'}`;
|
|
1008
|
+
const borderClass = isDark ? 'border-dark-8' : 'border-blue-200';
|
|
1049
1009
|
return html `
|
|
1050
|
-
<div
|
|
1051
|
-
class="${this.type === 'epaper'
|
|
1052
|
-
? 'bg-transparent wrapper-body mx-2'
|
|
1053
|
-
: 'wrapper-body'}
|
|
1054
|
-
${this.type === 'audio'
|
|
1055
|
-
? `fixed w-full h-full inset-0 flex justify-center items-center z-50 bg-black bg-opacity-75`
|
|
1056
|
-
: 'wrapper-body'}"
|
|
1057
|
-
>
|
|
1010
|
+
<div class="${wrapperBodyClass}">
|
|
1058
1011
|
<div
|
|
1059
1012
|
class="flex flex-col justify-center items-center w-full max-w-screen-sm my-5 px-2 relative"
|
|
1060
1013
|
>
|
|
1061
|
-
${
|
|
1062
|
-
|
|
1063
|
-
: nothing}
|
|
1064
|
-
<div
|
|
1065
|
-
class="flex w-full flex-col items-center justify-center ${this
|
|
1066
|
-
.isDark
|
|
1067
|
-
? 'bg-dark-3'
|
|
1068
|
-
: 'bg-blue-100'} rounded-xl pt-6 md:pt-8 relative"
|
|
1069
|
-
>
|
|
1014
|
+
${isEpaper || isAudio ? this.topNavigator(this.type) : nothing}
|
|
1015
|
+
<div class="${containerClass}">
|
|
1070
1016
|
${this.headerSection(this.type, (_c = (_b = (_a = this.paywallData) === null || _a === void 0 ? void 0 : _a.informations) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '')}
|
|
1071
1017
|
${this.descriptionSection((_f = (_e = (_d = this.paywallData) === null || _d === void 0 ? void 0 : _d.informations) === null || _e === void 0 ? void 0 : _e.description) !== null && _f !== void 0 ? _f : [])}
|
|
1072
1018
|
${this.packagesSection((_h = (_g = this.paywallData) === null || _g === void 0 ? void 0 : _g.packages) !== null && _h !== void 0 ? _h : {})}
|
|
1073
1019
|
${this.informationPackages()}
|
|
1074
|
-
${!
|
|
1020
|
+
${!isLogin
|
|
1075
1021
|
? html `
|
|
1076
1022
|
<div
|
|
1077
|
-
class="border-b ${
|
|
1078
|
-
? '
|
|
1079
|
-
: '
|
|
1023
|
+
class="border-b w-1/5 flex justify-center ${borderClass} ${isAudio
|
|
1024
|
+
? 'my-4 md:my-3'
|
|
1025
|
+
: 'my-4'}"
|
|
1080
1026
|
></div>
|
|
1081
1027
|
${this.registrationSection(this.type)}
|
|
1082
1028
|
`
|
|
@@ -1100,6 +1046,10 @@ KompasIdPaywallBody.styles = [
|
|
|
1100
1046
|
align-items: center;
|
|
1101
1047
|
}
|
|
1102
1048
|
|
|
1049
|
+
.z-index-max {
|
|
1050
|
+
z-index: 999999;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1103
1053
|
.font-lora {
|
|
1104
1054
|
font-family: 'Lora', 'Georgia', 'serif';
|
|
1105
1055
|
}
|