-
Notifications
You must be signed in to change notification settings - Fork 3
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 quantity
- Loading branch information
Showing
86 changed files
with
1,032 additions
and
428 deletions.
There are no files selected for viewing
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
2 changes: 2 additions & 0 deletions
2
...es/stencil/components/quantity/.gitignore → packages-new/components/quantity/.gitignore
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
dist/ | ||
custom-elements/ | ||
custom-elements-bundle/ | ||
www/ | ||
loader/ | ||
docs-api | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
81 changes: 81 additions & 0 deletions
81
packages-new/components/quantity/documentation/specifications/spec.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,81 @@ | ||
* [**Interfaces**](#interfaces) | ||
* [**Classes**](#classes) | ||
* [**Type alias**](#type-alias) | ||
* [**Variables**](#variables) | ||
|
||
## Interfaces | ||
|
||
### OdsQuantityAttributes | ||
|name | Type | Required | Default | Description| | ||
|---|---|:---:|---|---| | ||
|**`disabled`** | _boolean_ | | | Quantity is disabled or not| | ||
|
||
### OdsQuantityBehavior | ||
|name | Type | Required | Default | Description| | ||
|---|---|:---:|---|---| | ||
|**`el`** | `HTMLElement` | ✴️ | | reference to the host element.| | ||
|**`input`** | `null` \| `HTMLInputElement` \| `undefined` | ✴️ | | reference to the osds-input or native input element inside the component.could be null if the reference is not yet filled.| | ||
|**`minus`** | `null` \| `HTMLSlotElement` | ✴️ | | reference to the minus slot inside the component.could be null if the reference is not yet filled.| | ||
|**`plus`** | `null` \| `HTMLSlotElement` | ✴️ | | reference to the plus slot inside the component.could be null if the reference is not yet filled.| | ||
|**`afterInit`** | _void_ | ✴️ | | after init component functionshould be called after component loadsshould process input value change| | ||
|**`afterRender`** | _void_ | ✴️ | | after render component functionshould be called after component rendershould init inputshould init slots| | ||
|**`onDestroy`** | _void_ | ✴️ | | after init component functionshould be called after component loadsshould clear event listeners| | ||
|
||
## Classes | ||
|
||
### OdsQuantityController | ||
_common controller logic for chip component used by the different implementations._ | ||
_it contains all the glue between framework implementation and the third party service._ | ||
|
||
#### Methods | ||
> **clearEventListeners**() => _unknown_ | ||
|
||
> **initInput**() => _unknown_ | ||
|
||
> **initSlots**() => _unknown_ | ||
|
||
> **minusClickHandler**() => _unknown_ | ||
|
||
> **plusClickHandler**() => _unknown_ | ||
|
||
> **processInputValueChange**() => _unknown_ | ||
|
||
> **setDisabledOnChildren**() => _unknown_ | ||
|
||
|
||
### OdsQuantityMock | ||
_Mocked generic implementation that represents an `OdsQuantity`._ | ||
_it allows to test the controller with a stub implementation._ | ||
|
||
|
||
## Type alias | ||
|
||
### OdsQuantity | ||
|
||
interface description of all implementation of `ods-quantity`. | ||
each implementation must have defined events, methods, attributes | ||
and one controller for the common behavior logic | ||
|
||
> - `OdsComponentGenericMethods` | ||
> - `OdsComponentGenericEvents` | ||
### OdsQuantityEvents | ||
|
||
### OdsQuantityMethods | ||
|
||
### OdsQuantityAttributes | ||
|
||
> _Based on `OdsComponentAttributes`_ | ||
## Variables | ||
|
||
### odsQuantityDefaultAttributes | ||
`OdsQuantityAttributes` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
...ents/quantity/specifications-quantity.mdx → ...pecifications/specifications-quantity.mdx
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
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
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
...ages-new/components/quantity/src/components/osds-quantity/constants/default-attributes.ts
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,9 @@ | ||
import type { OdsQuantityAttribute } from '../interfaces/attributes'; | ||
|
||
const DEFAULT_ATTRIBUTE: OdsQuantityAttribute = Object.freeze({ | ||
disabled: false | ||
}); | ||
|
||
export { | ||
DEFAULT_ATTRIBUTE, | ||
}; |
Oops, something went wrong.