-
-
+
+
diff --git a/src/components/easycredit-box-modal/easycredit-box-modal.scss b/src/components/easycredit-box-modal/easycredit-box-modal.scss
index 504dbf3..1724a55 100644
--- a/src/components/easycredit-box-modal/easycredit-box-modal.scss
+++ b/src/components/easycredit-box-modal/easycredit-box-modal.scss
@@ -94,7 +94,7 @@
z-index: 4;
}
- &.circle {
+ &.ec-circle {
z-index: 1;
}
}
@@ -159,10 +159,10 @@
width: 100%;
height: 220px;
- .circle {
+ .ec-circle {
width: $circle-width-33;
}
- .circle-secondary {
+ .ec-circle-secondary {
width: $circle-width-33-secondary;
}
}
diff --git a/src/components/easycredit-box-modal/easycredit-box-modal.tsx b/src/components/easycredit-box-modal/easycredit-box-modal.tsx
index 9a3fcd3..ba9cfe4 100644
--- a/src/components/easycredit-box-modal/easycredit-box-modal.tsx
+++ b/src/components/easycredit-box-modal/easycredit-box-modal.tsx
@@ -60,8 +60,8 @@ export class EasycreditBoxModal {
this.toggle()}>
diff --git a/src/components/easycredit-checkout-bill-payment-timeline/easycredit-checkout-bill-payment-timeline.scss b/src/components/easycredit-checkout-bill-payment-timeline/easycredit-checkout-bill-payment-timeline.scss
new file mode 100644
index 0000000..3e6d5f8
--- /dev/null
+++ b/src/components/easycredit-checkout-bill-payment-timeline/easycredit-checkout-bill-payment-timeline.scss
@@ -0,0 +1,201 @@
+.ec-checkout {
+ &__timeline {
+ margin-bottom: 10px;
+ padding: 20px 5px 5px 5px;
+
+ background-color: $white;
+ border-radius: $border-radius-xl;
+ border: 2px solid $ec-gray;
+ }
+
+ &__animation-information {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 10px;
+ padding: 0 17px;
+ color: $ec-darkblue;
+
+ span {
+ font-size: $font-size;
+ line-height: $line-height;
+ }
+ }
+
+ &__animation {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ position: relative;
+ padding: 0 5px;
+ margin: 35px 6px;
+ }
+
+ @keyframes highlightBullet {
+
+ 0%,
+ 100% {
+ background: $ec-gray;
+ }
+
+ 5% {
+ background: $ec-secondary;
+ }
+
+ 10% {
+ background: $ec-gray;
+ }
+ }
+
+ @keyframes swapStartAfter {
+
+ 0%,
+ 7% {
+ background: $ec-secondary;
+ border: 2px solid $ec-secondary;
+ }
+
+ 21% {
+ background: $white;
+ border: 2px solid $ec-secondary;
+ }
+
+ 28% {
+ background: $white;
+ border: 2px solid $ec-secondary;
+ }
+
+ 90% {
+ background: $white;
+ border: 2px solid $ec-secondary;
+ }
+
+ 95%,
+ 100% {
+ background: $ec-secondary;
+ border: 2px solid $ec-secondary;
+ }
+ }
+
+ @keyframes swapEndAfter {
+
+ 0%,
+ 7% {
+ background: $white;
+ border: 2px solid $ec-secondary;
+ }
+
+ 21% {
+ background: $ec-secondary;
+ }
+
+ 28% {
+ background: $ec-secondary;
+ }
+
+ 90% {
+ background: $ec-secondary;
+ }
+
+ 95%,
+ 100% {
+ background: $white;
+ border: 2px solid $ec-secondary;
+ }
+ }
+
+ &__animation-bullets {
+ overflow: hidden;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ width: 100%;
+ }
+
+ &__animation-bullet {
+ min-width: 5px;
+ height: 5px;
+ border-radius: 5px;
+ margin-right: 7px;
+ background: $ec-gray;
+ animation: highlightBullet 5s linear infinite;
+ animation-delay: calc(var(--bullet-index) * 0.057s);
+ }
+
+ @media (max-width: 380px) {
+ &__animation-bullet:nth-last-child(-n+5) {
+ display: none;
+ }
+ }
+
+ &__animation-start {
+ min-width: 27px;
+ height: 27px;
+ border-radius: 27px;
+ background: $ec-gray;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: absolute;
+ left: 0;
+ transition: background 0.3s ease, border-color 0.3s ease;
+
+ &:after {
+ content: "";
+ width: 13px;
+ height: 13px;
+ border-radius: 15px;
+ box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
+ animation: swapStartAfter 5s linear infinite;
+ background: $ec-secondary;
+ border: 2px solid transparent;
+ }
+ }
+
+ &__animation-end {
+ min-width: 27px;
+ height: 27px;
+ border-radius: 27px;
+ background: $ec-gray;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: absolute;
+ right: 0;
+ transition: background 0.3s ease, border-color 0.3s ease;
+
+ &:after {
+ content: "";
+ width: 13px;
+ height: 13px;
+ border-radius: 15px;
+ box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
+ animation: swapEndAfter 5s linear infinite;
+ background: $white;
+ border: 2px solid $ec-secondary;
+ }
+ }
+
+ &__information {
+ background: $ec-darkblue;
+ color: $white;
+ text-align: center;
+ font-size: $font-size-sm;
+ line-height: $line-height;
+ font-weight: bold;
+ padding: 10px 15px;
+ border-radius: $border-radius-lg-xl;
+ align-items: center;
+ display: flex;
+ justify-content: center;
+
+ .icon {
+ @include background-svg($icon-shipping);
+ background-position: center;
+ background-repeat: no-repeat;
+ background-size: contain;
+ height: 25px;
+ width: 25px;
+ margin-right: 10px;
+ }
+ }
+}
diff --git a/src/components/easycredit-checkout-bill-payment-timeline/easycredit-checkout-bill-payment-timeline.tsx b/src/components/easycredit-checkout-bill-payment-timeline/easycredit-checkout-bill-payment-timeline.tsx
new file mode 100644
index 0000000..b1dedfb
--- /dev/null
+++ b/src/components/easycredit-checkout-bill-payment-timeline/easycredit-checkout-bill-payment-timeline.tsx
@@ -0,0 +1,55 @@
+import { Component, h } from '@stencil/core';
+// import { applyAssetsUrl, getAssetUrl } from '../../utils/utils';
+
+@Component({
+ tag: 'easycredit-checkout-bill-payment-timeline',
+ styleUrl: 'easycredit-checkout-bill-payment-timeline.scss'
+})
+
+export class EasycreditCheckoutBillPaymentTimeline {
+ render() {
+ return [
+
+
+ Heute
bestellen
+ in 30 Tagen
bezahlen
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/components/easycredit-checkout-bill-payment-timeline/readme.md b/src/components/easycredit-checkout-bill-payment-timeline/readme.md
new file mode 100644
index 0000000..8ad6040
--- /dev/null
+++ b/src/components/easycredit-checkout-bill-payment-timeline/readme.md
@@ -0,0 +1,25 @@
+# easycredit-checkout-bill-payment-timeline
+
+
+
+
+
+
+## Dependencies
+
+### Used by
+
+ - [easycredit-checkout](../easycredit-checkout)
+ - [easycredit-express-button](../easycredit-express-button)
+
+### Graph
+```mermaid
+graph TD;
+ easycredit-checkout --> easycredit-checkout-bill-payment-timeline
+ easycredit-express-button --> easycredit-checkout-bill-payment-timeline
+ style easycredit-checkout-bill-payment-timeline fill:#f9f,stroke:#333,stroke-width:4px
+```
+
+----------------------------------------------
+
+*Built with [StencilJS](https://stenciljs.com/)*
diff --git a/src/components/easycredit-checkout-installments/easycredit-checkout-installments.scss b/src/components/easycredit-checkout-installments/easycredit-checkout-installments.scss
index 8a59a5f..1fd04c6 100644
--- a/src/components/easycredit-checkout-installments/easycredit-checkout-installments.scss
+++ b/src/components/easycredit-checkout-installments/easycredit-checkout-installments.scss
@@ -3,6 +3,7 @@
margin: 0;
padding: 0;
list-style: none;
+ background-color: $white;
border-width: 0 2px;
border-style: solid;
border-color: $ec-gray-2;
@@ -91,7 +92,7 @@
border-width: 2px;
border-style: solid;
border-color: transparent;
- border-radius: $border-radius-lg;
+ border-radius: $border-radius-lg-xl;
cursor: pointer;
transition: color .1s $transition-timing, background-color .1s $transition-timing, border-color .1s $transition-timing;
diff --git a/src/components/easycredit-checkout-installments/easycredit-checkout-installments.tsx b/src/components/easycredit-checkout-installments/easycredit-checkout-installments.tsx
index d468ee9..743328f 100644
--- a/src/components/easycredit-checkout-installments/easycredit-checkout-installments.tsx
+++ b/src/components/easycredit-checkout-installments/easycredit-checkout-installments.tsx
@@ -3,7 +3,8 @@ import { formatCurrency, sendFeedback } from '../../utils/utils';
@Component({
tag: 'easycredit-checkout-installments',
- styleUrl: 'easycredit-checkout-installments.scss'
+ styleUrl: 'easycredit-checkout-installments.scss',
+ shadow: true
})
export class EasycreditCheckoutInstallments {
@@ -17,6 +18,8 @@ export class EasycreditCheckoutInstallments {
@State() _installments
@State() selectedInstallmentValue: number
+ installmentsBase!: HTMLElement;
+
@Listen('selectedInstallment')
selectedInstallmentHandler(e) {
this.selectedInstallmentValue = e.detail
@@ -24,11 +27,12 @@ export class EasycreditCheckoutInstallments {
@Watch('installments')
parseInstallmentsProp(newValue: string) {
- if (newValue) this._installments = JSON.parse(newValue);
+ if (newValue) {
+ this._installments = JSON.parse(newValue)
+ .sort((a,b) => parseFloat(a.installment) - parseFloat(b.installment))
+ }
}
- installmentsBase!: HTMLElement;
-
async componentWillLoad () {
this.parseInstallmentsProp(this.installments);
}
diff --git a/src/components/easycredit-checkout-installments/readme.md b/src/components/easycredit-checkout-installments/readme.md
index 23f67f0..4bbd7dd 100644
--- a/src/components/easycredit-checkout-installments/readme.md
+++ b/src/components/easycredit-checkout-installments/readme.md
@@ -26,11 +26,13 @@
### Used by
- [easycredit-checkout](../easycredit-checkout)
+ - [easycredit-express-button](../easycredit-express-button)
### Graph
```mermaid
graph TD;
easycredit-checkout --> easycredit-checkout-installments
+ easycredit-express-button --> easycredit-checkout-installments
style easycredit-checkout-installments fill:#f9f,stroke:#333,stroke-width:4px
```
diff --git a/src/components/easycredit-checkout-label/easycredit-checkout-label.scss b/src/components/easycredit-checkout-label/easycredit-checkout-label.scss
index 89105fb..5866fc3 100644
--- a/src/components/easycredit-checkout-label/easycredit-checkout-label.scss
+++ b/src/components/easycredit-checkout-label/easycredit-checkout-label.scss
@@ -17,11 +17,18 @@
top: 50%;
transform: translateY(-50%);
- @extend .logo-ratenkauf;
+ &-installment {
+ @extend .logo-ratenkauf;
+ }
+ &-bill {
+ @extend .logo-rechnungskauf;
+ }
+
display: block;
width: 60px;
- height: 29px;
+ height: 100%;
background-position: right center;
+ background-size: 100% auto;
}
strong {
diff --git a/src/components/easycredit-checkout-label/easycredit-checkout-label.stories.tsx b/src/components/easycredit-checkout-label/easycredit-checkout-label.stories.tsx
index 322e7f1..7b365d8 100644
--- a/src/components/easycredit-checkout-label/easycredit-checkout-label.stories.tsx
+++ b/src/components/easycredit-checkout-label/easycredit-checkout-label.stories.tsx
@@ -1,4 +1,5 @@
import { buildAttributes } from '../../../.storybook/helpers'
+import { METHODS } from '../../types';
export default {
title: "Checkout/Label",
@@ -11,18 +12,33 @@ export default {
}
},
argTypes: {
+ paymentType: {
+ table: {
+ defaultValue: { summary: "INSTALLMENT" },
+ category: "optional",
+ },
+ description: 'Zahlungsart',
+ options: [METHODS.INSTALLMENT, METHODS.BILL],
+ control: { type: 'radio' },
+ },
label: {
+ table: {
+ category: "optional",
+ },
description: 'Titel'
},
slogan: {
+ table: {
+ category: "optional",
+ },
description: 'Untertitel'
}
-
},
};
let args = {
+ paymentType: METHODS.INSTALLMENT,
label: '',
slogan: ''
}
diff --git a/src/components/easycredit-checkout-label/easycredit-checkout-label.tsx b/src/components/easycredit-checkout-label/easycredit-checkout-label.tsx
index b68493f..8bacc16 100644
--- a/src/components/easycredit-checkout-label/easycredit-checkout-label.tsx
+++ b/src/components/easycredit-checkout-label/easycredit-checkout-label.tsx
@@ -1,5 +1,6 @@
import { Component, Prop, h } from '@stencil/core';
import { applyAssetsUrl } from '../../utils/utils';
+import { METHODS } from '../../types';
@Component({
tag: 'easycredit-checkout-label',
@@ -9,13 +10,24 @@ import { applyAssetsUrl } from '../../utils/utils';
export class EasycreditCheckoutLabel {
- @Prop({ mutable: true }) label: string = 'easyCredit-Ratenkauf';
- @Prop({ mutable: true }) slogan: string = 'Ganz entspannt in Raten zahlen.';
+ @Prop({ mutable: true }) label: string
+ @Prop({ mutable: true }) slogan: string
+ @Prop({ mutable: true}) paymentType: METHODS = METHODS.INSTALLMENT
connectedCallback() {
applyAssetsUrl(EasycreditCheckoutLabel)
}
+ componentWillLoad() {
+ if (this.paymentType === METHODS.INSTALLMENT) {
+ this.label ??= 'easyCredit-Ratenkauf'
+ this.slogan ??= 'Ganz entspannt in Raten zahlen.'
+ } else if (this.paymentType === METHODS.BILL) {
+ this.label ??= 'easyCredit-Rechnung'
+ this.slogan ??= 'Erst kaufen, in 30 Tagen bezahlen.'
+ }
+ }
+
render() {
return ([
@@ -24,7 +36,11 @@ export class EasycreditCheckoutLabel {
{this.label}
{this.slogan}
-
+
])
diff --git a/src/components/easycredit-checkout-label/readme.md b/src/components/easycredit-checkout-label/readme.md
index bf0d4e1..81c80f9 100644
--- a/src/components/easycredit-checkout-label/readme.md
+++ b/src/components/easycredit-checkout-label/readme.md
@@ -7,10 +7,11 @@
## Properties
-| Property | Attribute | Description | Type | Default |
-| -------- | --------- | ----------- | -------- | ----------------------------------- |
-| `label` | `label` | | `string` | `'easyCredit-Ratenkauf'` |
-| `slogan` | `slogan` | | `string` | `'Ganz entspannt in Raten zahlen.'` |
+| Property | Attribute | Description | Type | Default |
+| ------------- | -------------- | ----------- | ------------------------------------- | --------------------- |
+| `label` | `label` | | `string` | `undefined` |
+| `paymentType` | `payment-type` | | `METHODS.BILL \| METHODS.INSTALLMENT` | `METHODS.INSTALLMENT` |
+| `slogan` | `slogan` | | `string` | `undefined` |
----------------------------------------------
diff --git a/src/components/easycredit-checkout-privacy-approval/easycredit-checkout-privacy-approval.tsx b/src/components/easycredit-checkout-privacy-approval/easycredit-checkout-privacy-approval.tsx
index 199a0ce..b708b7e 100644
--- a/src/components/easycredit-checkout-privacy-approval/easycredit-checkout-privacy-approval.tsx
+++ b/src/components/easycredit-checkout-privacy-approval/easycredit-checkout-privacy-approval.tsx
@@ -1,5 +1,6 @@
import { Component, h, State, Prop } from '@stencil/core';
-import { fetchAgreement } from '../../utils/utils';
+import { getWebshopInfo } from '../../utils/utils';
+import state from '../../stores/general';
@Component({
tag: 'easycredit-checkout-privacy-approval',
@@ -13,13 +14,12 @@ export class EasycreditCheckoutPrivacyApproval {
@State() privacyApprovalForm: string
async componentWillLoad () {
- fetchAgreement(this.webshopId).then(data => {
- this.privacyApprovalForm = data.privacyApprovalForm
- }).catch(e => {
- console.error(e)
- // this.alert = 'Es ist ein Fehler aufgetreten.'
- })
- }
+ try {
+ getWebshopInfo(this.webshopId)
+ } catch (e) {
+ console.error(e)
+ }
+ }
render () {
return ([
@@ -27,7 +27,7 @@ export class EasycreditCheckoutPrivacyApproval {
{/*