-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(arch): move && simplify component cart
- Loading branch information
Showing
322 changed files
with
3,804 additions
and
2,482 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
39 changes: 39 additions & 0 deletions
39
packages-new/components/cart/documentation/specifications/cartFooterItemSpec.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
69 changes: 69 additions & 0 deletions
69
packages-new/components/cart/documentation/specifications/cartFooterSpec.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
39 changes: 39 additions & 0 deletions
39
packages-new/components/cart/documentation/specifications/cartItemOptionSpec.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
76 changes: 76 additions & 0 deletions
76
packages-new/components/cart/documentation/specifications/cartItemSpec.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
140 changes: 140 additions & 0 deletions
140
packages-new/components/cart/documentation/specifications/cartManagerSpec.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
Oops, something went wrong.