@akinon/projectzero 1.32.0 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/app-template/.editorconfig +7 -0
- package/app-template/.env.example +9 -0
- package/app-template/.eslintignore +1 -0
- package/app-template/.eslintrc.js +31 -0
- package/app-template/.gitattributes +18 -0
- package/app-template/.husky/pre-commit +4 -0
- package/app-template/.lintstagedrc.js +12 -0
- package/app-template/.prettierrc +13 -0
- package/app-template/.releaserc.json +49 -0
- package/app-template/.stylelintrc.json +37 -0
- package/app-template/.vscode/extensions.json +11 -0
- package/app-template/.vscode/launch.json +29 -0
- package/app-template/.yarnrc +1 -0
- package/app-template/CHANGELOG.md +636 -0
- package/app-template/LICENSE +21 -0
- package/app-template/Procfile +1 -0
- package/app-template/README.md +29 -0
- package/app-template/akinon.json +28 -0
- package/app-template/bitbucket-pipelines.yml +54 -0
- package/app-template/build.sh +7 -0
- package/app-template/docs/CHANGELOG.md +85 -0
- package/app-template/docs/advanced-usage.md +43 -0
- package/app-template/docs/basic-setup.md +59 -0
- package/app-template/docs/data-fetching/client/account.md +1064 -0
- package/app-template/docs/data-fetching/client/address.md +805 -0
- package/app-template/docs/data-fetching/client/basket.md +107 -0
- package/app-template/docs/data-fetching/client/checkout.md +904 -0
- package/app-template/docs/data-fetching/client/misc.md +135 -0
- package/app-template/docs/data-fetching/client/product.md +284 -0
- package/app-template/docs/data-fetching/client/user.md +56 -0
- package/app-template/docs/data-fetching/client/wishlist.md +111 -0
- package/app-template/docs/data-fetching/server/category.md +324 -0
- package/app-template/docs/data-fetching/server/flat-page.md +42 -0
- package/app-template/docs/data-fetching/server/list.md +353 -0
- package/app-template/docs/data-fetching/server/menu.md +363 -0
- package/app-template/docs/data-fetching/server/product.md +131 -0
- package/app-template/docs/data-fetching/server/seo.md +44 -0
- package/app-template/docs/data-fetching/server/special-page.md +79 -0
- package/app-template/docs/data-fetching/server/widget.md +218 -0
- package/app-template/docs/delete-account.md +25 -0
- package/app-template/docs/deployment.md +46 -0
- package/app-template/docs/dynamic-route.md +33 -0
- package/app-template/docs/icons.md +52 -0
- package/app-template/docs/localization.md +204 -0
- package/app-template/docs/logging.md +48 -0
- package/app-template/docs/plugins.md +76 -0
- package/app-template/docs/seo-management.md +125 -0
- package/app-template/docs/static-assets.md +36 -0
- package/app-template/docs/widgets.md +127 -0
- package/app-template/global.d.ts +1 -0
- package/app-template/jest.config.ts +34 -0
- package/app-template/next-env.d.ts +6 -0
- package/app-template/next.config.mjs +34 -0
- package/app-template/package.json +97 -0
- package/app-template/plugins.d.ts +1 -0
- package/app-template/postcss.config.js +6 -0
- package/app-template/public/404.png +0 -0
- package/app-template/public/500.png +0 -0
- package/app-template/public/apple-splash-1125-2436.jpg +0 -0
- package/app-template/public/apple-splash-1136-640.jpg +0 -0
- package/app-template/public/apple-splash-1170-2532.jpg +0 -0
- package/app-template/public/apple-splash-1242-2208.jpg +0 -0
- package/app-template/public/apple-splash-1242-2688.jpg +0 -0
- package/app-template/public/apple-splash-1284-2778.jpg +0 -0
- package/app-template/public/apple-splash-1334-750.jpg +0 -0
- package/app-template/public/apple-splash-1536-2048.jpg +0 -0
- package/app-template/public/apple-splash-1620-2160.jpg +0 -0
- package/app-template/public/apple-splash-1668-2224.jpg +0 -0
- package/app-template/public/apple-splash-1668-2388.jpg +0 -0
- package/app-template/public/apple-splash-1792-828.jpg +0 -0
- package/app-template/public/apple-splash-2048-1536.jpg +0 -0
- package/app-template/public/apple-splash-2048-2732.jpg +0 -0
- package/app-template/public/apple-splash-2160-1620.jpg +0 -0
- package/app-template/public/apple-splash-2208-1242.jpg +0 -0
- package/app-template/public/apple-splash-2224-1668.jpg +0 -0
- package/app-template/public/apple-splash-2388-1668.jpg +0 -0
- package/app-template/public/apple-splash-2436-1125.jpg +0 -0
- package/app-template/public/apple-splash-2532-1170.jpg +0 -0
- package/app-template/public/apple-splash-2688-1242.jpg +0 -0
- package/app-template/public/apple-splash-2732-2048.jpg +0 -0
- package/app-template/public/apple-splash-2778-1284.jpg +0 -0
- package/app-template/public/apple-splash-640-1136.jpg +0 -0
- package/app-template/public/apple-splash-750-1334.jpg +0 -0
- package/app-template/public/apple-splash-828-1792.jpg +0 -0
- package/app-template/public/apple-touch-icon-152x152.png +0 -0
- package/app-template/public/apple-touch-icon-167x167.png +0 -0
- package/app-template/public/apple-touch-icon-180x180.png +0 -0
- package/app-template/public/apple-touch-icon.png +0 -0
- package/app-template/public/apple.svg +47 -0
- package/app-template/public/cvv.jpg +0 -0
- package/app-template/public/facebook.svg +3 -0
- package/app-template/public/google.svg +12 -0
- package/app-template/public/icon-192x192.png +0 -0
- package/app-template/public/icon-256x256.png +0 -0
- package/app-template/public/icon-384x384.png +0 -0
- package/app-template/public/icon-512x512.png +0 -0
- package/app-template/public/icon-sprite.svg +528 -0
- package/app-template/public/locales/en/account.json +490 -0
- package/app-template/public/locales/en/auth.json +100 -0
- package/app-template/public/locales/en/basket.json +50 -0
- package/app-template/public/locales/en/category.json +26 -0
- package/app-template/public/locales/en/checkout.json +152 -0
- package/app-template/public/locales/en/common.json +65 -0
- package/app-template/public/locales/en/forgot_password.json +41 -0
- package/app-template/public/locales/en/form.json +5 -0
- package/app-template/public/locales/en/product.json +39 -0
- package/app-template/public/locales/tr/account.json +490 -0
- package/app-template/public/locales/tr/auth.json +100 -0
- package/app-template/public/locales/tr/basket.json +50 -0
- package/app-template/public/locales/tr/category.json +26 -0
- package/app-template/public/locales/tr/checkout.json +152 -0
- package/app-template/public/locales/tr/common.json +65 -0
- package/app-template/public/locales/tr/forgot_password.json +41 -0
- package/app-template/public/locales/tr/form.json +5 -0
- package/app-template/public/locales/tr/product.json +39 -0
- package/app-template/public/logo.svg +29 -0
- package/app-template/public/manifest.json +35 -0
- package/app-template/public/mastercard.png +0 -0
- package/app-template/public/mastersecure.png +0 -0
- package/app-template/public/mfs-client.min.js +3 -0
- package/app-template/public/noimage.jpg +0 -0
- package/app-template/public/safari-pinned-tab.svg +320 -0
- package/app-template/public/ssl-secure.png +0 -0
- package/app-template/public/vbv.png +0 -0
- package/app-template/public/visa.png +0 -0
- package/app-template/public/zepto.min.js +2 -0
- package/app-template/sentry.client.config.ts +16 -0
- package/app-template/sentry.edge.config.ts +3 -0
- package/app-template/sentry.properties +4 -0
- package/app-template/sentry.server.config.ts +3 -0
- package/app-template/setupTests.ts +4 -0
- package/app-template/src/__tests__/index.test.tsx +7 -0
- package/app-template/src/__tests__/tsconfig.json +7 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/address/page.tsx +74 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/change-email/page.tsx +174 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/change-password/page.tsx +206 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/contact/page.tsx +7 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/coupons/page.tsx +210 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/email-verification/page.tsx +5 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/faq/page.tsx +23 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/favourite-products/page.tsx +32 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/layout.tsx +28 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/my-quotations/page.tsx +7 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/orders/[id]/cancellation/page.tsx +255 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/orders/[id]/layout.tsx +5 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/orders/[id]/page.tsx +309 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/orders/page.tsx +137 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/page.tsx +226 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/profile/page.tsx +399 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/address/stores/page.tsx +271 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/anonymous-tracking/page.tsx +33 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/auth/oauth-login/page.tsx +3 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/auth/page.tsx +76 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/basket/page.tsx +77 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/basket-b2b/page.tsx +7 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/category/[pk]/loading.tsx +53 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/category/[pk]/page.tsx +16 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/client-root.tsx +9 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/contact-us/page.tsx +11 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/error.tsx +20 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/flat-page/[pk]/loading.tsx +5 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/flat-page/[pk]/page.tsx +18 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/forms/[pk]/generate/page.tsx +48 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/group-product/[pk]/loading.tsx +5 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/group-product/[pk]/page.tsx +72 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/landing-page/[pk]/loading.tsx +5 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/landing-page/[pk]/page.tsx +23 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/layout.tsx +78 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/list/loading.tsx +53 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/list/page.tsx +16 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/orders/checkout/page.tsx +140 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/orders/completed/[token]/layout.tsx +5 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/orders/completed/[token]/page.tsx +284 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/page.tsx +50 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/product/[pk]/loading.tsx +67 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/product/[pk]/page.tsx +81 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/special-page/[pk]/loading.tsx +53 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/special-page/[pk]/page.tsx +25 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/template.tsx +75 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/users/email-set-primary/[[...id]]/page.tsx +43 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/users/password/reset/page.tsx +79 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/users/registration/account-confirm-email/[[...id]]/page.tsx +43 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/users/reset/[[...id]]/page.tsx +110 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/xml-sitemap/[node]/route.ts +25 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/xml-sitemap/route.ts +37 -0
- package/app-template/src/app/api/cache/route.ts +1 -0
- package/app-template/src/app/api/client/[...slug]/route.ts +1 -0
- package/app-template/src/app/api/form/[...id]/route.ts +7 -0
- package/app-template/src/app/api/logout/route.ts +1 -0
- package/app-template/src/app/api/sentry/route.ts +9 -0
- package/app-template/src/app/api/web-vitals/route.ts +1 -0
- package/app-template/src/app/favicon.ico +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Black.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Black.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Black.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Black.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-BlackItalic.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-BlackItalic.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-BlackItalic.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-BlackItalic.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Bold.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Bold.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Bold.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Bold.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-BoldItalic.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-BoldItalic.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-BoldItalic.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-BoldItalic.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraBold.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraBold.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraBold.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraBold.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraBoldItalic.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraBoldItalic.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraBoldItalic.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraBoldItalic.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraLight.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraLight.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraLight.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraLight.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraLightItalic.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraLightItalic.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraLightItalic.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ExtraLightItalic.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Italic.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Italic.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Italic.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Italic.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Light.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Light.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Light.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Light.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-LightItalic.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-LightItalic.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-LightItalic.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-LightItalic.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Medium.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Medium.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Medium.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Medium.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-MediumItalic.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-MediumItalic.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-MediumItalic.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-MediumItalic.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Regular.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Regular.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Regular.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Regular.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-SemiBold.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-SemiBold.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-SemiBold.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-SemiBold.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-SemiBoldItalic.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-SemiBoldItalic.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-SemiBoldItalic.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-SemiBoldItalic.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Thin.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Thin.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Thin.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-Thin.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ThinItalic.eot +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ThinItalic.ttf +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ThinItalic.woff +0 -0
- package/app-template/src/assets/fonts/Jost/Jost-ThinItalic.woff2 +0 -0
- package/app-template/src/assets/fonts/Jost/index.scss +269 -0
- package/app-template/src/assets/fonts/index.scss +1 -0
- package/app-template/src/assets/fonts/pz-icon.css +154 -0
- package/app-template/src/assets/fonts/pz-icon.eot +0 -0
- package/app-template/src/assets/fonts/pz-icon.html +456 -0
- package/app-template/src/assets/fonts/pz-icon.scss +300 -0
- package/app-template/src/assets/fonts/pz-icon.svg +144 -0
- package/app-template/src/assets/fonts/pz-icon.ttf +0 -0
- package/app-template/src/assets/fonts/pz-icon.woff +0 -0
- package/app-template/src/assets/fonts/pz-icon.woff2 +0 -0
- package/app-template/src/assets/globals.scss +65 -0
- package/app-template/src/assets/icons/akinon.svg +11 -0
- package/app-template/src/assets/icons/arrow-up.svg +11 -0
- package/app-template/src/assets/icons/bell.svg +1 -0
- package/app-template/src/assets/icons/cart.svg +13 -0
- package/app-template/src/assets/icons/check.svg +19 -0
- package/app-template/src/assets/icons/chevron-down.svg +8 -0
- package/app-template/src/assets/icons/chevron-end.svg +8 -0
- package/app-template/src/assets/icons/chevron-start.svg +8 -0
- package/app-template/src/assets/icons/chevron-up.svg +8 -0
- package/app-template/src/assets/icons/close.svg +12 -0
- package/app-template/src/assets/icons/cvc.svg +54 -0
- package/app-template/src/assets/icons/default.svg +6 -0
- package/app-template/src/assets/icons/directions.svg +14 -0
- package/app-template/src/assets/icons/eye-off.svg +10 -0
- package/app-template/src/assets/icons/eye-on.svg +17 -0
- package/app-template/src/assets/icons/facebook-login.svg +11 -0
- package/app-template/src/assets/icons/facebook.svg +9 -0
- package/app-template/src/assets/icons/giftbox.svg +22 -0
- package/app-template/src/assets/icons/globe.svg +12 -0
- package/app-template/src/assets/icons/google-login.svg +19 -0
- package/app-template/src/assets/icons/google.svg +9 -0
- package/app-template/src/assets/icons/hamburger.svg +5 -0
- package/app-template/src/assets/icons/heart-full.svg +20 -0
- package/app-template/src/assets/icons/heart-stroke.svg +22 -0
- package/app-template/src/assets/icons/info.svg +1 -0
- package/app-template/src/assets/icons/instagram.svg +14 -0
- package/app-template/src/assets/icons/layout-2.svg +7 -0
- package/app-template/src/assets/icons/layout-3.svg +4 -0
- package/app-template/src/assets/icons/logo.svg +24 -0
- package/app-template/src/assets/icons/mail.svg +1 -0
- package/app-template/src/assets/icons/minus.svg +4 -0
- package/app-template/src/assets/icons/money.svg +4 -0
- package/app-template/src/assets/icons/mp-otp.svg +1 -0
- package/app-template/src/assets/icons/pin.svg +16 -0
- package/app-template/src/assets/icons/pinterest.svg +12 -0
- package/app-template/src/assets/icons/plus.svg +5 -0
- package/app-template/src/assets/icons/search.svg +13 -0
- package/app-template/src/assets/icons/share.svg +10 -0
- package/app-template/src/assets/icons/spinner.svg +6 -0
- package/app-template/src/assets/icons/store-pin.svg +14 -0
- package/app-template/src/assets/icons/track-order.svg +1 -0
- package/app-template/src/assets/icons/twitter.svg +11 -0
- package/app-template/src/assets/icons/user.svg +14 -0
- package/app-template/src/assets/icons/whatsapp.svg +45 -0
- package/app-template/src/components/__tests__/Modal.test.tsx +103 -0
- package/app-template/src/components/__tests__/accordion.test.tsx +65 -0
- package/app-template/src/components/__tests__/badge.test.tsx +20 -0
- package/app-template/src/components/__tests__/button.test.tsx +59 -0
- package/app-template/src/components/__tests__/checkbox.test.tsx +57 -0
- package/app-template/src/components/__tests__/file-input.test.tsx +42 -0
- package/app-template/src/components/__tests__/icon.test.tsx +39 -0
- package/app-template/src/components/__tests__/input.test.tsx +69 -0
- package/app-template/src/components/__tests__/language-select.test.tsx +81 -0
- package/app-template/src/components/__tests__/link.test.tsx +65 -0
- package/app-template/src/components/__tests__/price.test.tsx +72 -0
- package/app-template/src/components/__tests__/radio.test.tsx +52 -0
- package/app-template/src/components/__tests__/select.test.tsx +115 -0
- package/app-template/src/components/__tests__/tab.test.tsx +101 -0
- package/app-template/src/components/accordion.tsx +64 -0
- package/app-template/src/components/badge.tsx +21 -0
- package/app-template/src/components/button.tsx +46 -0
- package/app-template/src/components/canonical-url.tsx +21 -0
- package/app-template/src/components/carousel-core.tsx +42 -0
- package/app-template/src/components/checkbox.tsx +28 -0
- package/app-template/src/components/currency-select.tsx +81 -0
- package/app-template/src/components/custom-loader.tsx +21 -0
- package/app-template/src/components/dynamic-form.tsx +17 -0
- package/app-template/src/components/file-input.tsx +8 -0
- package/app-template/src/components/generate-form-fields.tsx +349 -0
- package/app-template/src/components/icon.tsx +18 -0
- package/app-template/src/components/index.ts +41 -0
- package/app-template/src/components/input.tsx +110 -0
- package/app-template/src/components/language-select.tsx +33 -0
- package/app-template/src/components/link.tsx +53 -0
- package/app-template/src/components/loader-spinner.tsx +23 -0
- package/app-template/src/components/modal.tsx +66 -0
- package/app-template/src/components/pagination.tsx +267 -0
- package/app-template/src/components/password-rules-feedback.tsx +60 -0
- package/app-template/src/components/price.tsx +54 -0
- package/app-template/src/components/pwa-tags.tsx +233 -0
- package/app-template/src/components/radio.tsx +18 -0
- package/app-template/src/components/react-portal.tsx +47 -0
- package/app-template/src/components/select.tsx +70 -0
- package/app-template/src/components/shimmer.tsx +21 -0
- package/app-template/src/components/skeleton-article.tsx +15 -0
- package/app-template/src/components/skeleton-product.tsx +14 -0
- package/app-template/src/components/skeleton-profile.tsx +19 -0
- package/app-template/src/components/skeleton-wrapper.tsx +19 -0
- package/app-template/src/components/skeleton.tsx +37 -0
- package/app-template/src/components/source.tsx +12 -0
- package/app-template/src/components/tab-panel.tsx +10 -0
- package/app-template/src/components/tab.tsx +58 -0
- package/app-template/src/components/tabs.tsx +58 -0
- package/app-template/src/components/types/index.ts +89 -0
- package/app-template/src/hooks/index.ts +1 -0
- package/app-template/src/hooks/use-add-product-to-basket.ts +48 -0
- package/app-template/src/hooks/use-contract.tsx +58 -0
- package/app-template/src/hooks/use-fav-button.tsx +99 -0
- package/app-template/src/instrumentation.ts +1 -0
- package/app-template/src/middleware.ts +33 -0
- package/app-template/src/pages/_error.js +14 -0
- package/app-template/src/pages/api/auth/[...nextauth].ts +3 -0
- package/app-template/src/plugins.js +14 -0
- package/app-template/src/redux/middlewares/category.ts +42 -0
- package/app-template/src/redux/reducers/category.ts +67 -0
- package/app-template/src/redux/store.ts +47 -0
- package/app-template/src/routes/index.ts +46 -0
- package/app-template/src/settings.js +62 -0
- package/app-template/src/theme.js +1 -0
- package/app-template/src/types/index.ts +72 -0
- package/app-template/src/types/next-auth.d.ts +24 -0
- package/app-template/src/types/widgets.ts +115 -0
- package/app-template/src/utils/convert-facet-search-params.ts +15 -0
- package/app-template/src/utils/generate-jsonld.ts +23 -0
- package/app-template/src/utils/gtm.ts +247 -0
- package/app-template/src/utils/index.ts +60 -0
- package/app-template/src/views/account/account-menu.tsx +117 -0
- package/app-template/src/views/account/address-card.tsx +157 -0
- package/app-template/src/views/account/address-form.tsx +374 -0
- package/app-template/src/views/account/back-button.tsx +27 -0
- package/app-template/src/views/account/contact-form.tsx +283 -0
- package/app-template/src/views/account/content-header.tsx +52 -0
- package/app-template/src/views/account/faq/faq-footer.tsx +30 -0
- package/app-template/src/views/account/faq/faq-search.tsx +35 -0
- package/app-template/src/views/account/faq/faq-tabs.tsx +54 -0
- package/app-template/src/views/account/faq/index.ts +3 -0
- package/app-template/src/views/account/favorite-item.tsx +191 -0
- package/app-template/src/views/account/favourite-products/favourite-products-list.tsx +65 -0
- package/app-template/src/views/account/index.ts +4 -0
- package/app-template/src/views/account/order.tsx +89 -0
- package/app-template/src/views/account/orders/order-cancellation-item.tsx +99 -0
- package/app-template/src/views/account/orders/order-detail-header.tsx +39 -0
- package/app-template/src/views/anonymous-tracking/index.tsx +109 -0
- package/app-template/src/views/anonymous-tracking/order-detail/index.tsx +318 -0
- package/app-template/src/views/basket/basket-item.tsx +231 -0
- package/app-template/src/views/basket/index.ts +2 -0
- package/app-template/src/views/basket/summary.tsx +220 -0
- package/app-template/src/views/breadcrumb.tsx +35 -0
- package/app-template/src/views/category/category-active-filters.tsx +98 -0
- package/app-template/src/views/category/category-banner.tsx +34 -0
- package/app-template/src/views/category/category-header.tsx +143 -0
- package/app-template/src/views/category/category-info.tsx +123 -0
- package/app-template/src/views/category/filters/index.tsx +163 -0
- package/app-template/src/views/category/filters/size-filter.tsx +27 -0
- package/app-template/src/views/category/layout.tsx +38 -0
- package/app-template/src/views/checkout/auth.tsx +54 -0
- package/app-template/src/views/checkout/index.tsx +3 -0
- package/app-template/src/views/checkout/layout/footer.tsx +48 -0
- package/app-template/src/views/checkout/layout/header.tsx +38 -0
- package/app-template/src/views/checkout/step-button.tsx +69 -0
- package/app-template/src/views/checkout/step-list.tsx +51 -0
- package/app-template/src/views/checkout/steps/payment/agreements.tsx +42 -0
- package/app-template/src/views/checkout/steps/payment/index.tsx +31 -0
- package/app-template/src/views/checkout/steps/payment/options/credit-card/index.tsx +382 -0
- package/app-template/src/views/checkout/steps/payment/options/credit-card/installments.tsx +100 -0
- package/app-template/src/views/checkout/steps/payment/options/credit-payment.tsx +14 -0
- package/app-template/src/views/checkout/steps/payment/options/funds-transfer.tsx +174 -0
- package/app-template/src/views/checkout/steps/payment/options/loyalty.tsx +19 -0
- package/app-template/src/views/checkout/steps/payment/options/pay-on-delivery.tsx +15 -0
- package/app-template/src/views/checkout/steps/payment/options/redirection.tsx +94 -0
- package/app-template/src/views/checkout/steps/payment/payment-header.tsx +17 -0
- package/app-template/src/views/checkout/steps/payment/payment-option-buttons.tsx +73 -0
- package/app-template/src/views/checkout/steps/shipping/address-box.tsx +244 -0
- package/app-template/src/views/checkout/steps/shipping/addresses.tsx +189 -0
- package/app-template/src/views/checkout/steps/shipping/index.tsx +27 -0
- package/app-template/src/views/checkout/steps/shipping/shipping-options.tsx +72 -0
- package/app-template/src/views/checkout/summary.tsx +181 -0
- package/app-template/src/views/coupon-item/index.tsx +80 -0
- package/app-template/src/views/find-in-store/index.tsx +183 -0
- package/app-template/src/views/footer.tsx +21 -0
- package/app-template/src/views/guest-login/index.tsx +130 -0
- package/app-template/src/views/header/action-menu.tsx +117 -0
- package/app-template/src/views/header/band.tsx +32 -0
- package/app-template/src/views/header/index.tsx +66 -0
- package/app-template/src/views/header/mini-basket.tsx +267 -0
- package/app-template/src/views/header/mobile-hamburger-button.tsx +35 -0
- package/app-template/src/views/header/mobile-menu.tsx +144 -0
- package/app-template/src/views/header/navbar.tsx +186 -0
- package/app-template/src/views/header/pwa-back-button.tsx +60 -0
- package/app-template/src/views/header/search/index.tsx +82 -0
- package/app-template/src/views/header/search/results.tsx +123 -0
- package/app-template/src/views/header/user-menu.tsx +72 -0
- package/app-template/src/views/index.tsx +2 -0
- package/app-template/src/views/installment-options/index.tsx +127 -0
- package/app-template/src/views/login/index.tsx +233 -0
- package/app-template/src/views/otp-login/index.tsx +152 -0
- package/app-template/src/views/page-loader-spinner/index.tsx +9 -0
- package/app-template/src/views/product/accordion-wrapper.tsx +59 -0
- package/app-template/src/views/product/combine-product-card.tsx +82 -0
- package/app-template/src/views/product/index.ts +8 -0
- package/app-template/src/views/product/layout.tsx +40 -0
- package/app-template/src/views/product/misc-buttons.tsx +65 -0
- package/app-template/src/views/product/price-wrapper.tsx +41 -0
- package/app-template/src/views/product/product-group-info.tsx +63 -0
- package/app-template/src/views/product/product-info.tsx +273 -0
- package/app-template/src/views/product/slider.tsx +124 -0
- package/app-template/src/views/product/variant.tsx +104 -0
- package/app-template/src/views/product-item/index.tsx +96 -0
- package/app-template/src/views/product-pointer-banner-item.tsx +243 -0
- package/app-template/src/views/register/index.tsx +417 -0
- package/app-template/src/views/root-modal.tsx +21 -0
- package/app-template/src/views/sales-contract-modal/index.tsx +288 -0
- package/app-template/src/views/share/index.tsx +71 -0
- package/app-template/src/views/widgets/home-hero-slider-content.tsx +54 -0
- package/app-template/src/views/widgets/recommendation-content.tsx +86 -0
- package/app-template/src/widgets/footer-copyright.tsx +25 -0
- package/app-template/src/widgets/footer-info.tsx +78 -0
- package/app-template/src/widgets/footer-menu.tsx +258 -0
- package/app-template/src/widgets/footer-social.tsx +53 -0
- package/app-template/src/widgets/footer-subscription/footer-subscription-form.tsx +110 -0
- package/app-template/src/widgets/footer-subscription/index.tsx +30 -0
- package/app-template/src/widgets/header-band-text.tsx +21 -0
- package/app-template/src/widgets/home-discovery.tsx +191 -0
- package/app-template/src/widgets/home-hero-slider.tsx +36 -0
- package/app-template/src/widgets/home-product-recommendation.tsx +18 -0
- package/app-template/src/widgets/home-single-banner.tsx +87 -0
- package/app-template/src/widgets/home-stories-eng.tsx +112 -0
- package/app-template/src/widgets/index.ts +25 -0
- package/app-template/src/widgets/product-pointer-banners.tsx +35 -0
- package/app-template/src/widgets/special-page-banner.tsx +49 -0
- package/app-template/src/widgets/special-page-carousel.tsx +68 -0
- package/app-template/src/widgets/widget-order.tsx +1 -0
- package/app-template/tailwind.config.js +170 -0
- package/app-template/tsconfig.json +44 -0
- package/app-template/tsconfig.test.json +6 -0
- package/app-template/yarn.lock +11278 -0
- package/commands/create.ts +49 -118
- package/dist/commands/create.js +32 -68
- package/package.json +1 -1
- package/tsconfig.json +9 -8
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: SEO Management
|
|
3
|
+
sidebar_label: SEO Management
|
|
4
|
+
slug: seo-management
|
|
5
|
+
custom_edit_url: null
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The SEO tags in your project should be included in the following files:
|
|
9
|
+
|
|
10
|
+
- `src/app/[commerce]/[locale]/[currency]/layout.tsx`
|
|
11
|
+
- `src/app/[commerce]/[locale]/[currency]/(root)/category/[pk]/page.tsx`
|
|
12
|
+
- `src/app/[commerce]/[locale]/[currency]/(root)/list/page.tsx`
|
|
13
|
+
- `src/app/[commerce]/[locale]/[currency]/(root)/product/[pk]/page.tsx`
|
|
14
|
+
- `src/app/[commerce]/[locale]/[currency]/(root)/special-page/[pk]/page.tsx`
|
|
15
|
+
- `src/app/[commerce]/[locale]/[currency]/(root)/group-product/[pk]/page.tsx`
|
|
16
|
+
|
|
17
|
+
If your project has a category landing page, you also need to edit the SEO tags for the category landing page created within the root.
|
|
18
|
+
|
|
19
|
+
- `src/app/[commerce]/[locale]/[currency]/(root)/categoryLandigPage/page.tsx`
|
|
20
|
+
|
|
21
|
+
To create metadata, first import the existing Metadata in Next.js:
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
import { Metadata } from '@akinon/next/types';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
An async function named **generateMetadata** is created. This function runs before the **function root** and puts metadata in head.
|
|
28
|
+
|
|
29
|
+
The `params` and `searchParams` parameters, as well as the `props` you want to display in the metadata, can be added to the **generateMetadata** function.
|
|
30
|
+
|
|
31
|
+
Examples of **generateMetadata** function with different parameter options:
|
|
32
|
+
|
|
33
|
+
**Without parameters:**
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
export async function generateMetadata() {}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**With parameters:**
|
|
40
|
+
|
|
41
|
+
```javascript
|
|
42
|
+
export async function generateMetadata({ params, searchParams }) {}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**With parameters and props:**
|
|
46
|
+
|
|
47
|
+
`<{ pk: number }>` represents a single attribute to be extracted from props.
|
|
48
|
+
|
|
49
|
+
```javascript
|
|
50
|
+
export async function generateMetadata({
|
|
51
|
+
params,
|
|
52
|
+
searchParams
|
|
53
|
+
}: PageProps<{ pk: number }>) {}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
SEO data such as title, description, canonical, openGraph can also be added to **metadata**.
|
|
57
|
+
|
|
58
|
+
Example **Metadata** variable:
|
|
59
|
+
|
|
60
|
+
```javascript
|
|
61
|
+
const result: Metadata = {
|
|
62
|
+
title: 'title',
|
|
63
|
+
description: 'description',
|
|
64
|
+
keywords: 'keywords',
|
|
65
|
+
twitter: {
|
|
66
|
+
title: 'title',
|
|
67
|
+
description: 'description'
|
|
68
|
+
},
|
|
69
|
+
alternates: {
|
|
70
|
+
canonical: 'canonicalUrl'
|
|
71
|
+
},
|
|
72
|
+
openGraph: {
|
|
73
|
+
title: 'title',
|
|
74
|
+
description: 'description',
|
|
75
|
+
images: 'image'
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Example of the **generateMetadata** function for `src/app/[commerce]/[locale]/[currency]/(root)/product/[pk]/page.tsx`:
|
|
81
|
+
|
|
82
|
+
```javascript
|
|
83
|
+
export async function generateMetadata({
|
|
84
|
+
params,
|
|
85
|
+
searchParams
|
|
86
|
+
}: PageProps<{ pk: number, locale: string }>) {
|
|
87
|
+
const nextHeaders = pzUrl();
|
|
88
|
+
const pageUrl = new URL(
|
|
89
|
+
nextHeaders.get('pz-url') ?? process.env.NEXT_PUBLIC_URL
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
const canonicalUrl = `${process.env.NEXT_PUBLIC_URL}${pageUrl?.pathname}`;
|
|
93
|
+
let result: Metadata = {};
|
|
94
|
+
|
|
95
|
+
try {
|
|
96
|
+
const {
|
|
97
|
+
data: { product }
|
|
98
|
+
} = await getProductData({
|
|
99
|
+
pk: params.pk,
|
|
100
|
+
searchParams
|
|
101
|
+
});
|
|
102
|
+
result = {
|
|
103
|
+
title: product.name,
|
|
104
|
+
description: product.attributes.description,
|
|
105
|
+
twitter: {
|
|
106
|
+
title: product.name,
|
|
107
|
+
description: product.attributes.description
|
|
108
|
+
},
|
|
109
|
+
openGraph: {
|
|
110
|
+
title: product.name,
|
|
111
|
+
description: product.attributes.description,
|
|
112
|
+
images: product.productimage_set?.map((item) => ({
|
|
113
|
+
url: item.image
|
|
114
|
+
}))
|
|
115
|
+
},
|
|
116
|
+
alternates: {
|
|
117
|
+
canonical: canonicalUrl
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
// eslint-disable-next-line no-empty
|
|
121
|
+
} catch (error) {}
|
|
122
|
+
|
|
123
|
+
return result;
|
|
124
|
+
}
|
|
125
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Static Assets
|
|
3
|
+
sidebar_label: Static Assets
|
|
4
|
+
slug: static-assets
|
|
5
|
+
custom_edit_url: null
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
This page covers the management of **static assets** in the cloned project, accessing and optimizing various types of files in the local development environment.
|
|
9
|
+
|
|
10
|
+
## Accessing Static Assets
|
|
11
|
+
|
|
12
|
+
The **projectrepo/public** folder in the cloned project is the repository where the **static assets** are located.
|
|
13
|
+
|
|
14
|
+
All files placed in this folder can be accessed once the local server is up and running. For example, files such as **http://localhost:3000/404.png** can be accessed from this folder.
|
|
15
|
+
|
|
16
|
+
It should be noted that this accessibility is not limited to image files; files with various extensions, such as **.json** and **.js**, can also be displayed in the local browser without any compatibility issues.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Configuration with Vercel
|
|
20
|
+
|
|
21
|
+
To achieve this functionality, matcher property in Vercel's platform is used. The core of this configuration can be found within the **src/middleware.ts** file, where the regular expression can be examined:
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
matcher: ['/((?!api|_next|[\\w-\\/*]+\\.\\w+).*)']
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This expression ensures that the necessary routing occurs correctly.
|
|
28
|
+
|
|
29
|
+
## Additional Resources
|
|
30
|
+
|
|
31
|
+
For more detailed information, please check out following documents:
|
|
32
|
+
|
|
33
|
+
- [Vercel Platforms Commit](https://github.com/vercel/platforms/commit/53cb3242c0eb047ee535d539ded1ac0f948e5433)
|
|
34
|
+
- [Next.js Middleware Upgrade Guide](https://nextjs.org/docs/messages/middleware-upgrade-guide#how-to-upgrade)
|
|
35
|
+
- [Optimizing Static Assets](https://nextjs.org/docs/app/building-your-application/optimizing/static-assets)
|
|
36
|
+
- [Skipping Next.js Middleware for Static and Public Files](https://clerk.com/blog/skip-nextjs-middleware-static-and-public-files?utm_source=www.google.com&utm_medium=referral&utm_campaign=none)
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Widgets
|
|
3
|
+
sidebar_label: Widgets
|
|
4
|
+
slug: widgets
|
|
5
|
+
custom_edit_url: null
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Widget Order
|
|
9
|
+
|
|
10
|
+
In certain cases, websites, particularly homepages, require frequent content updates. To eliminate the need for constantly editing code, a widget sorting system is used. This sorting widget is simple, featuring multiple text fields that facilitate the input of widget information and their reordering.
|
|
11
|
+
|
|
12
|
+
Once the Widget Order scheme has been integrated into Omnitron, the next step is to create a widget that allows for the addition of widget slugs. Instructions for creating this widget can be found below. The names of the created widgets are then entered based on this widget order.
|
|
13
|
+
|
|
14
|
+
## Example Widget Order Schema
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"widget_order": {
|
|
19
|
+
"multi": true,
|
|
20
|
+
"data_type": "nested",
|
|
21
|
+
"key": "widget_order",
|
|
22
|
+
"label": "Widget Order",
|
|
23
|
+
"schema": {
|
|
24
|
+
"item_slug": {
|
|
25
|
+
"data_type": "text",
|
|
26
|
+
"key": "item_slug",
|
|
27
|
+
"label": "Widget Slug"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Widget Integration
|
|
35
|
+
|
|
36
|
+
### Home Page
|
|
37
|
+
|
|
38
|
+
1. Create a Widget Order named **home-widget-order** and append the corresponding widget slug names to it.
|
|
39
|
+
|
|
40
|
+
2. To retrieve the widget slug names that have been added, use the **HOME_WIDGETS** variable's slug name in the `src/widgets/index.ts` file along with the widget's relative path.
|
|
41
|
+
|
|
42
|
+
```java
|
|
43
|
+
export const HOME_WIDGETS: {
|
|
44
|
+
[key: string]: ComponentType<WidgetResultType<unknown>>;
|
|
45
|
+
} = {
|
|
46
|
+
'widget-slug-name': dynamic(async () => import('./widget-relative-path.ts'))
|
|
47
|
+
};
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Using the Client Server
|
|
51
|
+
|
|
52
|
+
1. In **'use client'** components, import the **useGetWidgetQuery** function into the component.
|
|
53
|
+
|
|
54
|
+
```java
|
|
55
|
+
import { useGetWidgetQuery } from '@akinon/next/data/client/misc';
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
2. Create a variable to hold the imported function, and pass the slug name of the targeted widget to this variable.
|
|
59
|
+
|
|
60
|
+
```java
|
|
61
|
+
const { data } = useGetWidgetQuery('slug-name');
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
3. Retrieve the widget's data and either send it to another component using `<ComponentName data={data} />` syntax or process it within the component where it was retrieved.
|
|
65
|
+
|
|
66
|
+
### Server-Only Components
|
|
67
|
+
|
|
68
|
+
1. In **'server-only'** components, import the **getWidgetData** function into the component.
|
|
69
|
+
|
|
70
|
+
```java
|
|
71
|
+
import { getWidgetData } from '@akinon/next/data/server';
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
2. Prepare a type according to the schema of the created widget.
|
|
75
|
+
|
|
76
|
+
### Example Type
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
type FooterMenuTitle = {
|
|
80
|
+
value: string;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
type FooterMenuItem = [{
|
|
84
|
+
kwargs: {
|
|
85
|
+
data_type: 'nested';
|
|
86
|
+
value: {
|
|
87
|
+
is_side_column_item?: SideItem;
|
|
88
|
+
is_target_blank: TargetBlank;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
value: {
|
|
92
|
+
is_side_column_item?: string;
|
|
93
|
+
is_target_blank: string;
|
|
94
|
+
name: string;
|
|
95
|
+
redirect_url: string;
|
|
96
|
+
};
|
|
97
|
+
}];
|
|
98
|
+
|
|
99
|
+
type FooterMenuType = {
|
|
100
|
+
first_column_title: FooterMenuTitle;
|
|
101
|
+
first_column_items: FooterMenuItem;
|
|
102
|
+
};
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
3. Create a variable for the imported function. Add the type for the **getWidgetData** function to this variable, and provide the widget's slug name to the function.
|
|
106
|
+
|
|
107
|
+
```java
|
|
108
|
+
const data = await getWidgetData<FooterMenuType>({ slug: 'footer-menu' });
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
4. Obtain the data for the targeted widget as intended.
|
|
112
|
+
|
|
113
|
+
At times, there be a need to duplicate the same widget while supplying it with different data. In such situations, creating a widget content is necessary. To use the created widget, import the **dynamic** function.
|
|
114
|
+
|
|
115
|
+
```java
|
|
116
|
+
import dynamic from 'next/dynamic';
|
|
117
|
+
```
|
|
118
|
+
After importing, create a variable to invoke the function, and call the function with the relative path of the preferred content as its argument.
|
|
119
|
+
|
|
120
|
+
```java
|
|
121
|
+
const FooterMenuContent = dynamic(
|
|
122
|
+
() => import('../views/widgets/footer-menu-content'),
|
|
123
|
+
{ssr: false}
|
|
124
|
+
);
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The `FooterMenuContent` component, which incorporates the desired content, is now available for use. To add this component, simply insert `<FooterMenuContent data={data} />` at the desired location.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="@akinon/next/global.d.ts" />
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const nextJest = require('next/jest');
|
|
2
|
+
import type { InitialOptionsTsJest } from 'ts-jest/dist/types';
|
|
3
|
+
|
|
4
|
+
const createJestConfig = nextJest({
|
|
5
|
+
dir: './'
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
const config: InitialOptionsTsJest = {
|
|
9
|
+
preset: 'ts-jest',
|
|
10
|
+
setupFilesAfterEnv: ['<rootDir>/setupTests.ts'],
|
|
11
|
+
transform: {
|
|
12
|
+
'.+\\.(css|styl|less|sass|scss)$': 'jest-css-modules-transform'
|
|
13
|
+
},
|
|
14
|
+
testEnvironment: 'jsdom',
|
|
15
|
+
globals: {
|
|
16
|
+
'ts-jest': {
|
|
17
|
+
tsconfig: 'tsconfig.test.json'
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
moduleDirectories: ['node_modules', 'src']
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
module.exports = async () => ({
|
|
24
|
+
...(await createJestConfig(config)()),
|
|
25
|
+
collectCoverageFrom: [
|
|
26
|
+
'src/**/*.{js,jsx,ts,tsx}',
|
|
27
|
+
'!src/**/*.d.ts',
|
|
28
|
+
'!src/reportWebVitals.ts',
|
|
29
|
+
'!**/node_modules/**'
|
|
30
|
+
],
|
|
31
|
+
transformIgnorePatterns: [
|
|
32
|
+
'node_modules/(?!(swiper|ssr-window|dom7|@akinon)/)'
|
|
33
|
+
]
|
|
34
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="next" />
|
|
2
|
+
/// <reference types="next/image-types/global" />
|
|
3
|
+
/// <reference types="next/navigation-types/compat/navigation" />
|
|
4
|
+
|
|
5
|
+
// NOTE: This file should not be edited
|
|
6
|
+
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import withPWA from 'next-pwa';
|
|
2
|
+
import { withSentryConfig } from '@sentry/nextjs';
|
|
3
|
+
import withPzConfig from '@akinon/next/with-pz-config.js';
|
|
4
|
+
|
|
5
|
+
/** @type {import('next').NextConfig} */
|
|
6
|
+
const nextConfig = {
|
|
7
|
+
// Your Next.js config to override defaults
|
|
8
|
+
rewrites: async () => {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
source: '/:commerce/:locale/:currency/sitemap.xml',
|
|
12
|
+
destination: '/:commerce/:locale/:currency/xml-sitemap'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
source: '/:commerce/:locale/:currency/sitemap/:node',
|
|
16
|
+
destination: '/:commerce/:locale/:currency/xml-sitemap/:node'
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const withPwaConfig = withPWA({
|
|
23
|
+
dest: 'public',
|
|
24
|
+
disable: process.env.NODE_ENV === 'development'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const sentryConfig = {
|
|
28
|
+
silent: true,
|
|
29
|
+
dryRun: !process.env.SENTRY_DSN
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const enhancedConfig = withPzConfig(nextConfig);
|
|
33
|
+
|
|
34
|
+
export default withSentryConfig(withPwaConfig(enhancedConfig), sentryConfig);
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "projectzeronext",
|
|
3
|
+
"version": "1.33.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"clean": "rm -rf node_modules && rm -rf .next",
|
|
8
|
+
"dev": "next dev",
|
|
9
|
+
"build": "next build",
|
|
10
|
+
"start": "next start -p 8008",
|
|
11
|
+
"type-check": "tsc",
|
|
12
|
+
"lint": "next lint",
|
|
13
|
+
"test": "jest",
|
|
14
|
+
"cypress:headless": "cd projectzeroe2e && yarn headless",
|
|
15
|
+
"e2e:headless": "CYPRESS_BASE_URL=http://localhost:3000 start-server-and-test start http://localhost:3000 cypress:headless",
|
|
16
|
+
"postinstall": "pz-postinstall",
|
|
17
|
+
"predev": "pz-predev",
|
|
18
|
+
"postdev": "pz-postdev",
|
|
19
|
+
"prebuild": "pz-prebuild",
|
|
20
|
+
"postbuild": "pz-postbuild",
|
|
21
|
+
"poststart": "pz-poststart",
|
|
22
|
+
"prestart": "pz-prestart"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@akinon/next": "1.33.0",
|
|
26
|
+
"@akinon/pz-b2b": "1.33.0",
|
|
27
|
+
"@akinon/pz-gpay": "1.33.0",
|
|
28
|
+
"@akinon/pz-masterpass": "1.33.0",
|
|
29
|
+
"@akinon/pz-one-click-checkout": "1.33.0",
|
|
30
|
+
"@akinon/pz-otp": "1.33.0",
|
|
31
|
+
"@akinon/pz-pay-on-delivery": "1.33.0",
|
|
32
|
+
"@hookform/resolvers": "2.9.0",
|
|
33
|
+
"@next/third-parties": "14.1.0",
|
|
34
|
+
"@react-google-maps/api": "2.17.1",
|
|
35
|
+
"@sentry/nextjs": "7.105.0",
|
|
36
|
+
"dayjs": "1.11.5",
|
|
37
|
+
"lossless-json": "2.0.5",
|
|
38
|
+
"next": "14.1.3",
|
|
39
|
+
"next-auth": "4.24.5",
|
|
40
|
+
"next-pwa": "5.6.0",
|
|
41
|
+
"pino": "8.11.0",
|
|
42
|
+
"postcss": "8.4.31",
|
|
43
|
+
"react": "18.2.0",
|
|
44
|
+
"react-dom": "18.2.0",
|
|
45
|
+
"react-google-recaptcha": "2.1.0",
|
|
46
|
+
"react-hook-form": "7.31.3",
|
|
47
|
+
"react-intersection-observer": "9.4.0",
|
|
48
|
+
"react-multi-carousel": "2.8.4",
|
|
49
|
+
"react-string-replace": "1.1.0",
|
|
50
|
+
"start-server-and-test": "2.0.3",
|
|
51
|
+
"tailwind-merge": "1.8.0",
|
|
52
|
+
"yup": "0.32.11"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@akinon/eslint-plugin-projectzero": "1.33.0",
|
|
56
|
+
"@semantic-release/changelog": "6.0.2",
|
|
57
|
+
"@semantic-release/exec": "6.0.3",
|
|
58
|
+
"@semantic-release/git": "10.0.1",
|
|
59
|
+
"@tailwindcss/typography": "0.5.10",
|
|
60
|
+
"@testing-library/dom": "8.13.0",
|
|
61
|
+
"@testing-library/jest-dom": "5.16.4",
|
|
62
|
+
"@testing-library/react": "13.1.1",
|
|
63
|
+
"@testing-library/user-event": "14.1.1",
|
|
64
|
+
"@types/googlemaps": "3.43.3",
|
|
65
|
+
"@types/jest": "27.4.1",
|
|
66
|
+
"@types/react": "18.2.27",
|
|
67
|
+
"@types/react-dom": "18.2.12",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "6.7.4",
|
|
69
|
+
"@typescript-eslint/parser": "6.7.4",
|
|
70
|
+
"autoprefixer": "10.4.13",
|
|
71
|
+
"client-only": "0.0.1",
|
|
72
|
+
"clsx": "1.1.1",
|
|
73
|
+
"currency-symbol-map": "5.1.0",
|
|
74
|
+
"eslint": "8.14.0",
|
|
75
|
+
"eslint-config-next": "14.0.3",
|
|
76
|
+
"eslint-config-prettier": "8.5.0",
|
|
77
|
+
"husky": "8.0.0",
|
|
78
|
+
"jest": "29.7.0",
|
|
79
|
+
"jest-css-modules-transform": "4.3.0",
|
|
80
|
+
"lint-staged": "13.1.0",
|
|
81
|
+
"prettier": "2.6.2",
|
|
82
|
+
"react-number-format": "4.9.3",
|
|
83
|
+
"sass": "1.49.9",
|
|
84
|
+
"semantic-release": "19.0.5",
|
|
85
|
+
"server-only": "0.0.1",
|
|
86
|
+
"stylelint": "14.6.0",
|
|
87
|
+
"stylelint-config-sass-guidelines": "9.0.1",
|
|
88
|
+
"stylelint-config-standard": "25.0.0",
|
|
89
|
+
"stylelint-scss": "4.2.0",
|
|
90
|
+
"stylelint-selector-bem-pattern": "2.1.1",
|
|
91
|
+
"tailwindcss": "3.4.0",
|
|
92
|
+
"ts-jest": "29.1.1",
|
|
93
|
+
"ts-node": "10.7.0",
|
|
94
|
+
"typescript": "5.2.2"
|
|
95
|
+
},
|
|
96
|
+
"packageManager": "yarn@1.22.17"
|
|
97
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="@akinon/next/plugins.d.ts" />
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
3
|
+
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
4
|
+
viewBox="0 0 22.773 22.773" xml:space="preserve">
|
|
5
|
+
<g>
|
|
6
|
+
<g>
|
|
7
|
+
<path d="M15.769,0c0.053,0,0.106,0,0.162,0c0.13,1.606-0.483,2.806-1.228,3.675c-0.731,0.863-1.732,1.7-3.351,1.573
|
|
8
|
+
c-0.108-1.583,0.506-2.694,1.25-3.561C13.292,0.879,14.557,0.16,15.769,0z"/>
|
|
9
|
+
<path d="M20.67,16.716c0,0.016,0,0.03,0,0.045c-0.455,1.378-1.104,2.559-1.896,3.655c-0.723,0.995-1.609,2.334-3.191,2.334
|
|
10
|
+
c-1.367,0-2.275-0.879-3.676-0.903c-1.482-0.024-2.297,0.735-3.652,0.926c-0.155,0-0.31,0-0.462,0
|
|
11
|
+
c-0.995-0.144-1.798-0.932-2.383-1.642c-1.725-2.098-3.058-4.808-3.306-8.276c0-0.34,0-0.679,0-1.019
|
|
12
|
+
c0.105-2.482,1.311-4.5,2.914-5.478c0.846-0.52,2.009-0.963,3.304-0.765c0.555,0.086,1.122,0.276,1.619,0.464
|
|
13
|
+
c0.471,0.181,1.06,0.502,1.618,0.485c0.378-0.011,0.754-0.208,1.135-0.347c1.116-0.403,2.21-0.865,3.652-0.648
|
|
14
|
+
c1.733,0.262,2.963,1.032,3.723,2.22c-1.466,0.933-2.625,2.339-2.427,4.74C17.818,14.688,19.086,15.964,20.67,16.716z"/>
|
|
15
|
+
</g>
|
|
16
|
+
<g>
|
|
17
|
+
</g>
|
|
18
|
+
<g>
|
|
19
|
+
</g>
|
|
20
|
+
<g>
|
|
21
|
+
</g>
|
|
22
|
+
<g>
|
|
23
|
+
</g>
|
|
24
|
+
<g>
|
|
25
|
+
</g>
|
|
26
|
+
<g>
|
|
27
|
+
</g>
|
|
28
|
+
<g>
|
|
29
|
+
</g>
|
|
30
|
+
<g>
|
|
31
|
+
</g>
|
|
32
|
+
<g>
|
|
33
|
+
</g>
|
|
34
|
+
<g>
|
|
35
|
+
</g>
|
|
36
|
+
<g>
|
|
37
|
+
</g>
|
|
38
|
+
<g>
|
|
39
|
+
</g>
|
|
40
|
+
<g>
|
|
41
|
+
</g>
|
|
42
|
+
<g>
|
|
43
|
+
</g>
|
|
44
|
+
<g>
|
|
45
|
+
</g>
|
|
46
|
+
</g>
|
|
47
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="10" height="20" viewBox="0 0 10 20" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M6.49 20v-9.123h2.952l.439-3.554h-3.39v-2.27c0-1.028.275-1.731 1.695-1.731H10V.139C9.688.093 8.61 0 7.36 0c-2.617 0-4.4 1.66-4.4 4.705V7.33H0v3.554h2.96V20h3.53z" fill="#4267B2" fill-rule="nonzero"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g fill-rule="nonzero" fill="none">
|
|
3
|
+
<path d="M17.855 7.334c.08 0 .145.065.145.145V9a9.002 9.002 0 0 1-9.063 9A8.979 8.979 0 0 1 0 8.98a9 9 0 0 1 15.258-6.448c.059.056.06.15.003.207l-2.152 2.152a.144.144 0 0 1-.202.003A5.648 5.648 0 0 0 9 3.332a5.651 5.651 0 0 0-5.668 5.629 5.668 5.668 0 0 0 11.087 1.705H9.145A.145.145 0 0 1 9 10.521V7.48c0-.08.065-.145.145-.145h8.71z" fill="#2196F3"/>
|
|
4
|
+
<path d="M17.855 7.334H16.77c.08 0 .144.065.144.145V9a9.004 9.004 0 0 1-8.457 8.984A9.002 9.002 0 0 0 18 9V7.479a.145.145 0 0 0-.145-.145z" fill="#1E88E5"/>
|
|
5
|
+
<path d="M3.852 6.626 1.118 4.651A8.998 8.998 0 0 1 9 0c2.432 0 4.638.965 6.258 2.532.059.056.06.15.003.207l-2.152 2.152a.144.144 0 0 1-.202.003 5.668 5.668 0 0 0-9.056 1.732z" fill="#F44336"/>
|
|
6
|
+
<path d="m3.063 6.056.789.57A5.671 5.671 0 0 1 8.41 3.363l.046-.005a5.651 5.651 0 0 0-5.393 2.698zM14.172 2.532c.058.056.06.15.002.207l-1.746 1.747c.167.127.327.263.48.408a.144.144 0 0 0 .2-.003l2.153-2.152a.145.145 0 0 0-.003-.207A8.972 8.972 0 0 0 8.457.017a8.971 8.971 0 0 1 5.715 2.515z" fill="#E53935"/>
|
|
7
|
+
<path d="M15.602 15.116A8.975 8.975 0 0 1 9 18a9 9 0 0 1-8.051-4.975l2.79-1.912a5.67 5.67 0 0 0 9.13 2.029l2.733 1.974z" fill="#4CAF50"/>
|
|
8
|
+
<path d="m3.74 11.113-.824.564a5.667 5.667 0 0 0 5.54 2.965 5.673 5.673 0 0 1-4.717-3.53zM9 18a8.975 8.975 0 0 0 6.602-2.884l-.67-.483a8.984 8.984 0 0 1-6.474 3.35c.18.011.36.017.542.017z" fill="#43A047"/>
|
|
9
|
+
<path d="M3.332 9c0 .747.144 1.46.407 2.113L.95 13.025A8.958 8.958 0 0 1 0 9c0-1.577.406-3.06 1.118-4.349l2.734 1.975A5.645 5.645 0 0 0 3.332 9z" fill="#FFC107"/>
|
|
10
|
+
<path d="m2.916 11.677.823-.564A5.65 5.65 0 0 1 3.332 9c0-.847.186-1.652.52-2.374l-.79-.57a5.66 5.66 0 0 0-.816 2.905 5.644 5.644 0 0 0 .67 2.716z" fill="#FFB300"/>
|
|
11
|
+
</g>
|
|
12
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|