Skip to content
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

SCP 4.7.1-beta2 Release #442

Closed
wants to merge 114 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
7963d99
Update fstab.yaml
herzog31 Oct 30, 2023
6028f3a
Configure folder mapping
herzog31 Oct 30, 2023
4b6c1a8
Add basic PLP (#1)
herzog31 Nov 1, 2023
8cc3d80
Add PDP (#2)
herzog31 Nov 1, 2023
d031299
Add search and block placeholders
herzog31 Nov 1, 2023
d123be1
Define LCP blocks
herzog31 Nov 2, 2023
b5bf78e
Add commerce picker (#4)
herzog31 Nov 2, 2023
9a8a38f
Merge branch 'adobe:main' into main
herzog31 Nov 2, 2023
574e5d9
Add minicart (#5)
herzog31 Nov 2, 2023
0cb7082
Enrichment query index
herzog31 Nov 3, 2023
1ec62b3
Add enrichment functionality (#6)
herzog31 Nov 3, 2023
9def82f
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Nov 13, 2023
2080380
Update README
herzog31 Nov 13, 2023
09d34b8
Add storefront events to PLP (#14)
herzog31 Nov 20, 2023
7d1c21e
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Nov 20, 2023
f43a7b2
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Dec 6, 2023
14ad7d6
Add AEM CLI to package.json
herzog31 Dec 12, 2023
7130b07
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Dec 20, 2023
e4a8645
Replace removed CSS variables
herzog31 Jan 8, 2024
3a6cd4c
Add Dropin base design system (#16)
herzog31 Jan 15, 2024
dd12fa5
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Jan 15, 2024
c6bba24
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Jan 24, 2024
fc88fa3
Multi config support for picker (#23)
herzog31 Jan 31, 2024
8b772ac
Add product teaser block (#22)
herzog31 Jan 31, 2024
e3e7814
Update search and minicart styles (#30)
herzog31 Jan 31, 2024
8928f90
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Feb 5, 2024
5eca7a0
Enrichment bug fixes (#35)
herzog31 Feb 13, 2024
c79f666
Add Live Search Widgets (EDS Delivery) (#18)
herzog31 Feb 26, 2024
a30adf1
Fix enrichment bug (#39)
herzog31 Mar 1, 2024
bd7dc07
Optimize performance of Commerce blocks (#44)
herzog31 Mar 7, 2024
6e764c1
Add recommendations block with ACDL (#11)
herzog31 Mar 15, 2024
2dfc035
Add storefront events SDK and collector (#21)
herzog31 Mar 15, 2024
88cedae
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Mar 15, 2024
8bb30c5
Update .hlxignore (#45)
herzog31 Mar 21, 2024
e86b5ad
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Mar 21, 2024
57e6594
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Apr 11, 2024
60e6882
Add page view event (#47)
herzog31 Apr 16, 2024
84e2449
Fix filters of custom PLP block
herzog31 Apr 17, 2024
1dfe176
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Apr 17, 2024
3f1e570
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Apr 18, 2024
7e72d62
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Apr 19, 2024
2a2462c
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 May 7, 2024
c0cc8ec
feat: add experimentation plugin (#24)
ramboz May 13, 2024
898ea79
Add getConsent method (#53)
herzog31 May 21, 2024
8594b76
Bulk improvements (#57)
herzog31 May 22, 2024
7d4fc38
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 May 27, 2024
d59bbce
Add PDP Dropin (#59)
herzog31 May 29, 2024
a7122e2
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Jun 6, 2024
ff56cb8
Update README.md
herzog31 Jun 6, 2024
ee9d9b0
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Jun 7, 2024
b6b98b8
Split config files (#62)
herzog31 Jun 13, 2024
d0580fe
Add placeholders to PDP (#65)
herzog31 Jun 14, 2024
7fde5a3
Improve product recommendations (#67)
herzog31 Jun 14, 2024
01f1e47
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Jun 20, 2024
7302e01
Remove nullsearch RUM event (#69)
herzog31 Jun 26, 2024
52f17c9
Add PDP events (#68)
alandana Jun 28, 2024
fd5f9e1
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Jun 28, 2024
0535144
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Jul 2, 2024
7dfabd7
Update AEM CLI
herzog31 Jul 5, 2024
511d365
add wishlist implementation (#70)
hannessolo Jul 9, 2024
245da6d
Fix invalid storefront events (#76)
herzog31 Jul 10, 2024
0c3cd2f
Remove renderLabel from custom PDP
herzog31 Jul 10, 2024
fe8d9c9
Update PDP to v0.3.0 (#79)
alandana Jul 12, 2024
314ae68
Fix PDP 404 pages (#71)
herzog31 Jul 12, 2024
263805f
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Jul 16, 2024
f3bc8e8
Multiple Storefront Event Fixes (#82)
herzog31 Jul 17, 2024
4b2afc7
Add PDP metadata script (#72)
herzog31 Jul 18, 2024
b7f7b9a
Remove default query params for custom PLP (#81)
herzog31 Jul 18, 2024
24a849d
Remove case changes from product SKUs (#84)
herzog31 Jul 19, 2024
040cd07
Fix loading of dropins with speculation rule pre-rendering (#86)
herzog31 Jul 25, 2024
e4d9117
fix: prevent soft 404 errors (#89)
dicagno Jul 29, 2024
bafeb72
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Aug 30, 2024
14c20e9
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Sep 9, 2024
5c6ad40
Remove catalog service preconnect tags (#97)
herzog31 Sep 13, 2024
40fe81e
uses proper domain to determine config loading
sirugh Sep 16, 2024
0f0d9f4
Added missing run-e2e-tests.yaml file to GH workflows (#109)
bl4de Sep 23, 2024
9577511
Revert "Added missing run-e2e-tests.yaml file to GH workflows (#109)"
sirugh Sep 23, 2024
6095ff0
render json ld to products metadata sheet (#105)
hannessolo Sep 25, 2024
08080d9
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Sep 26, 2024
a6c6133
Allow customizing the API url for product listing page widget (#120)
herzog31 Oct 4, 2024
d5788fc
Update API url of search as you type widget (#121)
herzog31 Oct 8, 2024
a6b6505
Add support for multiple configs to product picker (#122)
herzog31 Oct 8, 2024
5f6344f
[PDP] updated PDP to latest (#93)
alandana Oct 10, 2024
2c2c6e1
chore: update commerce-events-collector to 1.11.0 (#128)
sirugh Oct 10, 2024
4145902
Update hostname for metadata script
herzog31 Oct 10, 2024
39a6070
Fixes for Prex events (#130)
herzog31 Oct 11, 2024
f4e8c5a
Add expiry to config session storage cache (#78)
herzog31 Oct 14, 2024
b8ee91e
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Oct 17, 2024
8631100
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Oct 31, 2024
dca8aff
Update recommendationsContext and productContext to include only requ…
herzog31 Oct 31, 2024
59834f8
fixed placeholders (#172)
fnhipster Nov 7, 2024
f8e50e1
Fix PRex on cart page (#178)
herzog31 Nov 8, 2024
0bf4a13
Add robots.txt (#87)
herzog31 Nov 18, 2024
e6f529f
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Nov 18, 2024
cec54a9
Add preact and htm to postinstall (#211)
herzog31 Nov 21, 2024
d516736
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Nov 25, 2024
6cc6c93
Include last-modified in metadata (#210)
herzog31 Nov 26, 2024
1082959
Add null check for product recommendation image (#217)
herzog31 Nov 27, 2024
a7e477e
Add sitemap index
herzog31 Dec 6, 2024
ed7a9d4
Add sitemap config
herzog31 Dec 6, 2024
c6a7d76
Update helix-query.yaml
herzog31 Dec 6, 2024
50dd54b
Update robots with new sitemap
herzog31 Dec 6, 2024
415424c
Add GSC validation
herzog31 Dec 6, 2024
d9a744d
Remove GSC validation
herzog31 Dec 6, 2024
c49fd4d
🛒 Commerce Dropins 🛒 (#95)
sirugh Dec 13, 2024
63a24ad
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Dec 16, 2024
323201f
Remove domain verification
herzog31 Dec 16, 2024
7e7dc52
fix recs test
sirugh Dec 16, 2024
9eee699
Update commerce-events packages
herzog31 Dec 16, 2024
6b3b38f
DA Live Preview (#256)
auniverseaway Dec 16, 2024
8acdea0
chore: use default sheets and named config files (#262)
sirugh Dec 16, 2024
19d1799
Add cypress test for cart event (#263)
anthoula Dec 16, 2024
1f1e251
Merge branch 'main' of github.com:adobe/aem-boilerplate
herzog31 Jan 6, 2025
6cabb13
SCP 4.7.1-beta2 Release
cod40403 Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 11 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
helix-importer-ui
helix-importer-ui
scripts/htm.js
scripts/acdl
tools/picker
tools/pdp-metadata
scripts/__dropins__
scripts/commerce-events-collector.js
scripts/commerce-events-sdk.js
scripts/widgets
plugins/
cypress/
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@ module.exports = {
'import/extensions': ['error', { js: 'always' }], // require js file extensions in imports
'linebreak-style': ['error', 'unix'], // enforce unix linebreaks
'no-param-reassign': [2, { props: false }], // allow modifying properties of param
'no-use-before-define': [2, { functions: false }],
'no-console': [
'error',
{
allow: ['warn', 'error', 'info', 'debug'],
},
],
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
},
};
25 changes: 25 additions & 0 deletions .github/workflows/run-e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Cypress E2E Tests
on: push
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install root dependencies
run: npm ci
- name: Start server in the background
run: npm start &

- name: Install Cypress and run tests
uses: cypress-io/github-action@v6
with:
working-directory: cypress
browser: chrome
wait-on: 'http://localhost:3000'
config: baseUrl=http://localhost:3000
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
.hlx/*
coverage/*
logs/*
node_modules/*
node_modules
.parcel-cache

helix-importer-ui
.DS_Store
*.bak
.idea
# Ignore .map files in scripts/__dropins__/ directory and all its subdirectories
scripts/__dropins__/**/*.map
6 changes: 6 additions & 0 deletions .hlxignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
.*
*.md
*.d.ts
karma.config.js
LICENSE
package.json
package-lock.json
test/*
postinstall.js
build.mjs
tools/picker/src/*
cypress/
tools/pdp-metadata/*
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
; force @adobe namespaced packages to be installed from npmjs.org
@adobe:registry=https://registry.npmjs.org
19 changes: 16 additions & 3 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@

<head>
<title>Page not found</title>
<script type="importmap">
{
"imports": {
"@dropins/tools/": "/scripts/__dropins__/tools/",
"@dropins/storefront-cart/": "/scripts/__dropins__/storefront-cart/",
"@dropins/storefront-auth/": "/scripts/__dropins__/storefront-auth/"
}
}
</script>
<script type="text/javascript">
window.isErrorPage = true;
window.errorCode = '404';
</script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="Page not found">
<script src="/scripts/scripts.js" type="module" crossorigin="use-credentials"></script>
<script src="/scripts/scripts.js" type="module"></script>
<script type="module">
window.addEventListener('load', () => {
if (document.referrer) {
Expand All @@ -33,9 +42,13 @@
<link rel="stylesheet" href="/styles/styles.css">
<style>
main.error {
min-height: calc(100vh - var(--nav-height));
display: flex;
align-items: center;
display: flex;
margin: 0 auto;
max-width: 1264px;
min-height: calc(100vh - var(--nav-height));
padding: 0 32px;
width: 100%;
}

main.error .error-number {
Expand Down
36 changes: 29 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
# Your Project's Title...
Your project's description...
# Edge Delivery Services + Adobe Commerce Boilerplate
This project boilerplate is for Edge Delivery Services projects that integrate with Adobe Commerce.

## Documentation
https://experienceleague.adobe.com/developer/commerce/storefront/

## Environments
- Preview: https://main--{repo}--{owner}.aem.page/
- Live: https://main--{repo}--{owner}.aem.live/

## Pre-requisites

Out of the box, this project template uses a pre-configured Adobe Commerce environment. If you want to use your own Adobe Commerce environment, you'll need to update the `configs.xlsx` file in your content repository to have values that match your environment.

Additionally, you need to have the following modules and customizations installed on your environment:

1. magento/magento-extra-graphql: Commerce module required for Cart and Checkout Drop-Ins.
1. magento/module-data-services-graphql: Commerce module with functionality necessary for adding context to events.
1. magento/module-page-builder-product-recommendations: Commerce module required for PRex Widget
1. magento/module-visual-product-recommendations: Commerce module required for PRex Widget
<!-- 1. TODO: Add further prereqs. -->

## Documentation

Before using the aem-boilerplate, we recommand you to go through the documentation on https://www.aem.live/docs/ and more specifically:
Before using the boilerplate, we recommand you to go through the documentation on https://www.aem.live/docs/ and more specifically:
1. [Developer Tutorial](https://www.aem.live/developer/tutorial)
2. [The Anatomy of a Project](https://www.aem.live/developer/anatomy-of-a-project)
3. [Web Performance](https://www.aem.live/developer/keeping-it-100)
Expand All @@ -27,8 +42,15 @@ npm run lint

## Local development

1. Create a new repository based on the `aem-boilerplate` template and add a mountpoint in the `fstab.yaml`
1. Create a new repository based on the `aem-boilerplate-commerce` template and add a mountpoint in the `fstab.yaml`
1. Add the [AEM Code Sync GitHub App](https://github.com/apps/aem-code-sync) to the repository
1. Install the [AEM CLI](https://github.com/adobe/helix-cli): `npm install -g @adobe/aem-cli`
1. Start AEM Proxy: `aem up` (opens your browser at `http://localhost:3000`)
1. Open the `{repo}` directory in your favorite IDE and start coding :)
1. Add your Adobe Commerce SaaS configuration in the `configs.xlsx` sheet in your content repository.
1. Install all dependencies using `npm i`.
1. Start AEM Proxy: `npm run up` (opens your browser at `http://localhost:3000`)
1. Open the `{repo}` directory in your favorite IDE and start coding :)

## Changelog

Major changes are described and documented as part of pull requests and tracked via the `changelog` tag. To keep your project up to date, please follow this list:

https://github.com/hlxsites/aem-boilerplate-commerce/issues?q=label%3Achangelog+is%3Aclosed
2 changes: 1 addition & 1 deletion blocks/cards/cards.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

.cards > ul > li {
border: 1px solid #dadada;
border: 1px solid var(--color-neutral-500);
background-color: var(--background-color);
}

Expand Down
3 changes: 3 additions & 0 deletions blocks/commerce-account-header/commerce-account-header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body.columns main > .section > div.commerce-account-header-wrapper {
margin-bottom: 0;
}
14 changes: 14 additions & 0 deletions blocks/commerce-account-header/commerce-account-header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable import/no-unresolved */
/* eslint-disable import/no-extraneous-dependencies */
import { Header, provider as uiProvider } from '@dropins/tools/components.js';
import { readBlockConfig } from '../../scripts/aem.js';

export default function decorate(block) {
const {
title = 'My account',
} = readBlockConfig(block);

block.innerHTML = '';

return uiProvider.render(Header, { title })(block);
}
59 changes: 59 additions & 0 deletions blocks/commerce-account-sidebar/commerce-account-sidebar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@media (width >= 900px) {
body.columns main > .section.commerce-account-sidebar-container {
max-width: var(--column-width);
}
}

.commerce-account-sidebar-wrapper .commerce-account-sidebar .commerce-account-sidebar-item {
display: flex;
align-items: center;
padding: var(--spacing-medium);
margin-bottom: var(--spacing-small);
border: var(--shape-border-width-2) solid var(--color-neutral-400);
border-radius: var(--shape-border-radius-2);
text-decoration: none;
}

.commerce-account-sidebar-wrapper .commerce-account-sidebar .commerce-account-sidebar-item-active {
border-color: var(--color-neutral-800);
background-color: var(--color-neutral-200);
}

.commerce-account-sidebar-item-icon {
flex: 0 0 auto;
margin-right: var(--spacing-small);
}

.commerce-account-sidebar-item-icon > div {
display: flex;
align-items: center;
justify-content: center;
}

.commerce-account-sidebar-item-content {
flex: 1 1 auto;
}

.commerce-account-sidebar-item-title {
font: var(--type-button-1-font);
margin: 0 0 var(--spacing-xxsmall);
border: none;
text-decoration: none;
}

.commerce-account-sidebar-item-subtitle {
font: var(--type-button-2-font);
margin: 0;
text-decoration: none;
}

.commerce-account-sidebar-item-arrow {
flex: 0 0 auto;
margin-left: var(--spacing-small);
}

.commerce-account-sidebar-item-arrow > div {
display: flex;
align-items: center;
justify-content: center;
}
80 changes: 80 additions & 0 deletions blocks/commerce-account-sidebar/commerce-account-sidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { Icon, provider as uiProvider } from '@dropins/tools/components.js';
import { render as accountRenderer } from '@dropins/storefront-account/render.js';
import { loadFragment } from '../fragment/fragment.js';
import { CUSTOMER_ORDERS_PATH } from '../../scripts/constants.js';

export default async function decorate(block) {
const fragment = await loadFragment('/customer/sidebar-fragment');
const sidebarItemsConfig = fragment.querySelectorAll('.default-content-wrapper > ol > li');
const sidebarItems = Array.from(sidebarItemsConfig).map((item) => {
const itemParams = Array.from(item.querySelectorAll('ol > li'));
const itemConfig = {
itemTitle: item.childNodes[0]?.textContent.trim() || 'Default Title',
itemSubtitle: itemParams[0]?.innerText || '',
itemLink: itemParams[1]?.innerText || '#',
itemIcon: itemParams[2]?.innerText || 'Placeholder',
};

const menuItemEl = document.createElement('a');
menuItemEl.classList.add('commerce-account-sidebar-item');
menuItemEl.href = itemConfig.itemLink;

const isItemActive = (
itemConfig.itemLink === CUSTOMER_ORDERS_PATH
? window.location.href.includes(CUSTOMER_ORDERS_PATH)
: window.location.href.includes(itemConfig.itemLink)
);
if (isItemActive) {
menuItemEl.classList.add('commerce-account-sidebar-item-active');
}

const iconEl = createMenuItemIcon(itemConfig.itemIcon);
const contentEl = createMenuItemContent(itemConfig.itemTitle, itemConfig.itemSubtitle);
const arrowEl = createMenuItemArrow();

menuItemEl.appendChild(iconEl);
menuItemEl.appendChild(contentEl);
menuItemEl.appendChild(arrowEl);

return menuItemEl;
});

block.innerHTML = '';
sidebarItems.forEach((el) => {
block.appendChild(el);
});
}

function createMenuItemIcon(iconSource) {
const iconEl = document.createElement('div');
iconEl.classList.add('commerce-account-sidebar-item-icon');
accountRenderer.render(Icon, { source: iconSource, size: 32 })(iconEl);
return iconEl;
}

function createMenuItemContent(title, subtitle) {
const contentEl = document.createElement('div');
contentEl.classList.add('commerce-account-sidebar-item-content');

const titleEl = document.createElement('p');
titleEl.classList.add('commerce-account-sidebar-item-title');
titleEl.innerText = title;

const subtitleEl = document.createElement('p');
subtitleEl.classList.add('commerce-account-sidebar-item-subtitle');
subtitleEl.innerText = subtitle;

contentEl.appendChild(titleEl);
contentEl.appendChild(subtitleEl);
return contentEl;
}

function createMenuItemArrow() {
const arrowEl = document.createElement('div');
arrowEl.classList.add('commerce-account-sidebar-item-arrow');
uiProvider.render(Icon, {
source: 'ChevronRight',
size: 32,
})(arrowEl);
return arrowEl;
}
1 change: 1 addition & 0 deletions blocks/commerce-addresses/commerce-addresses.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* stylelint-disable no-empty-source */
27 changes: 27 additions & 0 deletions blocks/commerce-addresses/commerce-addresses.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* eslint-disable import/no-unresolved */
/* eslint-disable import/no-extraneous-dependencies */
import { Addresses } from '@dropins/storefront-account/containers/Addresses.js';
import { render as accountRenderer } from '@dropins/storefront-account/render.js';
import { readBlockConfig } from '../../scripts/aem.js';
import { checkIsAuthenticated } from '../../scripts/configs.js';
import { CUSTOMER_ADDRESS_PATH, CUSTOMER_LOGIN_PATH } from '../../scripts/constants.js';

// Initialize
import '../../scripts/initializers/account.js';

export default async function decorate(block) {
const {
'minified-view': minifiedViewConfig = 'false',
} = readBlockConfig(block);

if (!checkIsAuthenticated()) {
window.location.href = CUSTOMER_LOGIN_PATH;
} else {
await accountRenderer.render(Addresses, {
minifiedView: minifiedViewConfig === 'true',
withActionsInMinifiedView: false,
withActionsInFullSizeView: true,
routeAddressesPage: () => CUSTOMER_ADDRESS_PATH,
})(block);
}
}
Loading