Skip to content

Commit

Permalink
MWPW-152411 raw md doc for web components & events
Browse files Browse the repository at this point in the history
- will need some jsdocs flesh in comments for both components & events,
- can be linked from or to with card specific doc pages
  • Loading branch information
npeltier committed Sep 18, 2024
1 parent abcb834 commit 055424f
Show file tree
Hide file tree
Showing 7 changed files with 1,362 additions and 1,122 deletions.
133 changes: 133 additions & 0 deletions libs/deps/mas/doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# a[data-wcs-osi]

HTML Checkout Link Anchor element, extends anchor

## Events

| Event |
|---------------|
| `merch:click` |


# span[data-wcs-osi]

HTML Price Web Component, extends span


# wcms-commerce

Custom web component to provide active instance of commerce service
to consumers, appended to the head section of current document.


# merch-card-collection

## Events

| Event | Type |
|----------------------------------|--------------------------------|
| `merch-card-collection:showmore` | `CustomEvent<any>` |
| `merch-card-collection:sort` | `CustomEvent<{ value: any; }>` |


# merch-card

## Events

| Event | Type |
|------------------------|--------------------------------------|
| `merch-card:ready` | `CustomEvent<any>` |
| `merch-storage:change` | `CustomEvent<{ offerSelect: any; }>` |


# merch-datasource

Custom element representing a MerchDataSource.


# merch-icon


# merch-mnemonic-list


# merch-offer-select

## Events

| Event | Type |
|----------------------------|---------------------|
| `merch-offer-select:ready` | `CustomEvent<any>` |
| `merch-offer:selected` | `CustomEvent<this>` |


# merch-offer

## Events

| Event | Type |
|---------------------|--------------------|
| `merch-offer:ready` | `CustomEvent<any>` |


# merch-quantity-select

## Events

| Event | Type |
|----------------------------------|------------------------------------|
| `merch-quantity-selector:change` | `CustomEvent<{ option: number; }>` |


# merch-search

## Events

| Event | Type |
|-----------------------|-------------------------------------------------|
| `merch-search:change` | `CustomEvent<{ type: string; value: string; }>` |


# merch-secure-transaction


# merch-stock

## Events

| Event | Type |
|----------------------|-------------------------------------------------|
| `merch-stock:change` | `CustomEvent<{ checked: any; planType: any; }>` |


# merch-subscription-panel


# merch-twp-d2p


# merch-whats-included

## Events

| Event | Type |
|--------------------------|--------------------|
| `hide-see-more-elements` | `CustomEvent<any>` |


# plans-modal


# merch-sidenav-checkbox-group


# merch-sidenav-list

## Events

| Event | Type |
|------------------------|--------------------------------------------------|
| `merch-sidenav:select` | `CustomEvent<{ type: string; value: any; elt: any; }>` |


# merch-sidenav
2,176 changes: 1,086 additions & 1,090 deletions libs/deps/mas/mas.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions libs/features/mas/commerce/src/checkout-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import { selectOffers, useService } from './utilities.js';
export const CLASS_NAME_DOWNLOAD = 'download';
export const CLASS_NAME_UPGRADE = 'upgrade';

/**
* HTML Checkout Link Anchor element, extends anchor
*
* @element a[data-wcs-osi]
* @fires merch:click
*/
export class HTMLCheckoutAnchorElement extends HTMLAnchorElement {
static is = 'checkout-link';
static tag = 'a';
Expand Down
6 changes: 5 additions & 1 deletion libs/features/mas/commerce/src/inline-price.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ const DISPLAY_TAX_MAP = {
TEAM_EDU: [GeoMap.sea, GeoMap.kr], // school and uni
};

/** @type {Commerce.Price.PlaceholderConstructor} */
/**
* HTML Price Web Component, extends span
*
* @element span[data-wcs-osi]
**/
export class HTMLPriceSpanElement extends HTMLSpanElement {
static is = 'inline-price';
static tag = 'span';
Expand Down
Loading

0 comments on commit 055424f

Please sign in to comment.