Skip to content

PWA-3450 : Commit for initial package after conversion from TypeScrip… #4462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
019969f
PWA-3450 : Commit for initial package after conversion from TypeScrip…
del15881 May 8, 2025
41e7a4c
PWA-3459 : Commit to Add the Live Search Popover to New Package
del15881 May 8, 2025
b6721c6
Fix Store Details not found Error on Private window and Safari Browser
del15881 May 22, 2025
b6d690f
Adding Eventing Dependencies and Replacing window mse with React mse …
del15881 May 23, 2025
a38fe8c
Adding Eventing Changes , Added new Queries, Hooks, Wrappers to trigg…
del15881 May 23, 2025
c668759
Adding Results Modifier Files to fix issues with Product Images and P…
del15881 May 29, 2025
ad7112a
Adding Additional Data For Context to store
del15881 May 29, 2025
dee31f2
Usig custom context to make use of utils with dynamic urls
del15881 May 29, 2025
28cfa20
Wrapping Main Loader component in the context
del15881 May 29, 2025
fb557d2
Removing Protocol from the Product Images
del15881 May 29, 2025
3189060
Adding Changes to Fix Product Images and Url issues in Popover and Se…
del15881 Jun 2, 2025
88a2579
Fixing Issue with Sortable Dropdown options, Extra argument was removed
del15881 Jun 5, 2025
aecb61f
Fixing Issues with Live search Loading/Shimmer Affect
del15881 Jun 5, 2025
c519d6b
Fixing issues during Live search rendering on Mobile View
del15881 Jun 6, 2025
0ccaae1
Adding Search Icon to the SearchBar
del15881 Jun 9, 2025
3010a79
Fix Console Warnings for duplicate keys
del15881 Jun 9, 2025
20e4249
Adding IDs to Fragments to Fix duplicate key issues
del15881 Jun 9, 2025
2c99233
Removing unwanted console logs
del15881 Jun 9, 2025
01d3770
Adding baseUrl, baseUrlwithoutProtocol as valid keys for fixing conso…
del15881 Jun 9, 2025
0e7399e
Fix Add to Cart button font size
del15881 Jun 10, 2025
54fba27
Revert the Changes as we are now making css as global instead of modules
del15881 Jun 10, 2025
f17db85
Fix font stylings
del15881 Jun 10, 2025
b494f39
Turn off CSS modules for applying global css styles
del15881 Jun 10, 2025
00a4e10
Fix the SearchBar Icon padding for focused input
del15881 Jun 10, 2025
802bdad
Fix Font size on Add to Cart button
del15881 Jun 10, 2025
47ad811
Fixing Product Item hover bugs and Mobile responsive padding issues
del15881 Jun 11, 2025
3cd00c3
PWA-3470: Fixing the Broken Error Screen , replacing with the 'Search…
del15881 Jun 18, 2025
24da3e3
PWA-3479: Worked to fix the Selected Filters on PLP and SRLP
del15881 Jun 18, 2025
f0ed3a9
PWA-3484 : Fix to Add Status indicator below search bar
del15881 Jun 19, 2025
57fa45c
Remove unwanted commented code
del15881 Jun 19, 2025
04ad8b0
Hide Swatches from Mobile Screens
del15881 Jun 19, 2025
7915415
Fix Swatch Selection Image Update Logic
del15881 Jun 19, 2025
e72ff81
Code butification after running prettier command
del15881 Jun 25, 2025
9658eea
Fix Prettier Bugs
del15881 Jun 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/extensions/venia-pwa-live-search/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@magento/venia-pwa-live-search",
"version": "1.0.0",
"description": "Live Search PWA Studio extension.",
"main": "src/index.jsx",
"scripts": {
"clean": " "
},
"repository": "https://github.com/github:magento/pwa-studio",
"license": "MIT",
"dependencies": {
"@magento/pwa-buildpack": "~11.5.3",
"@magento/storefront-search-as-you-type": "~1.0.4",
"@magento/venia-ui": "~11.5.0",
"currency-symbol-map": "^5.1.0",
"@adobe/commerce-events-sdk": "^1.13.0",
"@adobe/commerce-events-collectors": "^1.13.0"
},
"peerDependencies": {
"react": "^17.0.2"
},
"pwa-studio": {
"targets": {
"intercept": "src/targets/intercept"
}
}
}
9 changes: 9 additions & 0 deletions packages/extensions/venia-pwa-live-search/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
plugins: [
//require('postcss-import'),
require('tailwindcss/nesting')
//require('autoprefixer'),
//require('tailwindcss'),
//require('cssnano'),
]
};
193 changes: 193 additions & 0 deletions packages/extensions/venia-pwa-live-search/src/api/fragments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
/*
Copyright 2024 Adobe
All Rights Reserved.

NOTICE: Adobe permits you to use, modify, and distribute this file in
accordance with the terms of the Adobe license agreement accompanying
it.
*/

