Skip to content

Commit

Permalink
feat(arch): move && simplify component cart
Browse files Browse the repository at this point in the history
  • Loading branch information
dpellier committed Aug 18, 2023
1 parent 97b975e commit 9d3dca7
Show file tree
Hide file tree
Showing 322 changed files with 3,804 additions and 2,482 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
* [**Classes**](#classes)
* [**Type alias**](#type-alias)
* [**Variables**](#variables)

## Classes

### OdsCartFooterItemController
_common controller logic for cart-footer component used by the different implementations._
_it contains all the glue between framework implementation and the third party service._


## Type alias

### OdsCartFooterItem

interface description of all implementation of `ods-cart-footer-item`.
each implementation must have defined events, methods, attributes
and one controller for the common behavior logic

> - `OdsComponentGenericMethods`
> - `OdsComponentGenericEvents`
### OdsCartFooterItemAttributes

> _Based on `OdsComponentAttributes`_
### OdsCartFooterItemEvents

> _Based on `OdsComponentEvents`_
### OdsCartFooterItemMethods

> _Based on `OdsComponentMethods`_
## Variables

### odsCartFooterItemDefaultAttributes
`OdsCartFooterItemAttributes`
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
* [**Classes**](#classes)
* [**Type alias**](#type-alias)
* [**Variables**](#variables)

## Classes

### OdsCartFooterController
_common controller logic for cart-footer component used by the different implementations._
_it contains all the glue between framework implementation and the third party service._


### OdsCartFooterItemController
_common controller logic for cart-footer component used by the different implementations._
_it contains all the glue between framework implementation and the third party service._


## Type alias

### OdsCartFooter

interface description of all implementation of `ods-cart-footer`.
each implementation must have defined events, methods, attributes
and one controller for the common behavior logic

> - `OdsComponentGenericMethods`
> - `OdsComponentGenericEvents`
### OdsCartFooterItem

interface description of all implementation of `ods-cart-footer-item`.
each implementation must have defined events, methods, attributes
and one controller for the common behavior logic

> - `OdsComponentGenericMethods`
> - `OdsComponentGenericEvents`
### OdsCartFooterAttributes

> _Based on `OdsComponentAttributes`_
### OdsCartFooterEvents

> _Based on `OdsComponentEvents`_
### OdsCartFooterItemAttributes

> _Based on `OdsComponentAttributes`_
### OdsCartFooterItemEvents

> _Based on `OdsComponentEvents`_
### OdsCartFooterItemMethods

> _Based on `OdsComponentMethods`_
### OdsCartFooterMethods

> _Based on `OdsComponentMethods`_
## Variables

### odsCartFooterDefaultAttributes
`OdsCartFooterAttributes`

### odsCartFooterItemDefaultAttributes
`OdsCartFooterItemAttributes`
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
* [**Classes**](#classes)
* [**Type alias**](#type-alias)
* [**Variables**](#variables)

## Classes

### OdsCartItemOptionController
_common controller logic for cart-item-option component used by the different implementations._
_it contains all the glue between framework implementation and the third party service._


## Type alias

### OdsCartItemOption

interface description of all implementation of `ods-cart-item-option`.
each implementation must have defined events, methods, attributes
and one controller for the common behavior logic

> - `OdsComponentGenericMethods`
> - `OdsComponentGenericEvents`
### OdsCartItemOptionAttributes

> _Based on `OdsComponentAttributes`_
### OdsCartItemOptionEvents

> _Based on `OdsComponentEvents`_
### OdsCartItemOptionMethods

> _Based on `OdsComponentMethods`_
## Variables

### odsCartItemOptionDefaultAttributes
`OdsCartItemOptionAttributes`
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
* [**Classes**](#classes)
* [**Type alias**](#type-alias)
* [**Variables**](#variables)

## Classes

### OdsCartItemController
_common controller logic for cart-item component used by the different implementations._
_it contains all the glue between framework implementation and the third party service._

#### Methods
> **initCart**() => _unknown_

> **refreshCart**() => _unknown_


### OdsCartItemOptionController
_common controller logic for cart-item-option component used by the different implementations._
_it contains all the glue between framework implementation and the third party service._


## Type alias

### OdsCartItem

interface description of all implementation of `ods-cart-item`.
each implementation must have defined events, methods, attributes
and one controller for the common behavior logic

> - `OdsComponentGenericMethods`
> - `OdsComponentGenericEvents`
### OdsCartItemOption

interface description of all implementation of `ods-cart-item-option`.
each implementation must have defined events, methods, attributes
and one controller for the common behavior logic

> - `OdsComponentGenericMethods`
> - `OdsComponentGenericEvents`
### OdsCartItemAttributes

> _Based on `OdsComponentAttributes`_
### OdsCartItemEvents

> _Based on `OdsComponentEvents`_
### OdsCartItemMethods

> _Based on `OdsComponentMethods`_
### OdsCartItemOptionAttributes

> _Based on `OdsComponentAttributes`_
### OdsCartItemOptionEvents

> _Based on `OdsComponentEvents`_
### OdsCartItemOptionMethods

> _Based on `OdsComponentMethods`_
## Variables

### odsCartItemDefaultAttributes
`OdsCartItemAttributes`

### odsCartItemOptionDefaultAttributes
`OdsCartItemOptionAttributes`
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
* [**Interfaces**](#interfaces)
* [**Classes**](#classes)
* [**Type alias**](#type-alias)
* [**Variables**](#variables)

## Interfaces

### OdsCartManagerAttributes
|name | Type | Required | Default | Description|
|---|---|:---:|---|---|
|**`flex`** | _boolean_ | | | full width or not: see component principles|
|**`footer`** | `OdsCartManagerFooter` | | | describe what the footer is made of|
|**`i18n`** | `OdsI18nHook` | | | internationalisation system connector|
|**`period`** | `ODS_PERIOD_ISO_CODE` | | | ISO period code that describe the duration of a periodical payment|
|**`sections`** | _unknown_ | ✴️ | | Sections made of one item and multiple options|
|**`size`** | `sm` | | | size: see component principles|
|**`vatMode`** | _boolean_ | | | is the cart display the Value Added Tax|

### OdsCartManagerBehavior
|name | Type | Required | Default | Description|
|---|---|:---:|---|---|
|**`odsI18n`** | `OdsI18n` | ✴️ | | Ods I18n module|

### OdsCartManagerFooter
|name | Type | Required | Default | Description|
|---|---|:---:|---|---|
|**`items`** | _unknown_ | ✴️ | | |

### OdsCartManagerFooterItem
|name | Type | Required | Default | Description|
|---|---|:---:|---|---|
|**`extra`** | _string_ | | | extra information|
|**`price`** | _number_ | ✴️ | | amount without VAT included|
|**`subhead`** | _string_ | | | complementary information|
|**`title`** | _string_ | ✴️ | | |
|**`vat`** | _number_ | | | VAT amount|

### OdsCartManagerItem
|name | Type | Required | Default | Description|
|---|---|:---:|---|---|
|**`extra`** | _string_ | | | |
|**`price`** | _number_ | ✴️ | | |
|**`product`** | _boolean_ | | | is considered as a product or not|
|**`subhead`** | _string_ | | | |
|**`title`** | _string_ | ✴️ | | |
|**`vat`** | _number_ | | | |

### OdsCartManagerItemOption
|name | Type | Required | Default | Description|
|---|---|:---:|---|---|
|**`extra`** | _string_ | | | |
|**`price`** | _number_ | | | |
|**`product`** | _boolean_ | | | is considered as a product or not|
|**`subhead`** | _string_ | | | |
|**`title`** | _string_ | ✴️ | | |
|**`vat`** | _number_ | | | |

### OdsCartManagerMethods
|name | Type | Required | Default | Description|
|---|---|:---:|---|---|
|**`getProductQuantity`** | _number_ | ✴️ | | get the number of item flagged as product|
|**`getTotalAmount`** | _number_ | ✴️ | | get the total amount of the cart|

### OdsCartManagerSection
|name | Type | Required | Default | Description|
|---|---|:---:|---|---|
|**`item`** | `OdsCartManagerItem` | ✴️ | | |
|**`options`** | _unknown_ | ✴️ | | |

### OdsCartManagerTotal
|name | Type | Required | Default | Description|
|---|---|:---:|---|---|
|**`extra`** | _string_ | | | extra information|
|**`info`** | _string_ | | | complementary information|
|**`price`** | _number_ | | | price to display excluding VAT|
|**`total`** | _string_ | ✴️ | | total amount to display|
|**`vat`** | _number_ | | | amount of the VAT|

### OdsCartManagerTotalPrice
|name | Type | Required | Default | Description|
|---|---|:---:|---|---|
|**`price`** | _number_ | ✴️ | | |
|**`vat`** | _number_ | ✴️ | | |

## Classes

### OdsCartManagerController
_common controller logic for cart-manager component used by the different implementations._
_it contains all the glue between framework implementation and the third party service._

#### Methods
> **getProductQuantity**() => _unknown_

> **getTotalAmount**() => _unknown_

> **validateFooter**() => _unknown_


### OdsCartManagerMock

### OdsCartManagerService
#### Methods
> **getProductQuantity**() => _unknown_

> **getTotalAmount**() => _unknown_


## Type alias

### OdsCartManager

interface description of all implementation of `ods-cart-manager`.
each implementation must have defined events, methods, attributes
and one controller for the common behavior logic

> - `OdsComponentGenericMethods`
> - `OdsComponentGenericEvents`
### OdsCartManagerAttributes

> _Based on `OdsComponentAttributes`_
### OdsCartManagerEvents

> _Based on `OdsComponentEvents`_
### OdsCartManagerMethods

> _Based on `OdsComponentMethods`_
## Variables

### odsCartManagerDefaultAttributes
`OdsCartManagerAttributes`
Loading

0 comments on commit 9d3dca7

Please sign in to comment.