From 7ffd28ce865e769126158054e68d3bc3654c945f Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Wed, 10 Jul 2024 17:07:02 +0530 Subject: [PATCH 1/6] PWA-14.0.1 --- .../auto-generated/magento-compatibility.md | 3 ++ .../CouponCode/useCouponCode.md | 33 +++++++++++------- .../CartPage/PriceSummary/usePriceSummary.md | 13 ++++--- .../ProductListing/useProductListing.md | 34 +++++++++++-------- 4 files changed, 51 insertions(+), 32 deletions(-) diff --git a/src/data/auto-generated/magento-compatibility.md b/src/data/auto-generated/magento-compatibility.md index 064f2f4a..dc58c8e1 100644 --- a/src/data/auto-generated/magento-compatibility.md +++ b/src/data/auto-generated/magento-compatibility.md @@ -1,5 +1,7 @@ + | PWA Studio version | Magento core version| | :---: | :---: | +| 14.0.1 | 2.4.7-beta3 | | 14.0.0 | 2.4.7-beta3 | | 13.3.0 | 2.4.7-beta2 | | 13.2.0 | 2.4.7-beta1 | @@ -27,3 +29,4 @@ | 3.0.0 | 2.3.1 - 2.3.2 | | 2.1.0 | 2.3.1 | | 2.0.0 | 2.3.0 | + diff --git a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md index d98bc1fb..bb0cb913 100644 --- a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md +++ b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md @@ -1,3 +1,4 @@ + Functions <dl> @@ -49,6 +50,7 @@ This talon performs the following effects: </dd> </dl> + Typedefs <dl> @@ -131,6 +133,7 @@ It provides data to use when rendering a radio selector for shipping methods. </dd> </dl> + This talon contains the logic for a coupon code form component. It performs effects and returns props data for rendering the component. @@ -139,7 +142,7 @@ This talon performs the following effects: - Fetch all coupons associated with the cart - Manage the updating state of the cart while a coupon is being applied or removed -**Returns:** +**Returns: ** **Parameters** | Name | Type | Description | @@ -150,9 +153,7 @@ This talon performs the following effects: | props.queries | [`CouponCodeQueries`](#CouponCodeQueries) | GraphQL queries for a cart's coupon code. | **Example** *(Importing into your project)* - ```js - import { useCouponCode } from '@magento/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode'; ``` @@ -163,7 +164,7 @@ This talon performs the following effects: - Manage the updating state of the cart while the mutation for setting the shipping address is in flight -**Returns:** +**Returns: ** **Parameters** | Name | Type | Description | @@ -175,9 +176,7 @@ This talon performs the following effects: | props.queries | [`ShippingFormQueries`](#ShippingFormQueries) | GraphQL queries for the shipping form. | **Example** *(Importing into your project)* - ```js - import { useShippingForm } from '@magento/peregrine/lib/talons/CartPage/PriceAdjustments/ShippingMethods/useShippingForm'; ``` @@ -188,7 +187,7 @@ This talon performs the following effects: - Set the shipping form visibility value based on the shipping methods associated with the cart -**Returns:** +**Returns: ** **Parameters** | Name | Type | Description | @@ -197,9 +196,7 @@ This talon performs the following effects: | props.queries | [`ShippingMethodsQueries`](#ShippingMethodsQueries) | GraphQL queries for shipping methods | **Example** *(Importing into your project)* - ```js - import { useShippingMethods } from '@magento/peregrine/lib/talons/CartPage/PriceAdjustments/ShippingMethods/useShippingMethods'; ``` @@ -211,7 +208,7 @@ This talon performs the following effects: - Sets the value of the shipping method to a default value if there is no current method selected - Manage the updating state of the cart while a shipping method is being applied -**Returns:** +**Returns: ** **Parameters** | Name | Type | Description | @@ -223,9 +220,7 @@ This talon performs the following effects: | props.mutations | [`ShippingRadiosMutations`](#ShippingRadiosMutations) | GraphQL mutations for a shipping radio selector component. | **Example** *(Importing into your project)* - ```js - import { useShippingRadios } from '@magento/peregrine/lib/talons/CartPage/PriceAdjustments/ShippingMethods/useShippingRadios'; ``` @@ -241,6 +236,7 @@ for the queries used Venia | applyCouponMutation | `GraphQLAST` | Mutation for applying a coupon code to a cart. | | removeCouponMutation | `GraphQLAST` | Mutation for removing a coupon code from a cart. | + GraphQL queries for a cart's coupon code. This is a type used by the [useCouponCode](#useCouponCode) talon. @@ -252,6 +248,7 @@ for the queries used Venia | --- | --- | --- | | getAppliedCouponsQuery | `GraphQLAST` | Query to fetch the currently applied coupons for a cart. | + Object type returned by the [useCouponCode](#useCouponCode) talon. It provides props data to use when rendering a coupon code component. @@ -269,6 +266,7 @@ It provides props data to use when rendering a coupon code component. | handleRemoveCouponOnEnter | `function` | Function to call for handling the removal of a coupon code from a cart on enter key press. | | removingCoupon | `boolean` | True if a coupon code is currently being removed. False otherwise. | + Values for the select input fields on the shipping form. This is a prop used by the [useShippingForm](#useShippingForm) talon. @@ -280,6 +278,7 @@ This is a prop used by the [useShippingForm](#useShippingForm) talon. | region | `String` | Country's region shipping destination | | zip | `String` | Country's zip code shipping destination | + GraphQL mutations for the shipping form. This is a type used by the [useShippingForm](#useShippingForm) talon. @@ -291,6 +290,7 @@ for the query used in Venia | --- | --- | --- | | setShippingAddressMutation | `GraphQLAST` | Mutation for setting the shipping address on a cart | + GraphQL queries for the shipping form. This is a type used by the [useShippingForm](#useShippingForm) talon. @@ -302,6 +302,7 @@ for the query used in Venia | --- | --- | --- | | shippingMethodsQuery | `GraphQLAST` | Query for getting data about available shipping methods | + Object type returned by the [useShippingForm](#useShippingForm) talon. It provides props data to use when rendering a shipping form component. @@ -315,6 +316,7 @@ It provides props data to use when rendering a shipping form component. | handleZipChange | `function` | Callback function to handle a zip code change | | isSetShippingLoading | `boolean` | True if the cart shipping information is being set. False otherwise. | + GraphQL queries for shipping methods. This is a type used in the [useShippingMethods](#useShippingMethods) talon. @@ -326,6 +328,7 @@ for the queries used in Venia | --- | --- | --- | | getShippingMethodsQuery | `GraphQLAST` | Query to get the available shipping methods. | + Object type returned by the [useShippingMethods](#useShippingMethods) talon. It provides prop data to use when rendering shipping methods. @@ -341,6 +344,7 @@ It provides prop data to use when rendering shipping methods. | showForm | `function` | A function that sets the `isShowingForm` value to true. | | showFormOnEnter | `function` | A function that sets the `isShowingForm` value to true. | + GraphQL mutations for a shipping radio selector component. This is a type used by the [useShippingRadios](#useShippingRadios) talon. @@ -350,6 +354,7 @@ This is a type used by the [useShippingRadios](#useShippingRadios) talon. | --- | --- | --- | | setShippingMethodMutation | `GraphQLAST` | Mutation for setting the shipping method on a cart. | + Object type returned by the [useShippingRadios](#useShippingRadios) talon. It provides data to use when rendering a radio selector for shipping methods. @@ -360,4 +365,6 @@ It provides data to use when rendering a radio selector for shipping methods. | formattedShippingMethods | `Object` | Shipping method data that has been formatted. | | handleShippingSelection | `function` | Callback function for handling shipping selection form updates. | -**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.js) + + +**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.js) \ No newline at end of file diff --git a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md index 4463ccc0..d2df834c 100644 --- a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md +++ b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md @@ -1,3 +1,4 @@ + Functions <dl> @@ -14,6 +15,7 @@ This talon performs the following effects: </dd> </dl> + Typedefs <dl> @@ -37,6 +39,7 @@ Props used for rendering a price summary component. </dd> </dl> + This talon contains logic for a price summary component. It performs effects and returns prop data for rendering the component. @@ -44,7 +47,7 @@ This talon performs the following effects: - Log a GraphQL error if it occurs when getting the price summary -**Returns:** +**Returns: ** **Parameters** | Name | Type | Description | @@ -53,9 +56,7 @@ This talon performs the following effects: | props.queries | [`PriceSummaryQueries`](#PriceSummaryQueries) | GraphQL queries for a price summary component. | **Example** *(Importing into your project)* - ```js - import { usePriceSummary } from '@magento/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary'; ``` @@ -73,6 +74,7 @@ Query data flattened into a simple object. | taxes | `Array.<Object>` | Taxes applied to the cart | | shipping | `Array.<Object>` | Shipping addresses associated with this cart | + GraphQL queries for price summary component. **See**: [priceSummary.js](https://github.com/magento/pwa-studio/blob/develop/packages/venia-ui/lib/components/CartPage/PriceSummary/priceSummary.js) @@ -83,6 +85,7 @@ for the queries used in Venia. | --- | --- | --- | | getPriceSummary | `GraphQLAST` | Query to get the price summary for a cart | + Props used for rendering a price summary component. **Properties** @@ -95,4 +98,6 @@ Props used for rendering a price summary component. | isLoading | `boolean` | True while the GraphQL query is still in flight. False otherwise. | | flatData | [`FlattenedData`](#FlattenedData) | Query data that has been flattened into a simple object | -**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js) + + +**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js) \ No newline at end of file diff --git a/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md b/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md index 3ce517ba..c124fe0e 100644 --- a/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md +++ b/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md @@ -1,3 +1,4 @@ + Functions <dl> @@ -45,6 +46,7 @@ This talon performs the following effects: </dd> </dl> + Typedefs <dl> @@ -106,6 +108,7 @@ It provides props data for a product form UI component inside a modal. </dd> </dl> + This talon contains logic for a component that renders a list of products for a cart. It performs effects and returns prop data to render the component on a cart page. @@ -114,7 +117,7 @@ This talon performs the following effects: - Fetch product listing data associated with the cart - Log any GraphQL errors to the console -**Returns:** +**Returns: ** **Parameters** | Name | Type | Description | @@ -122,10 +125,8 @@ This talon performs the following effects: | props | `Object` | | | props.queries | [`ProductListingQueries`](#ProductListingQueries) | GraphQL queries for getting product listing data. | -**Example** *(Importing into your project)* - +**Example** *(Importing into your project)* ```js - import { useProductListing } from '@magento/peregrine/lib/talons/CartPage/ProductListing/useProductListing'; ``` @@ -136,7 +137,7 @@ This talon performs the following effects: - Manage the updating state of the cart while a product is being updated or removed -**Returns:** +**Returns: ** **Parameters** | Name | Type | Description | @@ -147,21 +148,17 @@ This talon performs the following effects: | props.setActiveEditItem | `function` | Function for setting the actively editing item | | props.setIsCartUpdating | `function` | Function for setting the updating state of the cart | -**Example** *(Importing into your project)* - +**Example** *(Importing into your project)* ```js - import { useProduct } from '@magento/peregrine/lib/talons/CartPage/ProductListing/useProduct'; ``` This talon contains logic for a product edit modal used on a cart page. It returns prop data for rendering an interactive modal component. -**Returns:** +**Returns: ** **Example** *(Importing into your project)* - ```js - import { useEditModal } from '@magento/peregrine/lib/talons/CartPage/ProductListing/EditModal/useEditModal'; ``` @@ -173,7 +170,7 @@ This talon performs the following effects: - Manage the updating state of the cart while form data is being saved - Set the variant price on a product depending on the product's options -**Returns:** +**Returns: ** **Parameters** | Name | Type | Description | @@ -188,9 +185,7 @@ This talon performs the following effects: | props.setActiveEditItem | `function` | Function for setting the actively editing item. | **Example** *(Importing into your project)* - ```js - import { useProductForm } from '@magento/peregrine/lib/talons/CartPage/ProductListing/EditModal/useProductForm'; ``` @@ -205,6 +200,7 @@ for the queries used in Venia | --- | --- | --- | | getProductListingQuery | `GraphQLDocument` | Query to get the product list for a cart | + Object type returned by the [useProductListing](#useProductListing) talon. It provides props data for a component that renders a product list. @@ -218,6 +214,7 @@ It provides props data for a component that renders a product list. | items | `Array.<Object>` | A list of products in a cart | | setActiveEditItem | `function` | Function for setting the current item to edit | + GraphQL mutations for a product in a cart. This is a type used by the [useProduct](#useProduct) talon. @@ -230,6 +227,7 @@ to see the mutations used in Venia | removeItemMutation | `GraphQLDocument` | Mutation for removing an item in a cart | | updateItemQuantityMutation | `GraphQLDocument` | Mutation for updating the item quantity in a cart | + Object type returned by the [useProduct](#useProduct) talon. It provides prop data for rendering a product component on a cart page. @@ -244,6 +242,7 @@ It provides prop data for rendering a product component on a cart page. | isEditable | `boolean` | True if a cart product is editable. False otherwise. | | product | [`ProductItem`](#ProductItem) | Cart product data | + Data about a product item in the cart. This type is used in the [ProductTalonProps](#ProductTalonProps) type returned by the [useProduct](#useProduct) talon. @@ -260,6 +259,7 @@ This type is used in the [ProductTalonProps](#ProductTalonProps) type returned b | urlKey | `String` | The product's url key | | urlSuffix | `String` | The product's url suffix | + Object type returned by the [useQuantityStepper](useQuantityStepper) talon. It provides props data for a quantity UI component. @@ -274,6 +274,7 @@ It provides props data for a quantity UI component. | handleIncrement | `function` | Callback function for handling an increment event | | maskInput | `function` | Function for masking a value when decimal values are allowed | + Object type returned by the [useEditModal](#useEditModal) talon. It provides props data for rendering an edit modal component. @@ -284,6 +285,7 @@ It provides props data for rendering an edit modal component. | setVariantPrice | `function` | Function for setting a product's variant price. | | variantPrice | `Object` | The variant price for a product. See [Money object](https://devdocs.magento.com/guides/v2.4/graphql/product/product-interface.html#Money). | + Object type returned by the [useProductForm](useProductForm) talon. It provides props data for a product form UI component inside a modal. @@ -301,4 +303,6 @@ It provides props data for a product form UI component inside a modal. | handleClose | `function` | A callback function for handling form closing | | configurableThumbnailSource | `String` | A string indicating which thumbnail should be used for configurable products | -**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/ProductListing/useProductListing.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/ProductListing/useProductListing.js) + + +**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/ProductListing/useProductListing.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/ProductListing/useProductListing.js) \ No newline at end of file From aaedb7b918caf6c1bf6d34bd58ab31e10649b527 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Wed, 10 Jul 2024 17:23:09 +0530 Subject: [PATCH 2/6] PWA-14.0.1 --- .../CouponCode/useCouponCode.md | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md index bb0cb913..ed13ab31 100644 --- a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md +++ b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md @@ -1,4 +1,3 @@ - Functions <dl> @@ -50,7 +49,6 @@ This talon performs the following effects: </dd> </dl> - Typedefs <dl> @@ -133,7 +131,6 @@ It provides data to use when rendering a radio selector for shipping methods. </dd> </dl> - This talon contains the logic for a coupon code form component. It performs effects and returns props data for rendering the component. @@ -142,7 +139,7 @@ This talon performs the following effects: - Fetch all coupons associated with the cart - Manage the updating state of the cart while a coupon is being applied or removed -**Returns: ** +**Returns: *** **Parameters** | Name | Type | Description | @@ -152,8 +149,10 @@ This talon performs the following effects: | props.mutations | [`CouponCodeMutations`](#CouponCodeMutations) | GraphQL mutations for a cart's coupon code. | | props.queries | [`CouponCodeQueries`](#CouponCodeQueries) | GraphQL queries for a cart's coupon code. | -**Example** *(Importing into your project)* +**Example** *(Importing into your project)* + ```js + import { useCouponCode } from '@magento/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode'; ``` @@ -164,7 +163,7 @@ This talon performs the following effects: - Manage the updating state of the cart while the mutation for setting the shipping address is in flight -**Returns: ** +**Returns: *** **Parameters** | Name | Type | Description | @@ -175,8 +174,10 @@ This talon performs the following effects: | props.mutations | [`ShippingFormMutations`](#ShippingFormMutations) | GraphQL mutations for the shipping form. | | props.queries | [`ShippingFormQueries`](#ShippingFormQueries) | GraphQL queries for the shipping form. | -**Example** *(Importing into your project)* +**Example** *(Importing into your project)* + ```js + import { useShippingForm } from '@magento/peregrine/lib/talons/CartPage/PriceAdjustments/ShippingMethods/useShippingForm'; ``` @@ -208,7 +209,7 @@ This talon performs the following effects: - Sets the value of the shipping method to a default value if there is no current method selected - Manage the updating state of the cart while a shipping method is being applied -**Returns: ** +**Returns: *** **Parameters** | Name | Type | Description | @@ -220,7 +221,9 @@ This talon performs the following effects: | props.mutations | [`ShippingRadiosMutations`](#ShippingRadiosMutations) | GraphQL mutations for a shipping radio selector component. | **Example** *(Importing into your project)* + ```js + import { useShippingRadios } from '@magento/peregrine/lib/talons/CartPage/PriceAdjustments/ShippingMethods/useShippingRadios'; ``` @@ -236,7 +239,6 @@ for the queries used Venia | applyCouponMutation | `GraphQLAST` | Mutation for applying a coupon code to a cart. | | removeCouponMutation | `GraphQLAST` | Mutation for removing a coupon code from a cart. | - GraphQL queries for a cart's coupon code. This is a type used by the [useCouponCode](#useCouponCode) talon. @@ -248,7 +250,6 @@ for the queries used Venia | --- | --- | --- | | getAppliedCouponsQuery | `GraphQLAST` | Query to fetch the currently applied coupons for a cart. | - Object type returned by the [useCouponCode](#useCouponCode) talon. It provides props data to use when rendering a coupon code component. @@ -266,7 +267,6 @@ It provides props data to use when rendering a coupon code component. | handleRemoveCouponOnEnter | `function` | Function to call for handling the removal of a coupon code from a cart on enter key press. | | removingCoupon | `boolean` | True if a coupon code is currently being removed. False otherwise. | - Values for the select input fields on the shipping form. This is a prop used by the [useShippingForm](#useShippingForm) talon. @@ -278,7 +278,6 @@ This is a prop used by the [useShippingForm](#useShippingForm) talon. | region | `String` | Country's region shipping destination | | zip | `String` | Country's zip code shipping destination | - GraphQL mutations for the shipping form. This is a type used by the [useShippingForm](#useShippingForm) talon. @@ -290,7 +289,6 @@ for the query used in Venia | --- | --- | --- | | setShippingAddressMutation | `GraphQLAST` | Mutation for setting the shipping address on a cart | - GraphQL queries for the shipping form. This is a type used by the [useShippingForm](#useShippingForm) talon. @@ -302,7 +300,6 @@ for the query used in Venia | --- | --- | --- | | shippingMethodsQuery | `GraphQLAST` | Query for getting data about available shipping methods | - Object type returned by the [useShippingForm](#useShippingForm) talon. It provides props data to use when rendering a shipping form component. @@ -316,7 +313,6 @@ It provides props data to use when rendering a shipping form component. | handleZipChange | `function` | Callback function to handle a zip code change | | isSetShippingLoading | `boolean` | True if the cart shipping information is being set. False otherwise. | - GraphQL queries for shipping methods. This is a type used in the [useShippingMethods](#useShippingMethods) talon. @@ -328,7 +324,6 @@ for the queries used in Venia | --- | --- | --- | | getShippingMethodsQuery | `GraphQLAST` | Query to get the available shipping methods. | - Object type returned by the [useShippingMethods](#useShippingMethods) talon. It provides prop data to use when rendering shipping methods. @@ -344,7 +339,6 @@ It provides prop data to use when rendering shipping methods. | showForm | `function` | A function that sets the `isShowingForm` value to true. | | showFormOnEnter | `function` | A function that sets the `isShowingForm` value to true. | - GraphQL mutations for a shipping radio selector component. This is a type used by the [useShippingRadios](#useShippingRadios) talon. @@ -354,7 +348,6 @@ This is a type used by the [useShippingRadios](#useShippingRadios) talon. | --- | --- | --- | | setShippingMethodMutation | `GraphQLAST` | Mutation for setting the shipping method on a cart. | - Object type returned by the [useShippingRadios](#useShippingRadios) talon. It provides data to use when rendering a radio selector for shipping methods. @@ -365,6 +358,4 @@ It provides data to use when rendering a radio selector for shipping methods. | formattedShippingMethods | `Object` | Shipping method data that has been formatted. | | handleShippingSelection | `function` | Callback function for handling shipping selection form updates. | - - **Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.js) \ No newline at end of file From 1f92947488c0a0a7b660b740c08978bed082dab8 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Wed, 10 Jul 2024 17:30:51 +0530 Subject: [PATCH 3/6] PWA-14.0.1 --- .../CartPage/PriceSummary/usePriceSummary.md | 11 ++------ .../ProductListing/useProductListing.md | 28 ++++++++----------- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md index d2df834c..230a834d 100644 --- a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md +++ b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md @@ -1,4 +1,3 @@ - Functions <dl> @@ -15,7 +14,6 @@ This talon performs the following effects: </dd> </dl> - Typedefs <dl> @@ -39,7 +37,6 @@ Props used for rendering a price summary component. </dd> </dl> - This talon contains logic for a price summary component. It performs effects and returns prop data for rendering the component. @@ -47,7 +44,7 @@ This talon performs the following effects: - Log a GraphQL error if it occurs when getting the price summary -**Returns: ** +**Returns: *** **Parameters** | Name | Type | Description | @@ -56,7 +53,9 @@ This talon performs the following effects: | props.queries | [`PriceSummaryQueries`](#PriceSummaryQueries) | GraphQL queries for a price summary component. | **Example** *(Importing into your project)* + ```js + import { usePriceSummary } from '@magento/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary'; ``` @@ -74,7 +73,6 @@ Query data flattened into a simple object. | taxes | `Array.<Object>` | Taxes applied to the cart | | shipping | `Array.<Object>` | Shipping addresses associated with this cart | - GraphQL queries for price summary component. **See**: [priceSummary.js](https://github.com/magento/pwa-studio/blob/develop/packages/venia-ui/lib/components/CartPage/PriceSummary/priceSummary.js) @@ -85,7 +83,6 @@ for the queries used in Venia. | --- | --- | --- | | getPriceSummary | `GraphQLAST` | Query to get the price summary for a cart | - Props used for rendering a price summary component. **Properties** @@ -98,6 +95,4 @@ Props used for rendering a price summary component. | isLoading | `boolean` | True while the GraphQL query is still in flight. False otherwise. | | flatData | [`FlattenedData`](#FlattenedData) | Query data that has been flattened into a simple object | - - **Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js) \ No newline at end of file diff --git a/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md b/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md index c124fe0e..3372d47d 100644 --- a/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md +++ b/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md @@ -1,4 +1,3 @@ - Functions <dl> @@ -46,7 +45,6 @@ This talon performs the following effects: </dd> </dl> - Typedefs <dl> @@ -108,7 +106,6 @@ It provides props data for a product form UI component inside a modal. </dd> </dl> - This talon contains logic for a component that renders a list of products for a cart. It performs effects and returns prop data to render the component on a cart page. @@ -117,7 +114,7 @@ This talon performs the following effects: - Fetch product listing data associated with the cart - Log any GraphQL errors to the console -**Returns: ** +**Returns: *** **Parameters** | Name | Type | Description | @@ -126,7 +123,9 @@ This talon performs the following effects: | props.queries | [`ProductListingQueries`](#ProductListingQueries) | GraphQL queries for getting product listing data. | **Example** *(Importing into your project)* + ```js + import { useProductListing } from '@magento/peregrine/lib/talons/CartPage/ProductListing/useProductListing'; ``` @@ -137,7 +136,7 @@ This talon performs the following effects: - Manage the updating state of the cart while a product is being updated or removed -**Returns: ** +**Returns: *** **Parameters** | Name | Type | Description | @@ -149,16 +148,20 @@ This talon performs the following effects: | props.setIsCartUpdating | `function` | Function for setting the updating state of the cart | **Example** *(Importing into your project)* + ```js + import { useProduct } from '@magento/peregrine/lib/talons/CartPage/ProductListing/useProduct'; ``` This talon contains logic for a product edit modal used on a cart page. It returns prop data for rendering an interactive modal component. -**Returns: ** +**Returns: *** **Example** *(Importing into your project)* + ```js + import { useEditModal } from '@magento/peregrine/lib/talons/CartPage/ProductListing/EditModal/useEditModal'; ``` @@ -170,7 +173,7 @@ This talon performs the following effects: - Manage the updating state of the cart while form data is being saved - Set the variant price on a product depending on the product's options -**Returns: ** +**Returns: *** **Parameters** | Name | Type | Description | @@ -185,7 +188,9 @@ This talon performs the following effects: | props.setActiveEditItem | `function` | Function for setting the actively editing item. | **Example** *(Importing into your project)* + ```js + import { useProductForm } from '@magento/peregrine/lib/talons/CartPage/ProductListing/EditModal/useProductForm'; ``` @@ -200,7 +205,6 @@ for the queries used in Venia | --- | --- | --- | | getProductListingQuery | `GraphQLDocument` | Query to get the product list for a cart | - Object type returned by the [useProductListing](#useProductListing) talon. It provides props data for a component that renders a product list. @@ -214,7 +218,6 @@ It provides props data for a component that renders a product list. | items | `Array.<Object>` | A list of products in a cart | | setActiveEditItem | `function` | Function for setting the current item to edit | - GraphQL mutations for a product in a cart. This is a type used by the [useProduct](#useProduct) talon. @@ -227,7 +230,6 @@ to see the mutations used in Venia | removeItemMutation | `GraphQLDocument` | Mutation for removing an item in a cart | | updateItemQuantityMutation | `GraphQLDocument` | Mutation for updating the item quantity in a cart | - Object type returned by the [useProduct](#useProduct) talon. It provides prop data for rendering a product component on a cart page. @@ -242,7 +244,6 @@ It provides prop data for rendering a product component on a cart page. | isEditable | `boolean` | True if a cart product is editable. False otherwise. | | product | [`ProductItem`](#ProductItem) | Cart product data | - Data about a product item in the cart. This type is used in the [ProductTalonProps](#ProductTalonProps) type returned by the [useProduct](#useProduct) talon. @@ -259,7 +260,6 @@ This type is used in the [ProductTalonProps](#ProductTalonProps) type returned b | urlKey | `String` | The product's url key | | urlSuffix | `String` | The product's url suffix | - Object type returned by the [useQuantityStepper](useQuantityStepper) talon. It provides props data for a quantity UI component. @@ -274,7 +274,6 @@ It provides props data for a quantity UI component. | handleIncrement | `function` | Callback function for handling an increment event | | maskInput | `function` | Function for masking a value when decimal values are allowed | - Object type returned by the [useEditModal](#useEditModal) talon. It provides props data for rendering an edit modal component. @@ -285,7 +284,6 @@ It provides props data for rendering an edit modal component. | setVariantPrice | `function` | Function for setting a product's variant price. | | variantPrice | `Object` | The variant price for a product. See [Money object](https://devdocs.magento.com/guides/v2.4/graphql/product/product-interface.html#Money). | - Object type returned by the [useProductForm](useProductForm) talon. It provides props data for a product form UI component inside a modal. @@ -303,6 +301,4 @@ It provides props data for a product form UI component inside a modal. | handleClose | `function` | A callback function for handling form closing | | configurableThumbnailSource | `String` | A string indicating which thumbnail should be used for configurable products | - - **Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/ProductListing/useProductListing.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/ProductListing/useProductListing.js) \ No newline at end of file From a907f91c6cc66726858403a54c90936be8432f01 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Wed, 10 Jul 2024 17:37:32 +0530 Subject: [PATCH 4/6] PWA-14.0.1 --- .../PriceAdjustments/CouponCode/useCouponCode.md | 12 +++++++----- .../talons/CartPage/PriceSummary/usePriceSummary.md | 2 +- .../CartPage/ProductListing/useProductListing.md | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md index ed13ab31..54751e26 100644 --- a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md +++ b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.md @@ -174,7 +174,7 @@ This talon performs the following effects: | props.mutations | [`ShippingFormMutations`](#ShippingFormMutations) | GraphQL mutations for the shipping form. | | props.queries | [`ShippingFormQueries`](#ShippingFormQueries) | GraphQL queries for the shipping form. | -**Example** *(Importing into your project)* +**Example** *(Importing into your project)* ```js @@ -188,7 +188,7 @@ This talon performs the following effects: - Set the shipping form visibility value based on the shipping methods associated with the cart -**Returns: ** +**Returns: *** **Parameters** | Name | Type | Description | @@ -196,8 +196,10 @@ This talon performs the following effects: | props | `Object` | | | props.queries | [`ShippingMethodsQueries`](#ShippingMethodsQueries) | GraphQL queries for shipping methods | -**Example** *(Importing into your project)* +**Example** *(Importing into your project)* + ```js + import { useShippingMethods } from '@magento/peregrine/lib/talons/CartPage/PriceAdjustments/ShippingMethods/useShippingMethods'; ``` @@ -220,7 +222,7 @@ This talon performs the following effects: | props.shippingMethods | `Array.<Object>` | An array of available shipping methods | | props.mutations | [`ShippingRadiosMutations`](#ShippingRadiosMutations) | GraphQL mutations for a shipping radio selector component. | -**Example** *(Importing into your project)* +**Example** *(Importing into your project)* ```js @@ -358,4 +360,4 @@ It provides data to use when rendering a radio selector for shipping methods. | formattedShippingMethods | `Object` | Shipping method data that has been formatted. | | handleShippingSelection | `function` | Callback function for handling shipping selection form updates. | -**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.js) \ No newline at end of file +**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/useCouponCode.js) diff --git a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md index 230a834d..b80504cd 100644 --- a/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md +++ b/src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md @@ -95,4 +95,4 @@ Props used for rendering a price summary component. | isLoading | `boolean` | True while the GraphQL query is still in flight. False otherwise. | | flatData | [`FlattenedData`](#FlattenedData) | Query data that has been flattened into a simple object | -**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js) \ No newline at end of file +**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js) diff --git a/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md b/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md index 3372d47d..3ff3ffcd 100644 --- a/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md +++ b/src/data/auto-generated/peregrine/lib/talons/CartPage/ProductListing/useProductListing.md @@ -301,4 +301,4 @@ It provides props data for a product form UI component inside a modal. | handleClose | `function` | A callback function for handling form closing | | configurableThumbnailSource | `String` | A string indicating which thumbnail should be used for configurable products | -**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/ProductListing/useProductListing.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/ProductListing/useProductListing.js) \ No newline at end of file +**Source Code**: [pwa-studio/packages/peregrine/lib/talons/CartPage/ProductListing/useProductListing.js](https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/CartPage/ProductListing/useProductListing.js) From bdeb3a63aa1b57a2ea5f09d958ec45bbed453e53 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Wed, 10 Jul 2024 17:41:01 +0530 Subject: [PATCH 5/6] PWA-14.0.1 --- src/data/auto-generated/magento-compatibility.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/data/auto-generated/magento-compatibility.md b/src/data/auto-generated/magento-compatibility.md index dc58c8e1..331e6d9c 100644 --- a/src/data/auto-generated/magento-compatibility.md +++ b/src/data/auto-generated/magento-compatibility.md @@ -29,4 +29,3 @@ | 3.0.0 | 2.3.1 - 2.3.2 | | 2.1.0 | 2.3.1 | | 2.0.0 | 2.3.0 | - From feb5c7a462717bd50621af3f18f4ae52bdf22446 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Wed, 10 Jul 2024 17:52:05 +0530 Subject: [PATCH 6/6] PWA-14.0.1 --- src/pages/tutorials/setup-storefront/file-structure/index.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/tutorials/setup-storefront/file-structure/index.md b/src/pages/tutorials/setup-storefront/file-structure/index.md index 6f043a6f..4bf6a6d8 100644 --- a/src/pages/tutorials/setup-storefront/file-structure/index.md +++ b/src/pages/tutorials/setup-storefront/file-structure/index.md @@ -35,8 +35,6 @@ src This directory contains configurations for [Storybook][] testing. You can delete this directory if you do not need it. -[storybook]: https://storybook.js.org/docs/react/workflows/testing-with-storybook - ### `ServiceWorker` The ServiceWorker directory contains all the logic for providing [service worker features][].