const Facet = `
fragment Facet on Aggregation {
title
attribute
buckets {
title
__typename
... on CategoryView {
name
count
path
}
... on ScalarBucket {
count
}
... on RangeBucket {
from
to
count
}
... on StatsBucket {
min
max
}
}
}
`;

const ProductView = `
fragment ProductView on ProductSearchItem {
productView {
id
__typename
sku
name
inStock
url
urlKey
images {
label
url
roles
}
... on ComplexProductView {
priceRange {
maximum {
final {
amount {
value
currency
}
}
regular {
amount {
value
currency
}
}
}
minimum {
final {
amount {
value
currency
}
}
regular {
amount {
value
currency
}
}
}
}
options {
id
title
values {
title
... on ProductViewOptionValueSwatch {
id
inStock
type
value
}
}
}
}
... on SimpleProductView {
price {
final {
amount {
value
currency
}
}
regular {
amount {
value
currency
}
}
}
}
}
highlights {
attribute
value
matched_words
}
}
`;

const Product = `
fragment Product on ProductSearchItem {
product {
__typename
sku
description {
html
}
short_description {
html
}
name
canonical_url
small_image {
url
}
image {
url
}
thumbnail {
url
}
price_range {
minimum_price {
fixed_product_taxes {
amount {
value
currency
}
label
}
regular_price {
value
currency
}
final_price {
value
currency
}
discount {
percent_off
amount_off
}
}
maximum_price {
fixed_product_taxes {
amount {
value
currency
}
label
}
regular_price {
value
currency
}
final_price {
value
currency
}
discount {
percent_off
amount_off
}
}
}
}
}
`;

export { Facet, ProductView, Product };
26 changes: 26 additions & 0 deletions packages/extensions/venia-pwa-live-search/src/api/graphql.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
async function getGraphQL(
query = '',
variables = {},
store = '',
baseUrl = ''
) {
const graphqlEndpoint = baseUrl
? `${baseUrl}/graphql`
: `${window.origin}/graphql`;

const response = await fetch(graphqlEndpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Store: store
},
body: JSON.stringify({
query,
variables
})
});

return response.json();
}

export { getGraphQL };
94 changes: 94 additions & 0 deletions packages/extensions/venia-pwa-live-search/src/api/mutations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
const CREATE_EMPTY_CART = `
mutation createEmptyCart($input: createEmptyCartInput) {
createEmptyCart(input: $input)
}
`;

const ADD_TO_CART = `
mutation addProductsToCart(
$cartId: String!
$cartItems: [CartItemInput!]!
) {
addProductsToCart(
cartId: $cartId
cartItems: $cartItems
) {
cart {
items {
product {
name
sku
}
quantity
}
}
user_errors {
code
message
}
}
}
`;

const ADD_TO_WISHLIST = `
mutation addProductsToWishlist(
$wishlistId: ID!
$wishlistItems: [WishlistItemInput!]!
) {
addProductsToWishlist(
wishlistId: $wishlistId
wishlistItems: $wishlistItems
) {
wishlist {
id
name
items_count
items_v2 {
items {
id
product {
uid
name
sku
}
}
}
}
}
}
`;

const REMOVE_FROM_WISHLIST = `
mutation removeProductsFromWishlist (
$wishlistId: ID!
$wishlistItemsIds: [ID!]!
) {
removeProductsFromWishlist(
wishlistId: $wishlistId
wishlistItemsIds: $wishlistItemsIds
) {
wishlist {
id
name
items_count
items_v2 {
items {
id
product {
uid
name
sku
}
}
}
}
}
}
`;

export {
CREATE_EMPTY_CART,
ADD_TO_CART,
ADD_TO_WISHLIST,
REMOVE_FROM_WISHLIST
};
Loading
Oops, something went wrong.