From b4b866cb54953feb63b6b8d8ec532f67aceaf1bf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 08:26:40 +0200 Subject: [PATCH] chore: release 1.0.0-rc.7 (#949) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(theme): fix dompurify arguments injection (#573) Co-authored-by: Bartosz Herba * feat: mobile menu (#569) Co-authored-by: Alexander Devitsky * chore: fixed some error reported by eslint (#562) * chore: fixed some error reported by eslint * refactor: removed unnecessary type file * fix: small fixes for mobile (#580) * fix(theme): show currency-switcher on mobile * fix(theme): only show login-modal when user isn't logged in * build(dockerfile): binded MAGENTO_BASE_URL to the env variable (#597) * fix(build): changed image provider to ipx (#599) * refactor(general): refactor how and where the cart is loaded - add loadTotalQuantity method on the cart composable as sometimes this is the only information needed - add lazy load for a minicart - header will pull only total quantity data instead of loading whole cart * feat(theme): add conditional rendering for a store switcher and currency switcher - if there is less than 2 currencies/stores relevant switcher will be not displayed * build(tsconfig): changed target in tdconfig files from es5 to es2019 * build(github actions): updated draft release and merge release GH actions * refactor(theme): moved loadStores and loadCurrencies to separate components * refactor(theme): refactored store switcher * refactor(theme): refactored currency swithcer * feat(theme): added useApi composable, refactored topBar - added useApi composable to use GraphQL APi on the client side * chore(composables): made useCustomQuery composables deprecated * feat(theme): - add wishlist lazyload and totalItems shared field * perf(theme): lazy load loginModal * feat(theme): add LoadWhenVisible component and lazyload footer - update social icons to reduce weight and increase quality - load footer only when visible * refactor(theme): changed VSF logo and favicon * refactor(theme): fixed cms pages layout * build: added redis * build: fixed redis cache invalidation * build(build): fixed merge-release GH action * fix(theme): clear login modal reset password data when modal is closed * refactor(theme): add homepage missing german translations * perf(theme): appHeader navigation improvement - add @nuxtjs/device package to recognize used device - remove mobile observer from header and replave it with device recognition tool - navigation is now lazy loaded, categories required for a navigation are not loaded at all on mobile devices * build(deployment): changed URL of Magento backend * fix(redis): added missing redis config * refactor(theme): refactor SearchBar component - move search bar component to components/Header - remove unused code and watchers * fix(config): fixed redis__enabled varaible binding * build(cache): enabled varnish * fix(api): fix cart_id graphql error * fix: centered empty cart text and image * feat(theme): add sorting select in the navbar on the mobile category view * fix(theme): [Category] Save for later button should be hidden for guest user * fix(theme): [My Account] Aligned State/Province input * chore(theme): Product removal confirmation out of viewport * fix(theme): added radio-button filter for mobile * fix(theme): refactored how the selected filters values are set * feat: asset Optimization * feat(theme): add pagination on the category mobile view * fix(theme): [Product] Fixed Additional information tab * refactor: optimized build, fixed small bugs * fix(myaccount): fix few bugs on my account - fix hydration issues - rework and fix reviews composable - add import of missing email validators - fix readonly computable error in the app header * refactor(theme): made TopBar component lazy loaded * refactor(theme): fixed cache issues * fix(theme): refactored when clicking outside the search-results * fix(theme): better aligned search input icon * fix(theme): refactored watcher * chore: updated readme * refactor(theme): category page refactoring step-1 - separate category page and sidebar logic - add resolving layput configuration on category page - move navbar to a separate component - add redis cache for the sidebar - add empty results page * chore(theme): Customer cannot change their email on mobile * Update package.json * fix(theme): center wishlist `` vertically this is not based on any Figma designs - just aligning `WishlistSidebar.vue` with `CartSidebar.vue` This is a fix ONLY for the desktop version. There's still a few px of vertical difference between the `` on mobile CartSidebar and mobile WishlistSidebar, but that's because one of them has a text header and the other doesn't (separate issue) * fix(theme): add products from list view with correct quantity Also made some minor eslint fixes since I "touched" the file and husky started detecting them * feat(theme): add basic skeleton loader component * build: refactored precommit hooks execution * fix(theme): better looking default shipping/billing address badges * fix(M2-146): Correct desktop order history column alignment * fix(theme): fix error when adding single quantity product * feat: migrate to ESM and esbuild * chore: revert few changes * chore: restore yarn.lock in docs * docs: update TypeScript and yarn.lock * chore: revert changes that require Node 16 * chore: revert changes * chore: improve dev command in api-client * fix(theme): fix cart's product url resolving for a configurable products * chore: allign main to develop after 1.0.0-rc.6 release (#697) * Fix useFacet(...) customQuery implemention (#413) * chore: release 1.0.0-rc.5.3 (#437) * chore: add gitflow actions (#379) * chore: added base gitflow actions * chore: added base gitflow actions * chore: fixed versioning process * docs: added roadmap to the docs (#380) closes #323 * fix(theme): refactor and fix store switcher (#383) - update nuxt.config.js to handle de translation - fix issue with flag icon #362 - refactor store switcher component - add store name next to the language icon flag - add translation info in docs Co-authored-by: Bartosz Herba * fix(theme): fix preselection sort order when query param is available (#385) Co-authored-by: Bartosz Herba * fix: broken cart after placing order as guest (#386) * fix(theme): passing the email instead of the user-object for creating a guest-cart * fix(composables): remove empty params in array, fails on Magento * test(theme): updated test for attaching guest email address to cart * Update packages/composables/src/composables/useShipping/index.ts Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Marcin Kwiatkowski Co-authored-by: Heitor Ramon Ribeiro * fix(theme): fix flashing category page (#387) Co-authored-by: Bartosz Herba * fix(theme): fix flashing category page (#388) Co-authored-by: Bartosz Herba * fix: default billing information does not appear on address (#382) * fix(theme): added badge for default-shipping and default-sbilling address * fix(composables): sort addresses, put default shipping and billing address to top * fix(theme): default billing and shipping text can be translated * chore(theme): added translations * fix(composables): removed console.log * chore: upgraded vsf core to 2.5.4 (#389) * chore: updated VSF core version to 2.5.4 * build: updated test GH action * fix(composables): update url resolver clearing patter to remove locale prefix (#390) Co-authored-by: Bartosz Herba * fix(theme): fix links to catch current locale (#391) * fix(theme): M2-25 fix links to catch current locale * Apply suggestions from code review Co-authored-by: Heitor Ramon Ribeiro * test(test-utils): added localePath global mock to the test-utils Co-authored-by: Bartosz Herba Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Marcin Kwiatkowski * style(theme): aligned titles in my account menu (#400) * feat(middleware): added i18n route middleware (#408) * feat(middleware): added i18n route middleware closes #378 * refactor(middleware): i18n middleware: adjustements * fix(theme): update localisation for all :link bindings (#416) Co-authored-by: Bartosz Herba * docs(theme): update custom queries documentation to be more friendly and explicit (#418) Co-authored-by: Bartosz Herba * chore(theme): removed html-validator (#414) * refactor: update dependencies (#420) * refactor(eslint): updated dependencies - Updated `eslint-plugin-unicorn` to `40.0.0` * refactor(eslint-import): updated dependencies - Updated `eslint-plugin-import` to `2.25.4` * refactor(eslint-jest): updated dependencies - Updated `eslint-plugin-jest` to `25.3.4` * refactor(eslint-typescript): updated dependencies - Updated `@typescript-eslint/eslint-plugin` to `5.9.1` - Updated `@typescript-eslint/parser` to `5.9.1` * refactor(eslint-vue): updated dependencies - Updated `eslint-plugin-vue` to `8.3.0` * refactor(api-client): updated dependencies - Updated `@apollo/client` to `3.5.7` - Updated `dotenv` to `12.0.1` * refactor(theme): updated dependencies - Updated `@babel/core` to `7.16.7` - Updated `babel-jest` to `27.4.6` - Updated `cypress` to `9.2.1` - Updated `dotenv` to `12.0.1` - Updated `jest` to `27.4.7` - Updated `jest-environment-jsdom` to `27.4.6` - Updated `lint-staged` to `12.1.7` - Updated `mocha` to `9.1.4` - Updated `npm-check-updates` to `12.1.0` - Updated `ts-jest` to `27.1.3` * refactor: updated dependencies - Updated `@babel/core` to `7.16.7` - Updated `@babel/plugin-proposal-private-methods` to `7.16.7` - Updated `@commitlint/cli` to `16.0.2` - Updated `@commitlint/config-conventional` to `16.0.0` - Updated `@commitlint/config-lerna-scopes` to `16.0.0` - Updated `@graphql-codegen/cli` to `2.3.1` - Updated `@graphql-codegen/typescript` to `2.4.2` - Updated `@graphql-codegen/typescript-operations` to `2.2.2` - Updated `@graphql-tools/utils` to `8.6.1` - Updated `@rollup/plugin-node-resolve` to `13.1.3` - Updated `@types/jest` to `27.4.0` - Updated `@types/node` to `17.0.8` - Updated `@typescript-eslint/parser` to `5.9.1` - Updated `@vue/eslint-config-typescript` to `10.0.0` - Updated `eslin` to `8.6.0` - Updated `jest` to `27.4.7` - Updated `lint-staged` to `12.1.7` - Updated `npm-check-updates` to `12.1.0` - Updated `rollup` to `2.64.0` - Updated `shx` to `0.3.4` - Updated `ts-jest` to `27.1.3``` * refactor(theme): enables currency switcher on TopBar.vue (#421) * fix(theme): fix 404 issue when redirecting to address details page (#424) Co-authored-by: Bartosz Herba * test: scaffold unit tests in composables and api client package (#419) * test(composables): added jest config * tests(composables): rewritten test + fix in productGetter * tests(composables): updated configuration in jest.config.js * tests(api-client): added tests for api-client + move general config to jest.base.config.js * tests(api-client): added jest configuration + simple test * chore: removed jest-environment-jsdom-sixteen * tests(theme): reverted back and removed jest.base.config.json * test(composables): reverted back and removed jest.base.config.json * test(api-client): reverted back and removed jest.base.config.json * chore: removed jest.base.config.json Co-authored-by: Marcin Kwiatkowski * fix(theme): fix disappearing category sidebar filter change (#423) Co-authored-by: Bartosz Herba * fix(theme): out of stock product will no longer break cart (#404) * fix(theme): out of stock product will no longer break cart * fix(theme): remove cart load from layout * docs(theme): update tests for CartSidebar Co-authored-by: Bartosz Herba * Revert "refactor(theme): enables currency switcher on TopBar.vue (#421)" (#426) This reverts commit fbb1598ae7d78ebe3319e0d9d3c1a8dacc2de402. * refactor(i18n): changed i18n middleware to plugin and fix store switc… (#425) * refactor(i18n): changed i18n middleware to plugin and fix store switcher by url issues * refactor: cR fixes for i18n * refactor(theme): changed i18n midl. to plugin & fix store switcher by url (#431) * refactor(i18n): changed i18n middleware to plugin and fix store switcher by url issues * refactor: cR fixes for i18n * refactor(composables): added `ConfigState` to export API * chore: updated yarn.lock * refactor(theme): updated i18n middleware to fix URL redirect * docs: updated API-Extractor Co-authored-by: Marcin Kwiatkowski * fix(api-client): update default mutation error handling for apollo client (#429) Co-authored-by: Bartosz Herba * fix: expired user token (#392) * fix(theme): disabled checkbox on login-modal * feat(theme): log customer out when customer-token is expired * feat: added token expired notification, clear cart and customer token when customer is not logged in * feat: logged out notification * refactor: removed console log * refactor: added improvements for token-expired plugin, added unit tests * refactor: changed log out notification message * test: fixed token-expired plugin test * test: added cookies mock to test-utils Co-authored-by: Marcin Kwiatkowski * refactor(theme): enable the currency switcher on `TopBar.vue` (#430) * refactor(theme): enables currency switcher on TopBar.vue * refactor(theme): add safe checking on Currency Selector * Fix useFacet(...) customQuery implemention (#413) * chore: updated version number to rc.5.3, updated yarn.lock, fixed cloud action * fix(theme): update localisation for all :link bindings (#449) Co-authored-by: Bartosz Herba Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Bartosz Herba Co-authored-by: Bartosz Herba Co-authored-by: Kevin Gorjan Co-authored-by: Aliaaaam <88658555+Aliaaaam@users.noreply.github.com> * chore: release/1.0.0-rc.5.4 (#530) * chore: add gitflow actions (#379) * chore: added base gitflow actions * chore: added base gitflow actions * chore: fixed versioning process * docs: added roadmap to the docs (#380) closes #323 * fix(theme): refactor and fix store switcher (#383) - update nuxt.config.js to handle de translation - fix issue with flag icon #362 - refactor store switcher component - add store name next to the language icon flag - add translation info in docs Co-authored-by: Bartosz Herba * fix(theme): fix preselection sort order when query param is available (#385) Co-authored-by: Bartosz Herba * fix: broken cart after placing order as guest (#386) * fix(theme): passing the email instead of the user-object for creating a guest-cart * fix(composables): remove empty params in array, fails on Magento * test(theme): updated test for attaching guest email address to cart * Update packages/composables/src/composables/useShipping/index.ts Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Marcin Kwiatkowski Co-authored-by: Heitor Ramon Ribeiro * fix(theme): fix flashing category page (#387) Co-authored-by: Bartosz Herba * fix(theme): fix flashing category page (#388) Co-authored-by: Bartosz Herba * fix: default billing information does not appear on address (#382) * fix(theme): added badge for default-shipping and default-sbilling address * fix(composables): sort addresses, put default shipping and billing address to top * fix(theme): default billing and shipping text can be translated * chore(theme): added translations * fix(composables): removed console.log * chore: upgraded vsf core to 2.5.4 (#389) * chore: updated VSF core version to 2.5.4 * build: updated test GH action * fix(composables): update url resolver clearing patter to remove locale prefix (#390) Co-authored-by: Bartosz Herba * fix(theme): fix links to catch current locale (#391) * fix(theme): M2-25 fix links to catch current locale * Apply suggestions from code review Co-authored-by: Heitor Ramon Ribeiro * test(test-utils): added localePath global mock to the test-utils Co-authored-by: Bartosz Herba Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Marcin Kwiatkowski * style(theme): aligned titles in my account menu (#400) * feat(middleware): added i18n route middleware (#408) * feat(middleware): added i18n route middleware closes #378 * refactor(middleware): i18n middleware: adjustements * fix(theme): update localisation for all :link bindings (#416) Co-authored-by: Bartosz Herba * docs(theme): update custom queries documentation to be more friendly and explicit (#418) Co-authored-by: Bartosz Herba * chore(theme): removed html-validator (#414) * refactor: update dependencies (#420) * refactor(eslint): updated dependencies - Updated `eslint-plugin-unicorn` to `40.0.0` * refactor(eslint-import): updated dependencies - Updated `eslint-plugin-import` to `2.25.4` * refactor(eslint-jest): updated dependencies - Updated `eslint-plugin-jest` to `25.3.4` * refactor(eslint-typescript): updated dependencies - Updated `@typescript-eslint/eslint-plugin` to `5.9.1` - Updated `@typescript-eslint/parser` to `5.9.1` * refactor(eslint-vue): updated dependencies - Updated `eslint-plugin-vue` to `8.3.0` * refactor(api-client): updated dependencies - Updated `@apollo/client` to `3.5.7` - Updated `dotenv` to `12.0.1` * refactor(theme): updated dependencies - Updated `@babel/core` to `7.16.7` - Updated `babel-jest` to `27.4.6` - Updated `cypress` to `9.2.1` - Updated `dotenv` to `12.0.1` - Updated `jest` to `27.4.7` - Updated `jest-environment-jsdom` to `27.4.6` - Updated `lint-staged` to `12.1.7` - Updated `mocha` to `9.1.4` - Updated `npm-check-updates` to `12.1.0` - Updated `ts-jest` to `27.1.3` * refactor: updated dependencies - Updated `@babel/core` to `7.16.7` - Updated `@babel/plugin-proposal-private-methods` to `7.16.7` - Updated `@commitlint/cli` to `16.0.2` - Updated `@commitlint/config-conventional` to `16.0.0` - Updated `@commitlint/config-lerna-scopes` to `16.0.0` - Updated `@graphql-codegen/cli` to `2.3.1` - Updated `@graphql-codegen/typescript` to `2.4.2` - Updated `@graphql-codegen/typescript-operations` to `2.2.2` - Updated `@graphql-tools/utils` to `8.6.1` - Updated `@rollup/plugin-node-resolve` to `13.1.3` - Updated `@types/jest` to `27.4.0` - Updated `@types/node` to `17.0.8` - Updated `@typescript-eslint/parser` to `5.9.1` - Updated `@vue/eslint-config-typescript` to `10.0.0` - Updated `eslin` to `8.6.0` - Updated `jest` to `27.4.7` - Updated `lint-staged` to `12.1.7` - Updated `npm-check-updates` to `12.1.0` - Updated `rollup` to `2.64.0` - Updated `shx` to `0.3.4` - Updated `ts-jest` to `27.1.3``` * refactor(theme): enables currency switcher on TopBar.vue (#421) * fix(theme): fix 404 issue when redirecting to address details page (#424) Co-authored-by: Bartosz Herba * test: scaffold unit tests in composables and api client package (#419) * test(composables): added jest config * tests(composables): rewritten test + fix in productGetter * tests(composables): updated configuration in jest.config.js * tests(api-client): added tests for api-client + move general config to jest.base.config.js * tests(api-client): added jest configuration + simple test * chore: removed jest-environment-jsdom-sixteen * tests(theme): reverted back and removed jest.base.config.json * test(composables): reverted back and removed jest.base.config.json * test(api-client): reverted back and removed jest.base.config.json * chore: removed jest.base.config.json Co-authored-by: Marcin Kwiatkowski * fix(theme): fix disappearing category sidebar filter change (#423) Co-authored-by: Bartosz Herba * fix(theme): out of stock product will no longer break cart (#404) * fix(theme): out of stock product will no longer break cart * fix(theme): remove cart load from layout * docs(theme): update tests for CartSidebar Co-authored-by: Bartosz Herba * Revert "refactor(theme): enables currency switcher on TopBar.vue (#421)" (#426) This reverts commit fbb1598ae7d78ebe3319e0d9d3c1a8dacc2de402. * refactor(i18n): changed i18n middleware to plugin and fix store switc… (#425) * refactor(i18n): changed i18n middleware to plugin and fix store switcher by url issues * refactor: cR fixes for i18n * refactor(theme): changed i18n midl. to plugin & fix store switcher by url (#431) * refactor(i18n): changed i18n middleware to plugin and fix store switcher by url issues * refactor: cR fixes for i18n * refactor(composables): added `ConfigState` to export API * chore: updated yarn.lock * refactor(theme): updated i18n middleware to fix URL redirect * docs: updated API-Extractor Co-authored-by: Marcin Kwiatkowski * fix(api-client): update default mutation error handling for apollo client (#429) Co-authored-by: Bartosz Herba * fix: expired user token (#392) * fix(theme): disabled checkbox on login-modal * feat(theme): log customer out when customer-token is expired * feat: added token expired notification, clear cart and customer token when customer is not logged in * feat: logged out notification * refactor: removed console log * refactor: added improvements for token-expired plugin, added unit tests * refactor: changed log out notification message * test: fixed token-expired plugin test * test: added cookies mock to test-utils Co-authored-by: Marcin Kwiatkowski * refactor(theme): enable the currency switcher on `TopBar.vue` (#430) * refactor(theme): enables currency switcher on TopBar.vue * refactor(theme): add safe checking on Currency Selector * fix(theme): remove redundant cart load actions (#438) Co-authored-by: Bartosz Herba * perf(theme): updated nuxt.config.js to improve rebuild performance during development (#443) Updated the nuxt.config.js by increasing the enforceSizeThreshold and removing configuration properties * fix(theme): update localisation for all :link bindings (#450) Co-authored-by: Bartosz Herba * fix: handle currency switch issue (#441) * fix(theme): solve currency change issue * docs(theme): add currency formatting plugin information * test(theme): add UT for plugin and formatCurrency helper * refactor(fcplugin): change the logic responsible for resolving locale value Co-authored-by: Bartosz Herba * chore: align main with develop (#455) * Fix useFacet(...) customQuery implemention (#413) * chore: release 1.0.0-rc.5.3 (#437) * chore: add gitflow actions (#379) * chore: added base gitflow actions * chore: added base gitflow actions * chore: fixed versioning process * docs: added roadmap to the docs (#380) closes #323 * fix(theme): refactor and fix store switcher (#383) - update nuxt.config.js to handle de translation - fix issue with flag icon #362 - refactor store switcher component - add store name next to the language icon flag - add translation info in docs Co-authored-by: Bartosz Herba * fix(theme): fix preselection sort order when query param is available (#385) Co-authored-by: Bartosz Herba * fix: broken cart after placing order as guest (#386) * fix(theme): passing the email instead of the user-object for creating a guest-cart * fix(composables): remove empty params in array, fails on Magento * test(theme): updated test for attaching guest email address to cart * Update packages/composables/src/composables/useShipping/index.ts Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Marcin Kwiatkowski Co-authored-by: Heitor Ramon Ribeiro * fix(theme): fix flashing category page (#387) Co-authored-by: Bartosz Herba * fix(theme): fix flashing category page (#388) Co-authored-by: Bartosz Herba * fix: default billing information does not appear on address (#382) * fix(theme): added badge for default-shipping and default-sbilling address * fix(composables): sort addresses, put default shipping and billing address to top * fix(theme): default billing and shipping text can be translated * chore(theme): added translations * fix(composables): removed console.log * chore: upgraded vsf core to 2.5.4 (#389) * chore: updated VSF core version to 2.5.4 * build: updated test GH action * fix(composables): update url resolver clearing patter to remove locale prefix (#390) Co-authored-by: Bartosz Herba * fix(theme): fix links to catch current locale (#391) * fix(theme): M2-25 fix links to catch current locale * Apply suggestions from code review Co-authored-by: Heitor Ramon Ribeiro * test(test-utils): added localePath global mock to the test-utils Co-authored-by: Bartosz Herba Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Marcin Kwiatkowski * style(theme): aligned titles in my account menu (#400) * feat(middleware): added i18n route middleware (#408) * feat(middleware): added i18n route middleware closes #378 * refactor(middleware): i18n middleware: adjustements * fix(theme): update localisation for all :link bindings (#416) Co-authored-by: Bartosz Herba * docs(theme): update custom queries documentation to be more friendly and explicit (#418) Co-authored-by: Bartosz Herba * chore(theme): removed html-validator (#414) * refactor: update dependencies (#420) * refactor(eslint): updated dependencies - Updated `eslint-plugin-unicorn` to `40.0.0` * refactor(eslint-import): updated dependencies - Updated `eslint-plugin-import` to `2.25.4` * refactor(eslint-jest): updated dependencies - Updated `eslint-plugin-jest` to `25.3.4` * refactor(eslint-typescript): updated dependencies - Updated `@typescript-eslint/eslint-plugin` to `5.9.1` - Updated `@typescript-eslint/parser` to `5.9.1` * refactor(eslint-vue): updated dependencies - Updated `eslint-plugin-vue` to `8.3.0` * refactor(api-client): updated dependencies - Updated `@apollo/client` to `3.5.7` - Updated `dotenv` to `12.0.1` * refactor(theme): updated dependencies - Updated `@babel/core` to `7.16.7` - Updated `babel-jest` to `27.4.6` - Updated `cypress` to `9.2.1` - Updated `dotenv` to `12.0.1` - Updated `jest` to `27.4.7` - Updated `jest-environment-jsdom` to `27.4.6` - Updated `lint-staged` to `12.1.7` - Updated `mocha` to `9.1.4` - Updated `npm-check-updates` to `12.1.0` - Updated `ts-jest` to `27.1.3` * refactor: updated dependencies - Updated `@babel/core` to `7.16.7` - Updated `@babel/plugin-proposal-private-methods` to `7.16.7` - Updated `@commitlint/cli` to `16.0.2` - Updated `@commitlint/config-conventional` to `16.0.0` - Updated `@commitlint/config-lerna-scopes` to `16.0.0` - Updated `@graphql-codegen/cli` to `2.3.1` - Updated `@graphql-codegen/typescript` to `2.4.2` - Updated `@graphql-codegen/typescript-operations` to `2.2.2` - Updated `@graphql-tools/utils` to `8.6.1` - Updated `@rollup/plugin-node-resolve` to `13.1.3` - Updated `@types/jest` to `27.4.0` - Updated `@types/node` to `17.0.8` - Updated `@typescript-eslint/parser` to `5.9.1` - Updated `@vue/eslint-config-typescript` to `10.0.0` - Updated `eslin` to `8.6.0` - Updated `jest` to `27.4.7` - Updated `lint-staged` to `12.1.7` - Updated `npm-check-updates` to `12.1.0` - Updated `rollup` to `2.64.0` - Updated `shx` to `0.3.4` - Updated `ts-jest` to `27.1.3``` * refactor(theme): enables currency switcher on TopBar.vue (#421) * fix(theme): fix 404 issue when redirecting to address details page (#424) Co-authored-by: Bartosz Herba * test: scaffold unit tests in composables and api client package (#419) * test(composables): added jest config * tests(composables): rewritten test + fix in productGetter * tests(composables): updated configuration in jest.config.js * tests(api-client): added tests for api-client + move general config to jest.base.config.js * tests(api-client): added jest configuration + simple test * chore: removed jest-environment-jsdom-sixteen * tests(theme): reverted back and removed jest.base.config.json * test(composables): reverted back and removed jest.base.config.json * test(api-client): reverted back and removed jest.base.config.json * chore: removed jest.base.config.json Co-authored-by: Marcin Kwiatkowski * fix(theme): fix disappearing category sidebar filter change (#423) Co-authored-by: Bartosz Herba * fix(theme): out of stock product will no longer break cart (#404) * fix(theme): out of stock product will no longer break cart * fix(theme): remove cart load from layout * docs(theme): update tests for CartSidebar Co-authored-by: Bartosz Herba * Revert "refactor(theme): enables currency switcher on TopBar.vue (#421)" (#426) This reverts commit fbb1598ae7d78ebe3319e0d9d3c1a8dacc2de402. * refactor(i18n): changed i18n middleware to plugin and fix store switc… (#425) * refactor(i18n): changed i18n middleware to plugin and fix store switcher by url issues * refactor: cR fixes for i18n * refactor(theme): changed i18n midl. to plugin & fix store switcher by url (#431) * refactor(i18n): changed i18n middleware to plugin and fix store switcher by url issues * refactor: cR fixes for i18n * refactor(composables): added `ConfigState` to export API * chore: updated yarn.lock * refactor(theme): updated i18n middleware to fix URL redirect * docs: updated API-Extractor Co-authored-by: Marcin Kwiatkowski * fix(api-client): update default mutation error handling for apollo client (#429) Co-authored-by: Bartosz Herba * fix: expired user token (#392) * fix(theme): disabled checkbox on login-modal * feat(theme): log customer out when customer-token is expired * feat: added token expired notification, clear cart and customer token when customer is not logged in * feat: logged out notification * refactor: removed console log * refactor: added improvements for token-expired plugin, added unit tests * refactor: changed log out notification message * test: fixed token-expired plugin test * test: added cookies mock to test-utils Co-authored-by: Marcin Kwiatkowski * refactor(theme): enable the currency switcher on `TopBar.vue` (#430) * refactor(theme): enables currency switcher on TopBar.vue * refactor(theme): add safe checking on Currency Selector * Fix useFacet(...) customQuery implemention (#413) * chore: updated version number to rc.5.3, updated yarn.lock, fixed cloud action * fix(theme): update localisation for all :link bindings (#449) Co-authored-by: Bartosz Herba Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Bartosz Herba Co-authored-by: Bartosz Herba Co-authored-by: Kevin Gorjan Co-authored-by: Aliaaaam <88658555+Aliaaaam@users.noreply.github.com> Co-authored-by: Aliaaaam <88658555+Aliaaaam@users.noreply.github.com> Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Bartosz Herba Co-authored-by: Bartosz Herba Co-authored-by: Kevin Gorjan * fix(minicart): fix resolving configurable variants data (#456) Co-authored-by: Bartosz Herba * feat: added translations for german store (#459) * fix(composable): fix clearing cart on customer logout (#458) Co-authored-by: Bartosz Herba * fix(theme): fix fcPlugin issuse when cookies were not set yet - added default currency fallback (#460) Co-authored-by: Bartosz Herba * fix(api-client): update all cart related queries/mutation to include configurable variants data (#461) Co-authored-by: Bartosz Herba * fix(theme): fix adding product to a wishlist from a listed category page (#464) Co-authored-by: Bartosz Herba * fix(theme): add debounced update quantity action so it will be possible to insert multidigital value (#465) Co-authored-by: Bartosz Herba * fix(theme): fix customer account update data and password change functionality (#469) - Previously error and success messages were not displayed and the change password action always lead to an error, now either update data and password change are handled properly Co-authored-by: Bartosz Herba * perf(general): add performance improvement changes (#471) * Test performance improvement commit * chore(deployment): changed deployment config to allow A-B testing on stage * refactor: changed default layout hydration Co-authored-by: Bartosz Herba Co-authored-by: Marcin Kwiatkowski * Revert "perf(general): add performance improvement changes (#471)" (#472) This reverts commit 2f06a692a3244efd47df73e3ba6fcfc0da2d8fd0. * fix: loosing data when moving between steps on the checkout (#440) * fix(theme): prevent user to click on next steps in the checkout * feat(theme): added an asyncLocalStorage helper * fix(theme): added feature so the User Account is filled in * fix(theme): user can't go pages directly * feat(theme): a helpers for validating is the user has access to a specific step in the checkout * feat(theme): implemented the validation in the checkout steps * test: added tests for asyncLocalStorage and the steps helper * fix(composables): re-calculate cart when changing shipping-method (#473) * feat(theme): add missing german translations (#479) Co-authored-by: Bartosz Herba * feat: added nuxt-img and possibility to use external image providers (#467) * chore(theme): added nuxt-image * feat(theme): added nuxt-img to category page * feat: added nuxt-img to category pages, added newe configs, and useImage compoosable * feat(theme): added nuxt-img to products carousel, added image enums * feat(theme): added nuxt-img for search results * feat(theme): added nuxt-img to my account wishlist * feat(theme): changed log to use nuxt-img * feat(theme): changed empty cart icon to use nuxt-img * feat(theme): added nuxt-img to instagram feed, updated image names * feat(theme): changed error image on search results to use nuxt-img * feat(theme): update store switcher to use nuxt-img instead of SfImage * feat(theme): added nuxt-img to wishlist sidebar * feat(theme): added nuxt-img to MobileStoreBanner * feat(theme): added nuxt-img to grouoped product selector * feat(theme): added nuxt-img to payment component * docs: added docs for external images providers * build(cloud): updated vuestorefront cloud docker file and added new args * build: updated deploy gh action to add image env vatiables * docs(configuration): updated docs for image providers * build: added missed buildargs * build: fixed dockerfile * build: fixed typo in docker file * build: updated config * test: add unit tests for the useImage composable * fix(theme): fix mobile home button alignment (#475) * refactor: m2-69. ssr optimization for default layout (#477) * Test performance improvement commit * chore(deployment): changed deployment config to allow A-B testing on stage * refactor: changed default layout hydration Co-authored-by: Bartosz Herba Co-authored-by: Marcin Kwiatkowski * fix: incorrect shipping method price displayed in order summary (#481) * fix(composables): re-calculate cart when changing shipping-method * fix(theme): removed cache-id for retrieving shipping methods Cache id is removed because it retrieves the cached shipping methods. But when the address changes, it can be that the price of shipping methods need to be updated * fix(theme): fix footer lazy hydration (#488) Co-authored-by: Bartosz Herba * fix(theme): fixed product layout tablet (#487) * fix(theme): added spacing on the left and right of the checkout page (#486) * fix(theme): fixed payment setup style discrepancies (#484) * fix: incorrect shipping method price displayed in order summary (#496) * fix(composables): re-calculate cart when changing shipping-method * fix(theme): removed cache-id for retrieving shipping methods Cache id is removed because it retrieves the cached shipping methods. But when the address changes, it can be that the price of shipping methods need to be updated * chore: updated yarn.lock * fix(theme): redirect to home when accessing checkout if cart is empty * fix(theme): fixed hydration issue moved logic from SSR to onMounted to fix hydration difference * fix(theme): fixed cms page loading (#495) * fix(theme): fixed review page is empty if there are no reviews (#485) * fix(theme): ssr optimization for default layout (#506) Co-authored-by: Bartosz Herba * fix(theme): orders history table - no order details button on mobile (#505) * fix(theme): product bundle visual issue (#504) * fix(theme): add wishlist loading when customer is logging in (#509) Co-authored-by: Bartosz Herba * fix(theme): fix setting proper store and locale if there is no cookie (#508) Co-authored-by: Bartosz Herba * feat(recaptcha): add recaptcha (#401) * feat: add example file * feat: init recaptcha * feat(recaptcha): reverte some configs * feat(recaptcha): add v3 support * feat(recaptcha): add possibility to deactivate module and docs * feat(recaptcha): link reCaptcha doc * feat(recaptcha): link reCaptcha doc * feat(recaptcha): use fetch instead of axios * feat(recaptcha): add recaptcha to review form * feat(recaptcha): add recaptcha to reset password form * feat(recaptcha): add recaptcha to checkout form * feat(recaptcha): add recaptcha to forgot password and register forms * feat(recaptcha): code review * feat(recaptcha): refactoring * feat(recaptcha): add tests Co-authored-by: Abdellatif El Mizeb Co-authored-by: Frédéric Le Menach * chore: added sentry (#507) * chore: added Sentry * build: added SENTRY_DSN variable to envs * build(updated sentry config): updated sentry config * build(added config for sentry performance integrartion): added config for sentry * chore: updated sentry config * chore: restored deployment config * test(theme): fixed loginModal component tests * feat: added support for @vue-storefront/cache module (#482) * chore(theme): added nuxt-image * feat(theme): added nuxt-img to category page * feat: added nuxt-img to category pages, added newe configs, and useImage compoosable * feat(theme): added nuxt-img to products carousel, added image enums * feat(theme): added nuxt-img for search results * feat(theme): added nuxt-img to my account wishlist * feat(theme): changed log to use nuxt-img * feat(theme): changed empty cart icon to use nuxt-img * feat(theme): added nuxt-img to instagram feed, updated image names * feat(theme): changed error image on search results to use nuxt-img * feat(theme): update store switcher to use nuxt-img instead of SfImage * feat(theme): added nuxt-img to wishlist sidebar * feat(theme): added nuxt-img to MobileStoreBanner * feat(theme): added nuxt-img to grouoped product selector * feat(theme): added nuxt-img to payment component * docs: added docs for external images providers * build(cloud): updated vuestorefront cloud docker file and added new args * build: updated deploy gh action to add image env vatiables * docs(configuration): updated docs for image providers * build: added missed buildargs * build: fixed dockerfile * build: fixed typo in docker file * build: updated config * test: add unit tests for the useImage composable * chore(theme): added @vue-storefront-cache module * chore(theme): added config for @vue-storefront/cache to nuxt.config.js * feat(theme): added cache tags to home and category page * chore(theme): added redis-cache module, fixed cache tags for category page * feat(theme): added cache tags to product page, added body parser server middleware * build: added config for redis, modified deployment config for tests * build: removed unnecessary redis_password env variable * build: fixed redis env variables names * feat(theme): added cache tags for cms pages * chore(theme): removed console.logs, added comments to nuxt.config.js * build: removed redis-cache module from package.json and addet it to dockerfile * build: updated dockerfile * build(updzted docker file): updated dovkerfile * build: added REDIS__ENABLED env variable * docs: added docs for redis caching * build: reverted test changes in deploy action * fix(theme): removed typo from Category template n * build: fixed GH deploy action * fix: billing address overwrites shipping address when copy flag is set (#510) * fix(theme): don't redirect with empty cart on thank-you step during the checkout * fix(theme): fix on billing step when address for shipping and billing are the same When addresses are the same, hide the form on the billing-step so users can't fill in a new address * chore(theme): added missing translations * build: added npm registry to dockerfile (#511) * build(deployment): added reCahptcha env variables, and modified deploy action (#515) * build(theme): extracted styles to separate .css chunks (#516) Co-authored-by: Heitor Ramon Ribeiro * fix(theme, composable): expired user token issue (#519) - add proper handling of unathorized requests Co-authored-by: Bartosz Herba * fix(theme): update login modal to handle translations (#521) Co-authored-by: Bartosz Herba * chore(theme): removed redis, sentry and reCaptcha config from nuxt.config.js (#522) * fix: added missing translations (#525) * chore(theme): added translations for the home-page * chore(theme): added translations for my-account * fix: disable ATC button while new product configuration is being loaded (#523) Co-authored-by: Alexander Devitsky * chore: added possibility to extend nuxt.config during deployment (#524) * build: introduced nuxt.config.additional.js * build: updated dockerfile * build: updated dockerfile * build: fixed type * build: fixed path * build: updated base nuxt config path * chore: removed recaptcha module from package.json * build: removed test changes from deployment config, upated recaptcha docs * chore: updated dependencies nad optimized dockerfile * docs: updated api docs * chore: disabled recaptcha * build: changed dockerfile * build: updated recaptcha deployment config * fix: fixed recaptcha enabled config type issue * build: manually disabled recaptcha * fix(composable): update useFacets to work with a customQueries * fix(theme): fix missing address details tab for non-english locale stores (#542) Co-authored-by: Bartosz Herba * refactor(theme): performance improvements (#541) * refactor(theme): moved magento configuration to separate non blocking component * build(theme): removed chunks configuration * refactor(theme): removed magentoConfiguration component * fix(theme): update address action will now properly load address data in form (#551) Co-authored-by: Bartosz Herba * fix(theme): fix add to wishlist button on catgory listing view for a mobile devices (#554) Co-authored-by: Bartosz Herba * fix(theme): save or update of address details in the customer account will no longer yield 404 (#555) Co-authored-by: Bartosz Herba Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Bartosz Herba Co-authored-by: Bartosz Herba Co-authored-by: Kevin Gorjan Co-authored-by: Aliaaaam <88658555+Aliaaaam@users.noreply.github.com> Co-authored-by: Georgiy Slobodenyuk Co-authored-by: Diego Alba <72459310+Diegoalbag@users.noreply.github.com> Co-authored-by: Abdellatif EL MIZEB Co-authored-by: Abdellatif El Mizeb Co-authored-by: Frédéric Le Menach Co-authored-by: Alexander Devitsky Co-authored-by: Alexander Devitsky * docs: fix duplicated menu item (#574) * docs: fix typo (#588) * build(dockerfile): binded MAGENTO_BASE_URL to the env variable (#598) * fix(build): changed image provider to ipx (#600) * docs: updated docs main information * build: enabled redis on demo * build(deployment): changed URL of Magento backend * docs: updated environments, roadmap and functional catalog * build: enabled cloudinary on demo * chore: add #techforukraine * Update README.md * Update README.md * chore: updated readme * Update README.md * chore: change to an existing discord channel * chore: release 1.0.0-rc.6 (#661) * fix(theme): refactor and fix store switcher (#383) - update nuxt.config.js to handle de translation - fix issue with flag icon #362 - refactor store switcher component - add store name next to the language icon flag - add translation info in docs Co-authored-by: Bartosz Herba * feat(middleware): added i18n route middleware (#408) * feat(middleware): added i18n route middleware closes #378 * refactor(middleware): i18n middleware: adjustements * fix(theme): out of stock product will no longer break cart (#404) * fix(theme): out of stock product will no longer break cart * fix(theme): remove cart load from layout * docs(theme): update tests for CartSidebar Co-authored-by: Bartosz Herba * Revert "refactor(theme): enables currency switcher on TopBar.vue (#421)" (#426) This reverts commit fbb1598ae7d78ebe3319e0d9d3c1a8dacc2de402. * refactor(i18n): changed i18n middleware to plugin and fix store switc… (#425) * refactor(i18n): changed i18n middleware to plugin and fix store switcher by url issues * refactor: cR fixes for i18n * refactor(theme): changed i18n midl. to plugin & fix store switcher by url (#431) * refactor(i18n): changed i18n middleware to plugin and fix store switcher by url issues * refactor: cR fixes for i18n * refactor(composables): added `ConfigState` to export API * chore: updated yarn.lock * refactor(theme): updated i18n middleware to fix URL redirect * docs: updated API-Extractor Co-authored-by: Marcin Kwiatkowski * fix: expired user token (#392) * fix(theme): disabled checkbox on login-modal * feat(theme): log customer out when customer-token is expired * feat: added token expired notification, clear cart and customer token when customer is not logged in * feat: logged out notification * refactor: removed console log * refactor: added improvements for token-expired plugin, added unit tests * refactor: changed log out notification message * test: fixed token-expired plugin test * test: added cookies mock to test-utils Co-authored-by: Marcin Kwiatkowski * refactor(theme): enable the currency switcher on `TopBar.vue` (#430) * refactor(theme): enables currency switcher on TopBar.vue * refactor(theme): add safe checking on Currency Selector * fix(theme): update localisation for all :link bindings (#450) Co-authored-by: Bartosz Herba * fix(theme): fix fcPlugin issuse when cookies were not set yet - added default currency fallback (#460) Co-authored-by: Bartosz Herba * fix(theme): add debounced update quantity action so it will be possible to insert multidigital value (#465) Co-authored-by: Bartosz Herba * Revert "perf(general): add performance improvement changes (#471)" (#472) This reverts commit 2f06a692a3244efd47df73e3ba6fcfc0da2d8fd0. * fix: loosing data when moving between steps on the checkout (#440) * fix(theme): prevent user to click on next steps in the checkout * feat(theme): added an asyncLocalStorage helper * fix(theme): added feature so the User Account is filled in * fix(theme): user can't go pages directly * feat(theme): a helpers for validating is the user has access to a specific step in the checkout * feat(theme): implemented the validation in the checkout steps * test: added tests for asyncLocalStorage and the steps helper * feat: added nuxt-img and possibility to use external image providers (#467) * chore(theme): added nuxt-image * feat(theme): added nuxt-img to category page * feat: added nuxt-img to category pages, added newe configs, and useImage compoosable * feat(theme): added nuxt-img to products carousel, added image enums * feat(theme): added nuxt-img for search results * feat(theme): added nuxt-img to my account wishlist * feat(theme): changed log to use nuxt-img * feat(theme): changed empty cart icon to use nuxt-img * feat(theme): added nuxt-img to instagram feed, updated image names * feat(theme): changed error image on search results to use nuxt-img * feat(theme): update store switcher to use nuxt-img instead of SfImage * feat(theme): added nuxt-img to wishlist sidebar * feat(theme): added nuxt-img to MobileStoreBanner * feat(theme): added nuxt-img to grouoped product selector * feat(theme): added nuxt-img to payment component * docs: added docs for external images providers * build(cloud): updated vuestorefront cloud docker file and added new args * build: updated deploy gh action to add image env vatiables * docs(configuration): updated docs for image providers * build: added missed buildargs * build: fixed dockerfile * build: fixed typo in docker file * build: updated config * test: add unit tests for the useImage composable * refactor: m2-69. ssr optimization for default layout (#477) * Test performance improvement commit * chore(deployment): changed deployment config to allow A-B testing on stage * refactor: changed default layout hydration Co-authored-by: Bartosz Herba Co-authored-by: Marcin Kwiatkowski * fix: incorrect shipping method price displayed in order summary (#496) * fix(composables): re-calculate cart when changing shipping-method * fix(theme): removed cache-id for retrieving shipping methods Cache id is removed because it retrieves the cached shipping methods. But when the address changes, it can be that the price of shipping methods need to be updated * chore: updated yarn.lock * fix(theme): redirect to home when accessing checkout if cart is empty * fix(theme): fixed hydration issue moved logic from SSR to onMounted to fix hydration difference * feat(recaptcha): add recaptcha (#401) * feat: add example file * feat: init recaptcha * feat(recaptcha): reverte some configs * feat(recaptcha): add v3 support * feat(recaptcha): add possibility to deactivate module and docs * feat(recaptcha): link reCaptcha doc * feat(recaptcha): link reCaptcha doc * feat(recaptcha): use fetch instead of axios * feat(recaptcha): add recaptcha to review form * feat(recaptcha): add recaptcha to reset password form * feat(recaptcha): add recaptcha to checkout form * feat(recaptcha): add recaptcha to forgot password and register forms * feat(recaptcha): code review * feat(recaptcha): refactoring * feat(recaptcha): add tests Co-authored-by: Abdellatif El Mizeb Co-authored-by: Frédéric Le Menach * chore: added sentry (#507) * chore: added Sentry * build: added SENTRY_DSN variable to envs * build(updated sentry config): updated sentry config * build(added config for sentry performance integrartion): added config for sentry * chore: updated sentry config * chore: restored deployment config * test(theme): fixed loginModal component tests * feat: added support for @vue-storefront/cache module (#482) * chore(theme): added nuxt-image * feat(theme): added nuxt-img to category page * feat: added nuxt-img to category pages, added newe configs, and useImage compoosable * feat(theme): added nuxt-img to products carousel, added image enums * feat(theme): added nuxt-img for search results * feat(theme): added nuxt-img to my account wishlist * feat(theme): changed log to use nuxt-img * feat(theme): changed empty cart icon to use nuxt-img * feat(theme): added nuxt-img to instagram feed, updated image names * feat(theme): changed error image on search results to use nuxt-img * feat(theme): update store switcher to use nuxt-img instead of SfImage * feat(theme): added nuxt-img to wishlist sidebar * feat(theme): added nuxt-img to MobileStoreBanner * feat(theme): added nuxt-img to grouoped product selector * feat(theme): added nuxt-img to payment component * docs: added docs for external images providers * build(cloud): updated vuestorefront cloud docker file and added new args * build: updated deploy gh action to add image env vatiables * docs(configuration): updated docs for image providers * build: added missed buildargs * build: fixed dockerfile * build: fixed typo in docker file * build: updated config * test: add unit tests for the useImage composable * chore(theme): added @vue-storefront-cache module * chore(theme): added config for @vue-storefront/cache to nuxt.config.js * feat(theme): added cache tags to home and category page * chore(theme): added redis-cache module, fixed cache tags for category page * feat(theme): added cache tags to product page, added body parser server middleware * build: added config for redis, modified deployment config for tests * build: removed unnecessary redis_password env variable * build: fixed redis env variables names * feat(theme): added cache tags for cms pages * chore(theme): removed console.logs, added comments to nuxt.config.js * build: removed redis-cache module from package.json and addet it to dockerfile * build: updated dockerfile * build(updzted docker file): updated dovkerfile * build: added REDIS__ENABLED env variable * docs: added docs for redis caching * build: reverted test changes in deploy action * fix(theme): removed typo from Category template n * build: fixed GH deploy action * build(theme): extracted styles to separate .css chunks (#516) Co-authored-by: Heitor Ramon Ribeiro * fix(theme, composable): expired user token issue (#519) - add proper handling of unathorized requests Co-authored-by: Bartosz Herba * chore(theme): removed redis, sentry and reCaptcha config from nuxt.config.js (#522) * chore: added possibility to extend nuxt.config during deployment (#524) * build: introduced nuxt.config.additional.js * build: updated dockerfile * build: updated dockerfile * build: fixed type * build: fixed path * build: updated base nuxt config path * chore: removed recaptcha module from package.json * build: removed test changes from deployment config, upated recaptcha docs * fix(theme): add html unescaping in HTMLContent component (#532) - add lodash.unescape to handle escaped html from magento Co-authored-by: Bartosz Herba * fix(theme): use translation function in all occurance of error[0] in theme (#529) Co-authored-by: Bartosz Herba * build: removed recaptcha from deployment config (#534) * fix: configurable product should work when only one attribute is used (#540) Co-authored-by: Alexander Devitsky * chore(theme): added missing translations (#553) * fix: the ability to close quick search using the keyboard (#552) Co-authored-by: Alexander Devitsky * fix(theme): fix add to wishlist button on catgory listing view for a mobile devices (#554) Co-authored-by: Bartosz Herba * chore: updated dependencies & configuration management (#538) * docs: updated docs to match missing elements * chore: added missing Redis password env * refactor(theme): added missing configuration envs Added missing configuration envs for Redis and Sentry * chore(eslint): updated dependencies - updated `eslint-plugin-unicorn` to `40.1.0` * chore(eslint-jest): updated dependencies - updated `eslint-plugin-jest` to `26.0.0` * chore(eslint-typescript): updated dependencies - updated `@typescript-eslint/eslint-plugin` to `5.10.1` - updated `@typescript-eslint/parser` to `5.10.1` * chore(eslint-vue): updated dependencies - updated `eslint-plugin-vue` to `8.4.0` * chore(api-client): updated dependencies - updated `@apollo/client` to `3.5.8` - updated `graphql` to `16.3.0` - updated `cross-fetch` to `3.1.5` - updated `dotenv` to `14.3.2` - updated `msw` to `0.36.7` - updated `typescript` to `4.5.5` * chore(theme): updated dependencies - updated `@sentry/tracing` to `6.17.3` - updated `@storefront-ui/vue` to `0.12.0` - updated `isomorphic-dompurify` to `0.18.0` - updated `@babel/core` to `7.16.12` - updated `cypress` to `9.3.1` - updated `dotenv` to `14.3.2` - updated `lint-staged` to `12.3.2` - updated `mocha` to `9.2.0` - updated `npm-check-updates` to `12.2.1` - updated `typescript` to `4.5.5` * chore: updated dependencies - updated `@babel/core` to `7.16.12` - updated `@babel/plugin-proposal-private-methods` to `7.16.11` - updated `@commitlint/cli` to `16.1.0` - updated `@graphql-codegen/cli` to `2.4.0` - updated `@types/node` to `17.0.13` - updated `@typescript-eslint/parser` to `5.10.1` - updated `eslint` to `8.8.0` - updated `lint-staged` to `12.3.2` - updated `npm-check-updates` to `12.2.1` - updated `rollup` to `2.66.1` - updated `vue-eslint-parser` to `8.2.0` * chore(eslint-typescript): updated dependencies - `@typescript-eslint/eslint-plugin` to `5.10.2` - `@typescript-eslint/parser` to `5.10.2` * chore(api-client): updated dependencies - `dotenv` to `15.0.0` - `msw` to `0.36.8` * chore(theme): rollback storefront-ui update * chore: updated dependencies - `@graphql-codegen/typescript-operations` to `2.2.3` - `@types/node` to `17.0.14` - `@typescript-eslint/parser` to `5.10.2` - `lint-staged` to `12.3.3` * chore: moved sentry package to Dockerfile * chore(theme): added dynamic nuxt.config.js generation * chore: removed REDIS__PASSWORD * chore: removed REDIS__PASSWORD from workflow * fix: fixed InstagramFeed component (#557) Co-authored-by: Alexander Devitsky * fix: changed header spacing (#556) Co-authored-by: Alexander Devitsky * build: add enterprise deployment (#561) * add enterprise deployment * change stage and dev * chore: allign main to develop after 1.0.0-rc.5.4 release (#560) * Fix useFacet(...) customQuery implemention (#413) * chore: release 1.0.0-rc.5.3 (#437) * chore: add gitflow actions (#379) * chore: added base gitflow actions * chore: added base gitflow actions * chore: fixed versioning process * docs: added roadmap to the docs (#380) closes #323 * fix(theme): refactor and fix store switcher (#383) - update nuxt.config.js to handle de translation - fix issue with flag icon #362 - refactor store switcher component - add store name next to the language icon flag - add translation info in docs Co-authored-by: Bartosz Herba * fix(theme): fix preselection sort order when query param is available (#385) Co-authored-by: Bartosz Herba * fix: broken cart after placing order as guest (#386) * fix(theme): passing the email instead of the user-object for creating a guest-cart * fix(composables): remove empty params in array, fails on Magento * test(theme): updated test for attaching guest email address to cart * Update packages/composables/src/composables/useShipping/index.ts Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Marcin Kwiatkowski Co-authored-by: Heitor Ramon Ribeiro * fix(theme): fix flashing category page (#387) Co-authored-by: Bartosz Herba * fix(theme): fix flashing category page (#388) Co-authored-by: Bartosz Herba * fix: default billing information does not appear on address (#382) * fix(theme): added badge for default-shipping and default-sbilling address * fix(composables): sort addresses, put default shipping and billing address to top * fix(theme): default billing and shipping text can be translated * chore(theme): added translations * fix(composables): removed console.log * chore: upgraded vsf core to 2.5.4 (#389) * chore: updated VSF core version to 2.5.4 * build: updated test GH action * fix(composables): update url resolver clearing patter to remove locale prefix (#390) Co-authored-by: Bartosz Herba * fix(theme): fix links to catch current locale (#391) * fix(theme): M2-25 fix links to catch current locale * Apply suggestions from code review Co-authored-by: Heitor Ramon Ribeiro * test(test-utils): added localePath global mock to the test-utils Co-authored-by: Bartosz Herba Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Marcin Kwiatkowski * style(theme): aligned titles in my account menu (#400) * feat(middleware): added i18n route middleware (#408) * feat(middleware): added i18n route middleware closes #378 * refactor(middleware): i18n middleware: adjustements * fix(theme): update localisation for all :link bindings (#416) Co-authored-by: Bartosz Herba * docs(theme): update custom queries documentation to be more friendly and explicit (#418) Co-authored-by: Bartosz Herba * chore(theme): removed html-validator (#414) * refactor: update dependencies (#420) * refactor(eslint): updated dependencies - Updated `eslint-plugin-unicorn` to `40.0.0` * refactor(eslint-import): updated dependencies - Updated `eslint-plugin-import` to `2.25.4` * refactor(eslint-jest): updated dependencies - Updated `eslint-plugin-jest` to `25.3.4` * refactor(eslint-typescript): updated dependencies - Updated `@typescript-eslint/eslint-plugin` to `5.9.1` - Updated `@typescript-eslint/parser` to `5.9.1` * refactor(eslint-vue): updated dependencies - Updated `eslint-plugin-vue` to `8.3.0` * refactor(api-client): updated dependencies - Updated `@apollo/client` to `3.5.7` - Updated `dotenv` to `12.0.1` * refactor(theme): updated dependencies - Updated `@babel/core` to `7.16.7` - Updated `babel-jest` to `27.4.6` - Updated `cypress` to `9.2.1` - Updated `dotenv` to `12.0.1` - Updated `jest` to `27.4.7` - Updated `jest-environment-jsdom` to `27.4.6` - Updated `lint-staged` to `12.1.7` - Updated `mocha` to `9.1.4` - Updated `npm-check-updates` to `12.1.0` - Updated `ts-jest` to `27.1.3` * refactor: updated dependencies - Updated `@babel/core` to `7.16.7` - Updated `@babel/plugin-proposal-private-methods` to `7.16.7` - Updated `@commitlint/cli` to `16.0.2` - Updated `@commitlint/config-conventional` to `16.0.0` - Updated `@commitlint/config-lerna-scopes` to `16.0.0` - Updated `@graphql-codegen/cli` to `2.3.1` - Updated `@graphql-codegen/typescript` to `2.4.2` - Updated `@graphql-codegen/typescript-operations` to `2.2.2` - Updated `@graphql-tools/utils` to `8.6.1` - Updated `@rollup/plugin-node-resolve` to `13.1.3` - Updated `@types/jest` to `27.4.0` - Updated `@types/node` to `17.0.8` - Updated `@typescript-eslint/parser` to `5.9.1` - Updated `@vue/eslint-config-typescript` to `10.0.0` - Updated `eslin` to `8.6.0` - Updated `jest` to `27.4.7` - Updated `lint-staged` to `12.1.7` - Updated `npm-check-updates` to `12.1.0` - Updated `rollup` to `2.64.0` - Updated `shx` to `0.3.4` - Updated `ts-jest` to `27.1.3``` * refactor(theme): enables currency switcher on TopBar.vue (#421) * fix(theme): fix 404 issue when redirecting to address details page (#424) Co-authored-by: Bartosz Herba * test: scaffold unit tests in composables and api client package (#419) * test(composables): added jest config * tests(composables): rewritten test + fix in productGetter * tests(composables): updated configuration in jest.config.js * tests(api-client): added tests for api-client + move general config to jest.base.config.js * tests(api-client): added jest configuration + simple test * chore: removed jest-environment-jsdom-sixteen * tests(theme): reverted back and removed jest.base.config.json * test(composables): reverted back and removed jest.base.config.json * test(api-client): reverted back and removed jest.base.config.json * chore: removed jest.base.config.json Co-authored-by: Marcin Kwiatkowski * fix(theme): fix disappearing category sidebar filter change (#423) Co-authored-by: Bartosz Herba * fix(theme): out of stock product will no longer break cart (#404) * fix(theme): out of stock product will no longer break cart * fix(theme): remove cart load from layout * docs(theme): update tests for CartSidebar Co-authored-by: Bartosz Herba * Revert "refactor(theme): enables currency switcher on TopBar.vue (#421)" (#426) This reverts commit fbb1598ae7d78ebe3319e0d9d3c1a8dacc2de402. * refactor(i18n): changed i18n middleware to plugin and fix store switc… (#425) * refactor(i18n): changed i18n middleware to plugin and fix store switcher by url issues * refactor: cR fixes for i18n * refactor(theme): changed i18n midl. to plugin & fix store switcher by url (#431) * refactor(i18n): changed i18n middleware to plugin and fix store switcher by url issues * refactor: cR fixes for i18n * refactor(composables): added `ConfigState` to export API * chore: updated yarn.lock * refactor(theme): updated i18n middleware to fix URL redirect * docs: updated API-Extractor Co-authored-by: Marcin Kwiatkowski * fix(api-client): update default mutation error handling for apollo client (#429) Co-authored-by: Bartosz Herba * fix: expired user token (#392) * fix(theme): disabled checkbox on login-modal * feat(theme): log customer out when customer-token is expired * feat: added token expired notification, clear cart and customer token when customer is not logged in * feat: logged out notification * refactor: removed console log * refactor: added improvements for token-expired plugin, added unit tests * refactor: changed log out notification message * test: fixed token-expired plugin test * test: added cookies mock to test-utils Co-authored-by: Marcin Kwiatkowski * refactor(theme): enable the currency switcher on `TopBar.vue` (#430) * refactor(theme): enables currency switcher on TopBar.vue * refactor(theme): add safe checking on Currency Selector * Fix useFacet(...) customQuery implemention (#413) * chore: updated version number to rc.5.3, updated yarn.lock, fixed cloud action * fix(theme): update localisation for all :link bindings (#449) Co-authored-by: Bartosz Herba Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Bartosz Herba * refactor(theme): add core pinia module * refactor(theme): refactored AppHeader to use the useAsync composable instead of onSSR (#570) * refactor(theme): refactor useConfig composable (#572) - mark composable useCnfig as deprecated - move composable to theme module - rework composable to get rid of core dependency and to utilize Pinia store Co-authored-by: Bartosz Herba * refactor(composables): moved the useExternalCheckout composable to theme (#571) * refactor: m2-154. refactor use store composable to use pinia store (#576) * temp use store * refactor(theme): refactor useStore composable - mark useStore as deprecated in composables - add useStore composable in a theme module BREAKING CHANGE: rework useStore composable Co-authored-by: Bartosz Herba * refactor: restored loadUser in app header * refactor: useWishlist (#577) * refactor: refactored context binding * refactor: refactored useWishlist, fixed removing from wishlist in my account * refactor: wishlist: cr changes * refactor(theme): M2 155. refactor useCurrency composable (#579) * refactor(theme): move stores to pinia store * refactor(theme): refactor useCurrency composable BREAKING CHANGES: - mark useCurrency as a deprecated in composables module - add refactored and lightweight useCurrency in theme with usage of pinia store management Co-authored-by: Bartosz Herba * refactor: useUser (#582) * refactor: added new theme composable: useUser * refactor(theme): changed useUser binding to the new composable * refactor(useuser): added types * docs: added depracated infor to useUser composable * refactor: removed console.log * refactor(theme): refactored UseForgotPassword (#583) * refactor: refactored useCategory composable (#585) * refactor: refactored useFacet composable (#587) * refactor(theme): refactor useCart composable (#584) Co-authored-by: Bartosz Herba * refactor: refactored useCategorySearch (#589) * refactor(theme): refactor useContent composable (#590) BREAKING CHANGE: - mark useContent as deprecated, implement useContent in theme package * fix(theme): fix page component data load * refactor: refactored usecontent to work with useasync composable * refactor: a/B testing: changed config loading from on moundted to useFetch (#593) * fix: fixed ssr issues (#594) * refactor: restored chunks * refactor: removed chunks * test: a/b: disabled config loading, and navigation * refactor(theme): refactor useUiState (#595) Co-authored-by: Bartosz Herba * - fix issues with dynamic modules import - fix issues with useUiState import * - update cart store and usage of useCart composable * - fix wishlist issues after merge * - mark tests as skipped for a further refactor * Update .github/workflows/deploy-vue-storefront-cloud.yml Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * Update .github/workflows/deploy-vue-storefront-cloud.yml * Update packages/composables/src/composables/useCart/index.ts * Update packages/composables/src/composables/useCart/index.ts * Update packages/composables/src/composables/useCategorySearch/index.ts * Update packages/theme/composables/useCart/commands/loadTotalQtyCommand.ts * Update packages/composables/src/composables/useCategorySearch/index.ts * Update packages/composables/src/composables/useConfig/index.ts * Update packages/composables/src/composables/useContent/index.ts * Update packages/composables/src/composables/useContent/index.ts * - update docblocks Co-authored-by: Marcin Kwiatkowski Co-authored-by: Bartosz Herba Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * fix(theme): fix broken cms page load (new composables break that part of app) (#720) Co-authored-by: Bartosz Herba * fix(theme): improve skeleton for the category sidebar (#716) * fix(theme): improve skeleton for the category sidebar * Update packages/theme/modules/catalog/pages/default.vue Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * Update packages/theme/modules/catalog/category/components/sidebar/CategorySidebar.vue Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> Co-authored-by: Bartosz Herba Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * refactor(composable): refactor useNewslettter composable (#719) Co-authored-by: Bartosz Herba * refactor(composables): refactor useProduct composable (#721) - move useProduct composable to the theme package - mark useProduct composable in composables package as deprecated Co-authored-by: Bartosz Herba * Remove duplicate environment variables (#724) The `.env.example` template for environment variables contained duplicates. This caused some minor confusion when values had been set only to the first instances, and the duplicates overwrote them. * feat(theme): support navigating to nested categories in mobile side menu (#709) * fix(theme): allow spec.ts files to be used Before this commit there were 2 issues: - Types from Cypress and Jest fighting for the `expect()` keyword in .spec.ts files but this happened only when running tests with Jest (ts-jest) - TypeScript didn't know where to find the @types/jest (when using tsserver), so I changed the typeRoots to point to the parent pkg This is only a half-solution as I think if I used some composite configs it'd be more manageable fix(theme): squash this fix(theme): squash this * feat(theme): add nested categories in mobile category menu refactor(theme): refactor find active category function to return whole object squash this feat(theme): pinia working wip feat(theme): reorganize folders for helpers feat(theme): reduce duplication in graphql query feat(theme): adjust desktop and mobile categories fix(theme): fix invalid import paths * feat(M2-292): optimize google fonts (#714) Co-authored-by: Alan Lisler * refactor(composables): refactor shipping related composables (#733) - move useShipping, useGetShippingMethods, useShippingProvider to the theme package - add types Co-authored-by: Bartosz Herba * fix: fixed 404 page issues and my-account redirects for non-logged users (#722) * fix: fixed 404 page and error handling * fix: fixed vuee-validate compilation errors * Update packages/theme/lang/de.js Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * Update packages/theme/layouts/error.vue Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * Update packages/theme/layouts/error.vue Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * refactor: fixed type errors in error layout Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * refactor: refactored usedRelatedProducts composable (#732) * refactor(relatedproducts): refactored usedRelatedProducts composable * Update packages/composables/src/factories/useRelatedProductsFactory.ts Co-authored-by: Bartosz Herba * Update packages/composables/src/composables/useRelatedProducts/index.ts Co-authored-by: Bartosz Herba Co-authored-by: Bartosz Herba * chore(M2-261): refactor getters from composables to theme (#730) * fix(homepage): fixed new products carousel ssr rendering issues (#736) * fix(composables): revert getters (#739) - copy getters back to the legacy composables for a backward compatibility package and mark all as deprecated Co-authored-by: Marcin Kwiatkowski * chore: update @vue-storefront packages to 2.5.6 (#740) * refactor(theme): copy composable helpers to theme (#734) * refactor(theme): move composable helpers to theme * refactor(theme): remove type dependency on monorepo api * refactor(theme): remove getVueContext * feat(api-client): improve performance of node HTTP calls (#737) * refactor(composable): refactor useReview (#729) * refactor(composable): refactor useReview squash this * refactor(theme): change to new refactored usereview composable * refactor(composable): deprecate useReview factory aswell * refactor(theme): move commands into separate files and change naming convention * refactor(theme): add spaces for readability * refactor(theme): add typings for commands * refactor(theme): fix useReview imports * fix(theme): fix TypeScript errors after adding context.d.ts $magento types * refactor(theme): adjust to lack of state refs in composable * refactor(composable): remove unused params also use local types, not magento-api ones * refactor(composables): add composable command types * refactor(composable): refactor useBilling (#744) * refactor(composables): refactor usePaymentProvider (#745) * refactor: refactored useAddresses (#743) * refactor(composables): refactor useMakeOrder composable - move composable to the Theme package - mark composable as deprecated * refactor(theme): refactored useUpsellProducts composable (#738) * refactor(theme): refactored useUpsellProducts composable, fixed product page ssr issues * refactor: cr fixes for upsell products * Update packages/theme/composables/useUpsellProducts/index.ts Co-authored-by: Bartosz Herba * Update packages/theme/composables/useUpsellProducts/index.ts Co-authored-by: Bartosz Herba * Update packages/theme/composables/useUpsellProducts/useUpsellProducts.d.ts Co-authored-by: Bartosz Herba * refactor: refactored useUrlResolver (#747) * refactor(theme): refactored HeaderLogo component to use the new useConfig composable (#750) * refactor: refactored useUserOrder composable (#748) * refactor(theme): refactored SearchBar component to use new composables (#749) * refactor(composable): refactor useUserShipping (#751) - move useUserShipping to the theme - mark useUserShipping in composable package as deprecated * refactor(theme): disable @vue-storefront/core $vsf context plugin (#741) see https://github.com/vuestorefront/vue-storefront/pull/6641/ the abillity to do this is new in @vue-storefront/core@2.5.6 (version bump made earlier today) suqsh this feat(theme): maybe remove later add semi-debuggable server-side source-maps checkpoint: homepage loads after using own context refactor(theme): checkpoint 2 - shim $vsf add sharedContextMap refactor(theme): move context shim to module because of loading precedence stop using useVSFContext copy integrationPlugin from core to theme $magento -> $vsf.magento (in components for now) refactor(theme): use theme getters over composable ones refactor(theme): convert code comments to task see https://vsf.atlassian.net/browse/M2-328 * chore: add concurrency control to GitHub actions (#754) * refactor: refactores types and composables to new ones from theme (#752) * refactor(composables): refactor useUserBilling (#756) - mark useUserBilling as deprecated in composables package - rework checkout to use useUserAddress theme composable instead * chore: auto-assign team members to pull requests * refactor: refactored useCOuntrySearch composable (#757) * refactor(theme): @vue-storefront types dependency refactoring (#758) - remove types dependency on package @vue-storefront/magento-api * fix(checkout): fix issue with blocked payment method step (#764) - selecting billing address will now unlock move to next step action * refactor: move magento nuxt integration plugin to theme (#755) * refactor(composable): add missing depercated annotations (#767) * chore: remove @vue-storefront/magento dependency from theme * fix(notification): remove notification cookie once the message is displayed (#775) * fix(myaccount): fix error handling for customer data and email update action (#777) * refactor: removed links from order's product (#778) * chore: fix pre-commit hook warning for {.vue} fixes M2-322 it's a .lintstagedrc warning - the {} is usually used to match many extensions in regex, while we just use a single term - ".vue" after this commit the warning is gone * fix: fixed adding/removing address funcionality (#776) * refactor(theme): update Storefront-UI to 0.13.0 (#781) * build: disabled nuxt modern mode (#762) * chore: add more GitHub environments for more detailed Jira deployments (#771) Partially addresses M2-341 chore: use reusable workflow in deployment .yml file fix interpolation spacing remove commented out previous pipeline don't use startsWith where not necessary add target_urls the enterprise env is unused for a business purpose for now so I'm using it as testing grounds can't have secrets for types both secrets and inputs are on the same level revert to using secrets add secrets keyword remove debug branch references * fix: remove prepare-commit-msg hook before this commit running git commit ran commitizen instead of showing the traditional git commit message prompt doing that was too much of an intrusion into the workflow so we've decided to keep cz, but make it optional to use instead of required * fix(theme): remove placeholder for a sorting mechanism in the category navbar (#782) - because we have default sorting value, additional placeholder is not required * fix(theme): billing address is cleared while returning to billing step on checkout (#783) - add billing address persistence by loading once the step is mounted - add selection of default address if none is selected * refactor(theme): refactored bundle and grouped products (#784) * chore: hide yarn-specific output in precommit hook (#788) lint-staged output is still shown, just hide the "yarn run v1.2.2" etc. * chore: run eslint only 1 time instead of 3 times (#787) M2-345 * refactor: disabled sfui core plugin (#785) * chore: lint-staged should be run only once (#789) M2-323 https://github.com/okonet/lint-staged/tree/d327873b1c0b6fbdeb6fd276e523043d51d6de37#how-to-use-lint-staged-in-a-multi-package-monorepo * fix: M2-298. fixed broken my account pages, removed onSSR hooks (#790) * refactor: replace @vue-storefront/core logger plugin M2-294 refactor(logger): add new rewritten logger refactor(logger): remove console.log move logger from plugins to helpers refactor(logger): replace core Logger imports with our own change path from plugins to helpers * chore: remove context shim (#791) M2-328 this was necessary when we still had the @vue-storefront/core composables in packages/theme disabling the @vue-storefront/core context plugin was not possible without the shim from this commit since we've already migrated all composables this is ok to remove * refactor: remove dependencies on @vue-storefront/core types M2-299 * fix: add missing magentoConfig property * fix: setCurrency can take customQuery * refactor: refactored i18n plugins (#794) * M2-295. Refactored i18n plugins * M2-300. Removed @vue-storefront/core dependency * fix: M2-222. fixed my account issues (#795) * fix: fixed my account buttons (#799) * ci: add commit sha as redis prefix before this commit you always needed to curl /invalidate-cache after PR manually after this commit this will hopefully be done by default M2-342 * fix(category): move products loading to onMount hook to avoid caching prices (#793) * refactor(prices): make prices non cachable - add usePrice composable in catalog module - rework category page to load prices onMounted lifecycle to avoid caching * refactor(home): make new product carousel non cachable - load products data onMounted to avoid price caching * fix(theme): mobile store banner - replace SfButton with SfLink so we can have images inside elements without breaking hydration * refactor(theme): change the way related and upsell products are loaded - upsell/related products on the PDP will be now loaded onMounted hook M2-306 * refactor: unify cookie retrieval (#797) * refactor: refactor cookie API M2-331 reduce code duplication refactor: remove unneeded type assertion refactor: refactor cookies to use the new cookie API refactor: checkpoint refactor: i18n plugin refactor: improve typings LocaleObject[] | string[] unions refactor: i18n plugin refactor: refactor middleware to typescript update cookies aswell refactor: don't return void refactor: use storefront ui colors for UiNotification refactor: more cookie refactors refactor: refactor i18n plugin refactor: fix unit tests post-refactor * refactor: add remove method add optional opts * refactor: add proper typing for nuxtplugin + integration * refactor: add remove method to state * refactor: use new remove methods where applicable * refactor: re-add getters and simplify i18n ternary * ci!: simplify env config (#813) * ci: simplify env config BREAKING: rename certain env vars MAGENTO_GRAPHQL -> MAGENTO_GRAPHQL_URL REDIS__* (HOST etc.) -> REDIS_* MAGENTO_EXTERNAL_CHECKOUT -> MAGENTO_EXTERNAL_CHECKOUT_ENABLED _ENABLED env vars will only enable things if you set their value to "true" (MY_ENV_VAR=true) remove convict and related format package because convict cannot be used in a browser - BREAKING: use .env in packages/theme instead of packages/theme/config/[env].json remove dotenv because nuxt already uses dotenv under the hood stop using GitHub repository secrets that are not actually secrets refactor: remove convict and dotenv dotenv is already used by nuxt under the hood remove leftover config import add sentry_dsn to dockerfile args * ci!: add VSF_ prefix to environment variables add VSF_ prefix where omitted * chore: add PWA icon removes the warning when running yarn dev:theme * chore: fix staging .yml crashing precommit hook there's no point in having 3 .lintstagedrc files that all do the same thing this commit also fixes the issue where comitting ANY file that is not in packages/**/* would crash the precommit hook and abort git commit this was happening (Configuration not found error) because there was no .lintstagedrc file in the repo root, so `npx lint-staged` did not know what to do * docs: M2-371. generate composables doc from jsdoc comments (#800) * fix: fix useContent jsdoc examples (#820) * fix: vsf has no redis on localhost * ci: invalidate cache after 1 day with key prefixes, this is so that redis does not contain thousands of super old keys for old deployments forever M2-342 * fix(checkout): accept one-digit house numbers (#824) M2-332 * chore: fix some "yarn install" peer dependency warnings (#818) * chore: add graphql peer dependency restore newer graphql version * chore: add vue as hard dependency this gives us direct control over the vue version rather than relying on whatever a subdependency installs * chore: fix eslint-config-typescript not in internal eslint pkg * chore: fix @nuxt/typescript-build conflict between 'latest' & '2.1.0' * refactor(filter): rework filters (#815) - move category filters to the separate component - add filters renderers and filter config resolver - move configuration from middleware to catalog module - partially add UT, add todo for missing tests * refactor: refactored useCategory for better dx experience (#829) * refactor: refactored useCategory for better dx experience * Update packages/theme/composables/useCategory/index.ts Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * refactor. refactored useCategory errors object to use load instead of search Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * feat(catalog): breadcrumbs (#819) * feat(catalog): breadcrumbs feat(catalog): breadcrumbs refactor: make CategoryTree use common logic refactor: add props to breadcrumbs refactor: destructure ancestors refactor: fix isCategoryTreeLoaded conditions refactor: move breadcrumbs outside categories refactor: use app.localePath instead of cookies chore: comments refactor: destructure context for app * fix: store cookie not set during first page load This was tested after clearing all the cookies in the browser * docs: add JSDoc comments to useAddress composable, its types and the related API methods (#821) * chore: change useAddress to a function declaration * feat: add useAddress jsdocs * docs: add jsdoc comments to useAddress * docs: add JSDoc comments to customer address API methods * docs: add JSDoc comments to the interfaces used by useAddresses * fix: rollback a miss replace * fix: fix useAddress methods' examples * docs: fix list formatting in useAddresses * docs: list useAddresses and the related API methods in documentation * docs: explain in useAddresses were the addresses can be used * docs: remove list of places that use useAddresses * docs: break line between section directive and content * docs: document useCategory composable, its types and related API methods using TSDocs (#828) * chore: transform categoryList API method into function declaration * docs: add TSDocs to categoryList API method and its GraphQL Query * chore: standardize useCategory and its types * docs: add TSDocs to useCategory and its types * docs: change how types are exported to fix TSDoc links * fix: fix categoryList item in the API Methods menu in the docs * fix: use Category type instead of any in useCategory Co-authored-by: Marcin Kwiatkowski * docs: update Environments document (#832) * refactor(filters): add information about selected filters in filters sidebar (#830) * refactor(filter): rework filters - move category filters to the separate component - add filters renderers and filter config resolver - move configuration from middleware to catalog module - partially add UT, add todo for missing tests * refactor(filters): add selected filters component M2-406 * refactor: update category page after merge develop * refactor: on filters/sorting/pagination change only products will be reloaded * docs: update Supported features document (#833) * fix: image provider options (#838) - fix env typo * feat!: make `error`, `loading`, and `result` properties readonly on `useCategorySearch` composable (#848) * feat!: rename UseCategorySearch type to UseCategorySearchInterface * chore: transform categorySearch to function declaration * docs: add docs for categorySearch API method * chore: convert useCategorySearch to function declaration * feat: export useCategorySeach types and improve its definitions * docs: add docs for useCategorySearch composable * feat!: make error, loading and result readonly in useCategorySearch * docs: improve useCategorySearch description * feat!: rename the errors interface of useCategory to UseCategorySearchErrors * feat: export useCategorySearch types * refactor: removed size guide (#840) * fix: fixed review submittion on PDP (#841) * fix: fixed useCategorySearch issues (#849) * refactor: move graphql client to context (#839) * refactor: remove cookie instead of empty set test: fix tests * refactor: move graphqlclient from useApi to context M2-354 this is so you can query graphql endpoints in plugins refactor: useApi to use client from context refactor: move dynamic headers to client instance I don't want to keep the append the headers in useApi because if someone wants to pull the graphql clients from the context - e.g. when requesting something in a plugin - they'll have to reimplement the cookie logic again this commit is a checkpoint commit - the '' fallback in graphqlClient isn't ideal because the header shouldn't be appended to the request if it's empty. Getters are limited int this way. I'll try something with Proxy refactor: proxy workaround for dynamic headers refactor: use proxies as workaround for dynamic headers refactor: add template types to useApi refactor: remove references to customApolloHttpLinkOptions fix: fix spread refactor: code review changes * feat!: define a type for billingDetails and make refs readonly in the useBilling composable (#844) * chore: transform useBilling to a function declaration * feat: add types and interfaces for useBilling * docs: add TSDoc comments to useBilling and its types * feat!: make useBilling error and loading refs readonly * feat!: define an interface for billingDetails in useBilling save method * docs: remove the "remarks" section in useBilling * docs: list useBilling in docs' composables menu * docs: remove placement in loading ref * docs: fix useBilling load params arg that shouldn't be require * feat: add more support for cloudinary images (#850) - add nuxt-img support on cart and product page - fix images proportions in all places where nuxt-img is used * fix: tags resolving on pdp * feat!: make `loading` and `error` properties readonly in the `useUserOrder` composable (#845) * feat!: make `loading` and `error` properties readonly in the `useUserOrder` composable * docs: add JSDoc to the `customerOrders` API handler * chore: pinia `this.` shouldn't be `any` M2-496 https://github.com/vuejs/pinia/issues/981 fix: ts errors because of now enabled noImplicitAny: true * chore: display types for pinia's nuxt context plugin M2-496 `this.$nuxt` is only valid when using tsserver (TypeSCript language server), but not with Volar. Volar is for Vue 3 by default while for Vue 2 some extra config is needed, so that's probably why * refactor: pull out api client from pinia's nuxt context M2-496 * feat!: make `loading` and `error` properties readonly in the `useCart` composable (#827) * refactor: change useCart declaration from const to function * refactor: addConfigurableProductstoCart docs and function notation - add JSDoc - refactor to use function instead of arrow function * refactor: addConfigurableProducts to cart JSDoc and function notation - add JSDoc - refactor from arrow function to function notation * refactor: addProductsToCart JSDoc and function notation - add JSDoc comments - refactor from arrow function to function notation * refactor: addVirtualProductsToCart JSDoc and function notation - add JSDoc comments - refactor from arrow function to function notation * refactor: applyCouponToCart JSDoc and notation - add JSDoc comment - refactor from arrow function to function notation * refactor: cart JSDoc and notation - add JSDoc comment - refactor from arrow function to function notation * refactor: customerCart JSDoc and notation - add JSDoc comment - refactor from arrow function to function notation * refactor: removeCouponFromCart JSDoc and notation - add JSDoc comment - refactor from arrow function to function notation * refactor: removeItemFromCart JSDoc and notation - add JSDoc comment - refactor from arrow function to function notation * refactor: updateCartItems JSDoc and notation - add JSDoc comment - refactor from arrow function to function notatio * feat: add link to useCart documentation * docs: add documentation for useCart composable * docs: add documentation for UseCartInterface#load * docs: add documentation for useCart interfaces * feat!: make UseCartErrors properties nullable BREAKING CHANGE: all properties of the UseCartErrors interface are converted to a union with null. The new type is `Error | null` for all properties * docs: add UseCartInterface's loadTotalQty JSDoc * docs: add UseCartInterface's addItem JSDoc * docs: simplify `useCart` JSDoc * refactor: cleanup useCart types and JSDoc * docs: simplify `useCart` composable docs * docs: update useCart JSDoc * refactor: replace imports with `import type` Co-authored-by: Marcin Kwiatkowski * docs: add API methods to sidebar Co-authored-by: Marcin Kwiatkowski * chore: removed cache-control settings from product and category page (#836) * feat!: make `loading` and `error` properties readonly in the `useWishlist` composable (#843) * feat!: make `loading` property readonly in the `useConfig` composable (#846) * refactor!: rename UseConfig to UseConfigInterface * refactor: make UseConfigInterface a typescript interface * feat!: make loading `useConfig#loading` readonly * docs: add useConfig composable JSDoc * docs: add storeConfig API JSDoc Co-authored-by: Marcin Kwiatkowski * feat!: make `error` and `loading` properties readonly on `useCountrySearch` composable (#847) * feat: create `UseCountrySearchInterface` * feat!: readonly properties on useCountrySearch BREAKING CHANGE: `loading` and `error` properties from the `UseCountrySearchInterface` are now readonly * docs: add `useCountrySearch` JSDoc * docs: add country and countries API JSDoc Co-authored-by: Marcin Kwiatkowski * feat!: make `loading` and `error` readonly in useExternalCheckout composable (#856) * docs: add useExternalCheckout JSDoc * feat!: make `loading` and `error` readonly BREAKING CHANGE: useExternalCheckout `loading` and `error` properties are now readonly Co-authored-by: Marcin Kwiatkowski * refactor: refactored useCurrency `load` and `change` methods (#857) * refactor: removed unnecessary loading changes from useCurrency.change method * refactor: updated useCurrency.load method to use correct customQuery params * Update packages/theme/composables/useCurrency/index.ts Co-authored-by: Vitor L Cavalcanti * Update packages/theme/composables/useCurrency/index.ts Co-authored-by: Vitor L Cavalcanti Co-authored-by: Vitor L Cavalcanti * feat!: make `useForgotPassword` properties readonly (#860) * docs: add JSDoc to API client's `resetPassword` * docs: add JSDoc to `requestPasswordResetEmail` * docs: add `useForgotPassword` JSDoc * feat!: make `useForgotPassword` properties readonly BREAKING CHANGE: `error`, `loading` and `result` properties are now readonly on the `UseForgotPasswordInterface` type returned by `useForgotPassword` * refactor: remove category getters call from app header (#853) * refactor: remove category getters call from app header M2-415 * refactor: remove category getters call from app header - apply suggestions from code review Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * feat!: make `error` and `loading` properties readonly on `useCurrency` composable (#864) * chore: convert useCurrency to function declaration * feat!: rename UseCurrency interface to UseCurrencyInterface * feat: define types for useCurrency methods' params * feat: named export useCurrency and its types * docs: add docs for useCurrency composable * docs: add docs for currency API Method * chore: convert currency API method to function declaration * chore: rollback a type change in load method's params * feat!: make error and loading readonly in useCurrency * fix: remove unused cacheControl in category and product pages * docs: improve TSDocs descriptions for useCurrency types' properties * refactor: search results (#867) - remove category results from search results M2-418 * chore: include e2e tsconfig for ts-eslint (#869) M2-237 * refactor: store config query (#862) * refactor: store config query - move loading of the store config to the plugin - docs: add store config usage docs - remove usage of storeGetters and storeConfigGetters M2-414 * Apply suggestions from code review Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> * perf!: load whole user object only when necessary (#859) * perf!: load full user data only when necessary login no longer loads the customer store register no longer loads the customer store * fix: myaccount crash when wishlist empty * perf: run speedcurve tests after deployment * fix: fix wrong ref path and use speedcurve action 1.2.2 * ci: github tokens don't launch deployment_status events I wanted to create a workflow that runs after a deployment is reported as successful through the chrnorm/deployment-action But turns out that—if you use the default github.token—workflows can't trigger other workflows. The token in the secret is *my* personal access token with *just* the repo_deployment scope (I don't know if it'll work yet) See https://github.com/chrnorm/deployment-action/issues/7 * ci: fix speedcurve workflow condition false negative see https://github.com/vuestorefront/magento2/actions/runs/2188091619 - this shouldn't happen i looked through the events sent by github's webhooks and indeed the path should be deployment, not deployment_status * ci: fix empty speedcurve note * feat!: make `error` and `loading` properties readonly on `useUserAddress` composable (M2-401) (#885) * feat!: make `error` and `loading` properties readonly in the `useGetShippingMethods` composable (#874) * docs: add getAvailableCustomerShippingMethods docs * docs: add `useGetShippingMethods` composable JSDoc * feat!: make `useGetShippingMethods` properties readonly BREAKING CHANGE: `error` and `loading` properties from `useGetShippingMethods` composable are made readonly Co-authored-by: Marcin Kwiatkowski * feat!: make `error` and `loading` properties readonly in `useGuestUser` composable (#875) * docs: add `setGuestEmailOnCart` JSDoc * docs: add JSDoc to `useGuestUser` composable * feat!: make properties readonly on `useGuestUser` BREAKING CHANGE: make `error` and `loading` properties of `useGuestUser` composable readonly Co-authored-by: Marcin Kwiatkowski * refactor: remove category getters (#886) M2-445 * docs: add `useImage` composable JSDoc (#876) Co-authored-by: Marcin Kwiatkowski * feat!: make `error` and `loading` properties readonly on `useFacet` composable (#877) * chore: rename FacetSearchResult generic type param * feat!: rename UseFacet interface to UseFacetInterface * feat!: make error, result and loading properties readonly on useFacet * feat: use type inference and remove unused object on useFacet * feat!: make result mutable again on useFacet * feat!: rename FacetSearchResult to UseFacetSearchResult * feat: export useFacet types and SearchData * chore: fix formatting issues on useFacet * docs: add TSDocs for useFacet and its types * docs: add docs to products API method * chore: convert useFacet and its module functions to function declarations * docs: list useFacet and products API method in docs menu * docs: fix copypaste in useFacet description Co-authored-by: Marcin Kwiatkowski * ci: improve speedcurve note readability if you go to https://app.speedcurve.com/vsf/favorite/?cs=md&d=31&db=856943&dc=2&de=1&df=%7B%7D&ds=1 you'll see that the notes for each data point on the graph are very long and obscure the actual graphs this commit was made to resolve that readability problem I removed the gh actions link (links in speedcurve notes aren't clickable) and shortened the github sha, as the default one is way too long * feat!: make `error` and `loading` properties readonly on `useUser` composable (#887) * feat!: make `error` and `loading` properties readonly on `useUser` composable (M2-400) * chore: fix build * feat!: make `error` and `loading` properties readonly on `useUpsellProducts` composable (#894) * refactor: make everything in catalog module use TypeScript (#872) * chore: force lang="ts" in vue script blocks * refactor: add lang="ts" to leftover catalog components * chore: eslint errors chore: fix eslint error chore: eslint; don't destructure props (reactivity loss) * chore: move spec file to .ts also some eslint chore: move spec file to .ts chore: move .spec file to ts chore: move spec file to js + eslint * chore: move catalog index file to .ts chore: type catalog module root * refactor: remove any from buildCategoryTree refactor: improve category store typing * refactor: add prop types to CategoryNavbar.vue * chore: remove unnecessary component names * refactor: typedef any params * refactor: move desktop category filters from SfSidebar to the main layout column (#884) refactor: change removable filters behavior - removable filters will be now updated only on the explict filter selection action - actions are now sticky so it will be easier to apply filters refactor: fix CR issues M2-425 * feat!: make `error` and `loading` properties readonly on `useMakeOrder` composable (#878) * fix: add context type to placeOrderCommand and fix it * chore: convert useMakeOrder to function declaration * chore: remove unused gql import in placeOrder API method * chore: convert placeOrder to function declaration * docs: write docs for placeOrder API method * feat: add UseMakeOrderInterface and export it with the composable * feat!: make error and loading properties readonly on useMakeOrder * docs: add docs for useMakeOrder and its types * chore: receive context.app as arg in useMakeOrder command * fix: rollback useMakeOrder command argument to context Co-authored-by: Marcin Kwiatkowski * feat: show category title below breadcrumbs (#892) M2-427 * refactor: helpers in catalog module - get rid of buildCategoryTree helper and CategoryTreeInterface - split helpers into meaningfull files - add UT for all helpers M2-444 * feat!: make `error` and `loading` properties readonly on `usePaymentProvider` composable (#881) * feat!: rename SetPaymentMethodOnCartInputs to PaymentMethodParams and simplify it * chore: move PaymentMethodParams to its own module * feat: define types for usePaymentProvider composable * fix: usePaymentProvider commands should use context.app and return an array * feat!: make error and loading properties readonly on usePaymentProvider * chore: convert usePaymentProvider to function declaration * docs: write docs for usePaymentProvider * docs: write docs for getAvailablePaymentMethods * chore: convert getAvailablePaymentMethods to function declaration * docs: write docs for setPaymentMethodOnCart * chore: convert setPaymentMethodOnCart to function declaration * docs: fix typo on usePaymentProvider docs * chore: use 'import type' in getAvailablePaymentMethods Co-authored-by: Bartosz Herba * chore: use 'import type' in setPaymentMethodOnCart Co-authored-by: Bartosz Herba * fix: use context.app instead of context in usePaymentProvider commands * fix: rollback usePaymentProvider commands arguments to context Co-authored-by: Bartosz Herba * feat!: make `error` and `loading` properties readonly on `useNewsletter` composable (#879) * feat!: rename UseNewsletter to UseNewsletterInterface * fix: fix error and loading types in useNewsletter * feat!: make error and loading properties readonly on useNewsletter * feat: add UseNewsletterUpdateSubscriptionParams type * chore: convert useNewsletter to function declaration * docs: write docs for useNewsletter * feat: export useNewsletter and its types in ~/composables * feat: use a real enum in SubscriptionStatusesEnum * chore: convert subscribeEmailToNewsletter to function declaration * docs: write docs for subscribeEmailToNewsletter * feat: remove repeated SubscriptionStatusesEnum * chore: use 'import type' on subscribeEmailToNewsletter Co-authored-by: Bartosz Herba * feat: define types for updateSubscriptionCommand * fix: rollback useNewsletter command argument to context Co-authored-by: Bartosz Herba Co-authored-by: Marcin Kwiatkowski * docs: `useUpsellProducts` composable (M2-398) (#902) * docs: `useUiNotification` composable (M2-397) (#904) * feat!: make `error` and `loading` properties readonly on `useStore` composble (#905) * feat!: make `error` and `loading` properties readonly on `useStore` composable * docs: add description to the api Co-authored-by: Marcin Kwiatkowski * fix: password reset issue (#909) - update button type to properly trigger form submit action M2-499 * docs: remove API methods from sidebar (#919) * feat!: make `error` and `loading` properties readonly on `useReview` composable (M2-392) (#906) Co-authored-by: Marcin Kwiatkowski * fix: wishlist sidebar (#918) - fix issue with refreshig sidebar wishlist - fix issue with wishlist sidebar transition - fix issue with cart sidebar transition M2-539 * feat!: refactor `useProduct` composable `error` and make its refs readonly (#889) * feat: define types and use context.app on useProduct commands * feat: define types for useProduct * feat!: remove GetProductSearchParams repeated declaration on useProduct * feat!: make error and loading properties readonly on useProduct * chore: convert useProduct to function declaration * docs: write docs for useProduct * feat!: set useProduct's method names as its error properties * docs: write docs for productDetail API method * fix: import GetProductSearchParams from ~/composables/types * fix: rollback useProduct commands argument to context * fix: fixed build issues Co-authored-by: Marcin Kwiatkowski * feat: Home Page - Changed products carousel to products section (#914) Co-authored-by: Alexander Devitsky * build: fixed build errors and warnings (#920) * feat!: make `error` and `loading` properties readonly on `useRelatedProducts` composable (#916) * chore: convert useRelatedProducts to function * feat: create UseRelatedProductsSearchParams type * feat!: rename RelatedProducts to RelatedProduct for useRelatedProducts * feat: export useRelatedProducts types in '~/composables' * docs: write docs for useRelatedProducts * docs: write docs for relatedProducts * chore: convert relatedProduct to function declaration * feat!: make error and loading properties readonly on useRelatedProducts * feat!: rename UseRelatedProductsError to UseRelatedProductsErrors * feat!: make `error` and `loading` properties readonly on `useShipping` composable (#921) * feat!: refactor useShipping types * feat!: make error and loading properties readonly on useShipping * docs: write useShipping docs * docs: write TSDocs for setShippingAddressesOnCart * docs: fix typo on resetPassword TSDocs * chore: convert setShippingAddressesOnCart to function declaration * feat: export useShipping types on ~/composables * feat!: make `error` and `loading` properties readonly on `useShippingProvider` composable (#922) * feat!: make error and loading readonly on useShippingProvider * feat: add UseShippingProviderSaveParams type * feat!: remove unused types from useShippingProvider * feat: add UseShippingProviderLoadParams type * feat: export useShippingProvider types on ~/composables * feat: define types for useShippingProvider command * docs: write the docs for useShippingProvider composable * docs: write docs for setShippingMethodsOnCart * chore: convert setShippingMethodsOnCart to function declaration * chore: use 'import type' statements Co-authored-by: Marcin Kwiatkowski * feat: define types and write docs for `useUiHelpers` composable (#923) * chore: convert top-level arrows to function declarations on useUiHelpers * feat: define types for reduceFilters * docs: write docs for useUiHelpers params interfaces and group them * feat: define UseUiHelpersInterface type and export it * docs: write the docs for useUiHelpers composable * feat: export useUiHelpers as named too * fix: replace broken params type in useUiHelpers * docs: fix broken reference in changeSearchTerm method * feat!: standardize `useMagentoConfiguration` composable (#924) * feat!: move useMagentoConfiguration to its own folder * feat!: refactor useMagentoConfiguration types * docs: write docs for useMagentoConfiguration * chore: convert useMagentoConfiguration to function declaration and format * feat: export useMagentoConfiguration and its types from ~/composables * docs: fix copypasted description * feat!: standardize `useUrlResolver` composable and make its properties readonly (#925) * feat!: move useUrlResolver to its own folder * feat: define types for useUrlResolver composable * feat!: make error and loading properties readonly on useUrlResolver * chore: convert useUrlResolver to function declaration * docs: write docs for urlResolver API method * docs: write the docs for useUrlResolver * feat: export useUrlResolver and its types from ~/composables * chore: convert urlResolver to function declaration and format it * docs: fix order of useUrlResolver in the composables menu * refactor: components for product list/grid M2-447 refactor: split product list and grid components refactor: move common props to composition function fix: paths fix: don't show empty when isShowProducts = false fix: don't set width on skeletons fix: wishlist icons appearing when not supposed to fix: can't add to cart in grid view refactor: squash this * test: add global vue/nuxt mocks for unit tests * feat: Homepage - Lazy load offscreen components (#915) Co-authored-by: Alexander Devitsky * fix: make color swatch visible on mobile (#926) M2-456 * fix: product wrong swipe icon direction (#927) M2-513 * feat: homepage - changed slider to hero section (#928) Co-authored-by: Alexander Devitsky * feat: Added preconnect link to site head for cloudinary (#929) Co-authored-by: Alexander Devitsky * fix: product tab click should scroll to tab content (#931) M2-514 before this commit, the behavior would scroll in a way that'd make the tab's contents be cut off in the middle, rather than shown fully I suspect this was happening because the process is like this: 1. tabs container has description open (default state) 2. click another tab (eg. "Read reviews" tab) 3. the tab container's DOM size did not update yet, but scrollIntoView({ block: "end" }) is called 4. the tab opens, but the view is scrolled to the end of the OLD size of the tab block (when reviews was open) You could probably do some Vue.$nextTick magic here but it's easier to just scroll to top * fix: various categoryTree bugs (#932) * refactor: improve findActiveCategory typedefs * fix: useTraverseCategory uses wrong findBy property M2-552 * fix: looking for "gear/bags" shouldn't match "gear" M2-552 * fix: mobile cat sidebar hide menu items that Magento wants hidden * feat: header categories (#903) * feat: header categories - add multilevel categories navigation - add unit tests for new components - upgrade @testing-library/user-event @13.5 -> @14.1.1 M2-424 * refactor: fix CR issues * fix: prevent content jump when variant is selected on PDP M2-365 * fix: resolve CR issues * feat: write docs and export useApi and its type from ~/composables (#930) * refactor: move products related code to the module spaces * refactor: customer module (#937) * refactor: move remaining composables to the category module M2-555 * refactor: use localeroute instead of string path (#940) * test: CategoryEmptyResults component (#934) * refactor: create wishlist module M2-507 * feat: add skeleton loaders in category navbar M2-450 * chore: release 1.0.0-rc.7 * docs: update vuepress and fix error during a build (#954) * chore: fixed conflicts in getters/types * docs: fixed docs issues * docs: added migration guide for rc.7 * docs: removed depracated composables guides * build: added api extraction to docs build command Co-authored-by: Bartosz Herba Co-authored-by: Bartosz Herba Co-authored-by: Alexander Devitsky Co-authored-by: Alexander Devitsky Co-authored-by: Marcin Kwiatkowski Co-authored-by: Kevin Gorjan Co-authored-by: Diego Alba Co-authored-by: Filip Sobol Co-authored-by: Artur Tagisow Co-authored-by: Georgiy Slobodenyuk Co-authored-by: Filip Sobol Co-authored-by: Aliaaaam <88658555+Aliaaaam@users.noreply.github.com> Co-authored-by: Heitor Ramon Ribeiro Co-authored-by: Diego Alba <72459310+Diegoalbag@users.noreply.github.com> Co-authored-by: Abdellatif EL MIZEB Co-authored-by: Abdellatif El Mizeb Co-authored-by: Frédéric Le Menach Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Andrzej Pawcenis Co-authored-by: GitHub actions Co-authored-by: Aapo Kiiso Co-authored-by: Alan Lisler Co-authored-by: Alan Lisler Co-authored-by: Arnoult Co-authored-by: Vitor L Cavalcanti Co-authored-by: Roz <3948961+roziscoding@users.noreply.github.com> --- .eslintrc.js | 15 +- .github/CODEOWNERS | 1 + .github/workflows/assing-pr-to-author.yml | 4 + .github/workflows/conventional-pr-name.yml | 4 + .../workflows/deploy-vue-storefront-cloud.yml | 184 +- .github/workflows/deployment-template.yml | 69 + .github/workflows/speedcurve.yml | 25 + .github/workflows/test.yml | 4 + .gitignore | 1 + .husky/pre-commit | 2 +- .husky/prepare-commit-msg | 4 - .lintstagedrc | 3 + .vuestorefrontcloud/docker/Dockerfile | 104 +- .../docker/nuxt.config.additional.js | 2 +- CONTRIBUTING.md | 2 +- README.md | 47 +- api-extractor.base.json | 2 +- docs/.gitignore | 1 + docs/.vuepress/config.js | 127 +- docs/api-reference/index.md | 13 - .../magento-api.addbundleproductstocart.md | 11 - ...gento-api.addconfigurableproductstocart.md | 11 - ...gento-api.adddownloadableproductstocart.md | 11 - .../magento-api.addproductstocart.md | 11 - .../magento-api.addproducttowishlist.md | 11 - .../magento-api.addsimpleproductstocart.md | 11 - .../magento-api.addvirtualproductstocart.md | 11 - .../magento-api.applycoupontocart.md | 11 - .../magento-api.availablestores.md | 11 - docs/api-reference/magento-api.cart.md | 11 - .../api-reference/magento-api.categorylist.md | 11 - .../magento-api.categorysearch.md | 11 - .../magento-api.changecustomerpassword.md | 14 - docs/api-reference/magento-api.cmsblocks.md | 11 - docs/api-reference/magento-api.cmspage.md | 11 - docs/api-reference/magento-api.countries.md | 11 - docs/api-reference/magento-api.country.md | 11 - .../magento-api.createcustomer.md | 11 - .../magento-api.createcustomeraddress.md | 11 - .../magento-api.createemptycart.md | 11 - .../magento-api.createproductreview.md | 11 - docs/api-reference/magento-api.currency.md | 11 - docs/api-reference/magento-api.customer.md | 11 - .../api-reference/magento-api.customercart.md | 11 - .../magento-api.customerorders.md | 11 - .../magento-api.customerproductreview.md | 11 - .../magento-api.custommutation.md | 15 - docs/api-reference/magento-api.customquery.md | 15 - .../magento-api.deletecustomeraddress.md | 11 - .../magento-api.generatecustomertoken.md | 15 - ...-api.getavailablecustomerpaymentmethods.md | 13 - ...api.getavailablecustomershippingmethods.md | 11 - .../magento-api.getavailablepaymentmethods.md | 13 - ...magento-api.getavailableshippingmethods.md | 13 - .../magento-api.getcustomeraddresses.md | 11 - docs/api-reference/magento-api.md | 81 - docs/api-reference/magento-api.mergecarts.md | 14 - docs/api-reference/magento-api.placeorder.md | 11 - .../magento-api.productdetail.md | 11 - .../magento-api.productreview.md | 11 - ...agento-api.productreviewratingsmetadata.md | 11 - docs/api-reference/magento-api.products.md | 11 - .../magento-api.relatedproduct.md | 11 - .../magento-api.removecouponfromcart.md | 11 - .../magento-api.removeitemfromcart.md | 11 - .../magento-api.removeproductsfromwishlist.md | 11 - .../magento-api.requestpasswordresetemail.md | 11 - .../magento-api.resetpassword.md | 11 - .../magento-api.revokecustomertoken.md | 11 - .../magento-api.setbillingaddressoncart.md | 11 - .../magento-api.setguestemailoncart.md | 11 - .../magento-api.setpaymentmethodoncart.md | 11 - .../magento-api.setshippingaddressesoncart.md | 11 - .../magento-api.setshippingmethodsoncart.md | 11 - docs/api-reference/magento-api.storeconfig.md | 11 - .../magento-api.subscribeemailtonewsletter.md | 11 - .../magento-api.updatecartitems.md | 11 - .../magento-api.updatecustomer.md | 11 - .../magento-api.updatecustomeraddress.md | 14 - .../magento-api.updatecustomeremail.md | 11 - .../magento-api.upsellproduct.md | 11 - docs/api-reference/magento-api.urlresolver.md | 11 - docs/api-reference/magento-api.wishlist.md | 11 - docs/api-reference/magento.addressgetter.md | 11 - docs/api-reference/magento.cartgetters.md | 11 - docs/api-reference/magento.categorygetters.md | 11 - docs/api-reference/magento.checkoutgetters.md | 17 - .../magento.extendscopecontext.md | 11 - docs/api-reference/magento.facetgetters.md | 11 - .../magento.forgotpasswordgetters.md | 11 - docs/api-reference/magento.md | 66 - docs/api-reference/magento.ordergetters.md | 23 - docs/api-reference/magento.productgetters.md | 11 - docs/api-reference/magento.reviewgetters.md | 11 - .../magento.storeconfiggetters.md | 24 - docs/api-reference/magento.storegetters.md | 14 - docs/api-reference/magento.useaddresses.md | 11 - docs/api-reference/magento.usebilling.md | 11 - docs/api-reference/magento.usecart.md | 11 - docs/api-reference/magento.usecategory.md | 13 - .../magento.usecategorysearch.md | 11 - docs/api-reference/magento.useconfig.md | 11 - docs/api-reference/magento.usecontent.md | 11 - .../api-reference/magento.usecountrysearch.md | 11 - docs/api-reference/magento.usecurrency.md | 11 - .../magento.usecustommutation.md | 11 - docs/api-reference/magento.usecustomquery.md | 11 - .../magento.useexternalcheckout.md | 11 - docs/api-reference/magento.usefacet.md | 11 - .../magento.useforgotpassword.md | 11 - .../magento.usegetshippingmethods.md | 11 - docs/api-reference/magento.useguestuser.md | 14 - docs/api-reference/magento.usemakeorder.md | 11 - docs/api-reference/magento.usenewsletter.md | 11 - .../magento.usepaymentprovider.md | 11 - docs/api-reference/magento.useproduct.md | 11 - .../magento.useraddressesgetters.md | 11 - .../magento.userbillinggetters.md | 11 - .../magento.userelatedproducts.md | 11 - docs/api-reference/magento.usereview.md | 11 - docs/api-reference/magento.usergetters.md | 11 - .../magento.usershippinggetters.md | 11 - docs/api-reference/magento.useshipping.md | 11 - .../magento.useshippingprovider.md | 11 - docs/api-reference/magento.usestore.md | 11 - .../magento.useupsellproducts.md | 11 - docs/api-reference/magento.useurlresolver.md | 11 - docs/api-reference/magento.useuser.md | 15 - docs/api-reference/magento.useuserbilling.md | 11 - docs/api-reference/magento.useuserorder.md | 11 - docs/api-reference/magento.useusershipping.md | 11 - docs/api-reference/magento.usewishlist.md | 11 - docs/api-reference/magento.wishlistgetters.md | 11 - docs/api-reference/magento.wishlistproduct.md | 13 - docs/guide/api-client/reference.md | 13 + docs/guide/composables/use-addresses.md | 29 - docs/guide/composables/use-billing.md | 113 - docs/guide/composables/use-cart.md | 186 - docs/guide/composables/use-category-search.md | 63 - docs/guide/composables/use-category.md | 142 - docs/guide/composables/use-config.md | 209 - docs/guide/composables/use-content.md | 66 - docs/guide/composables/use-country-search.md | 77 - docs/guide/composables/use-custom-mutation.md | 84 - docs/guide/composables/use-custom-query.md | 87 - .../composables/use-external-checkout.md | 47 - docs/guide/composables/use-facet.md | 102 - docs/guide/composables/use-forgot-password.md | 27 - .../composables/use-get-shipping-methods.md | 90 - docs/guide/composables/use-guest-user.md | 69 - docs/guide/composables/use-make-oder.md | 103 - docs/guide/composables/use-menu-category.md | 50 - docs/guide/composables/use-newsletter.md | 21 - .../guide/composables/use-payment-provider.md | 80 - docs/guide/composables/use-product.md | 309 - .../guide/composables/use-related-products.md | 26 - docs/guide/composables/use-review.md | 14 - .../composables/use-shipping-provider.md | 45 - docs/guide/composables/use-shipping.md | 43 - docs/guide/composables/use-store.md | 52 - docs/guide/composables/use-upsell-products.md | 24 - docs/guide/composables/use-url-resolver.md | 58 - docs/guide/composables/use-user-billing.md | 106 - docs/guide/composables/use-user-order.md | 44 - docs/guide/composables/use-user-shipping.md | 56 - docs/guide/composables/use-user.md | 82 - docs/guide/composables/use-wishlist.md | 94 - docs/guide/configuration.md | 35 +- docs/guide/environments.md | 22 +- docs/guide/functional-catalog.md | 111 - docs/guide/override-queries.md | 20 +- docs/guide/ssr.md | 29 +- docs/guide/supported-features.md | 97 + docs/migration-guides/1.0.0-rc.7/index.md | 108 + docs/migration-guides/1.0.0-rc.7/rc.7-bic.md | 88 + docs/migration-guides/index.md | 3 + docs/package.json | 24 +- docs/typedoc.json | 9 - docs/yarn.lock | 690 +- internals/eslint-import/package.json | 2 +- internals/eslint-jest/package.json | 2 +- internals/eslint-typescript/package.json | 2 +- internals/eslint-vue/index.js | 3 + internals/eslint-vue/package.json | 3 +- internals/eslint-vue/rules/rules.js | 12 + internals/eslint/package.json | 2 +- package.json | 25 +- packages/api-client/.env.example | 2 +- packages/api-client/.lintstagedrc | 8 - packages/api-client/README.md | 16 +- packages/api-client/babel.config.js | 9 + packages/api-client/jest.config.js | 4 +- packages/api-client/package.json | 26 +- packages/api-client/possible-types.js | 2 +- packages/api-client/rollup.config.js | 48 - packages/api-client/src/api-extractor-data.ts | 8 +- .../addConfigurableProductsToCart.ts | 1 + .../addConfigurableProductsToCart/index.ts | 22 +- .../addDownloadableProductsToCart.ts | 1 + .../addDownloadableProductsToCart/index.ts | 18 +- .../addProductsToCart/addProductsToCart.ts | 1 + .../src/api/addProductsToCart/index.ts | 18 +- .../addVirtualProductsToCart.ts | 1 + .../src/api/addVirtualProductsToCart/index.ts | 18 +- .../applyCouponToCart/applyCouponToCart.ts | 1 + .../src/api/applyCouponToCart/index.ts | 18 +- .../src/api/availableStores/index.ts | 3 + packages/api-client/src/api/cart/cart.ts | 1 + packages/api-client/src/api/cart/index.ts | 18 +- .../src/api/categoryList/categoryList.ts | 1 + .../api-client/src/api/categoryList/index.ts | 29 +- .../src/api/categorySearch/categorySearch.ts | 1 + .../src/api/categorySearch/index.ts | 30 +- .../src/api/changeCustomerPassword/index.ts | 3 + .../api-client/src/api/cmsBlocks/index.ts | 13 +- packages/api-client/src/api/cmsPage/index.ts | 10 +- .../src/api/countries/countriesList.ts | 1 + .../api-client/src/api/countries/index.ts | 15 +- packages/api-client/src/api/country/index.ts | 12 +- .../src/api/createCustomer/index.ts | 3 + .../createCustomerAddress.ts | 1 + .../src/api/createCustomerAddress/index.ts | 17 +- .../src/api/createProductReview/index.ts | 3 + .../api-client/src/api/currency/currency.ts | 1 + packages/api-client/src/api/currency/index.ts | 29 +- packages/api-client/src/api/customer/index.ts | 3 + .../src/api/customerCart/customerCart.ts | 1 + .../api-client/src/api/customerCart/index.ts | 21 +- .../src/api/customerOrders/index.ts | 3 + .../src/api/customerProductReview/index.ts | 3 + .../deleteCustomerAddress.ts | 1 + .../src/api/deleteCustomerAddress/index.ts | 18 +- .../src/api/generateCustomerToken/index.ts | 3 + .../CustomerShippingMethods.ts | 1 + .../index.ts | 11 +- .../GuestAvailablePaymentMethods.ts | 1 + .../api/getAvailablePaymentMethods/index.ts | 31 +- .../getCustomerAddresses.ts | 1 + .../src/api/getCustomerAddresses/index.ts | 25 +- .../api-client/src/api/placeOrder/index.ts | 30 +- .../src/api/placeOrder/placeOrder.ts | 1 + .../api-client/src/api/productDetail/index.ts | 31 +- .../api/productDetail/productDetailsQuery.ts | 4 + .../api-client/src/api/productReview/index.ts | 3 + .../api/productReviewRatingsMetadata/index.ts | 3 + packages/api-client/src/api/products/index.ts | 33 +- .../src/api/products/productsList.ts | 4 + .../src/api/relatedProduct/index.ts | 28 +- .../src/api/relatedProduct/relatedProduct.ts | 4 + .../src/api/removeCouponFromCart/index.ts | 18 +- .../removeCouponFromCart.ts | 1 + .../src/api/removeItemFromCart/index.ts | 20 +- .../removeItemFromCart/removeItemFromCart.ts | 1 + .../api/requestPasswordResetEmail/index.ts | 18 +- .../requestPasswordResetEmail.ts | 1 + .../api-client/src/api/resetPassword/index.ts | 19 +- .../src/api/resetPassword/resetPassword.ts | 1 + .../src/api/revokeCustomerToken/index.ts | 3 + .../src/api/setGuestEmailOnCart/index.ts | 16 +- .../setGuestEmailOnCart.ts | 1 + .../src/api/setPaymentMethodOnCart/index.ts | 34 +- .../setPaymentMethodOnCart.ts | 1 + .../api/setShippingAddressesOnCart/index.ts | 36 +- .../setShippingAddressesOnCart.ts | 1 + .../src/api/setShippingMethodsOnCart/index.ts | 40 +- .../setShippingMethodsOnCart.ts | 1 + .../api-client/src/api/storeConfig/index.ts | 15 +- .../src/api/storeConfig/storeConfig.ts | 1 + .../api/subscribeEmailToNewsletter/index.ts | 33 +- .../subscribeEmailToNewsletter.ts | 1 + .../src/api/updateCartItems/index.ts | 20 +- .../api/updateCartItems/updateCartItems.ts | 1 + .../src/api/updateCustomer/index.ts | 3 + .../src/api/updateCustomerAddress/index.ts | 32 +- .../updateCustomerAddress.ts | 1 + .../api-client/src/api/upsellProduct/index.ts | 20 +- .../api-client/src/api/urlResolver/index.ts | 36 +- .../src/api/urlResolver/urlResolver.ts | 9 +- .../src/helpers/apiClient/defaultSettings.ts | 3 + .../src/helpers/magentoLink/graphQl.ts | 7 + packages/api-client/src/types/GraphQL.ts | 8 +- packages/api-client/src/types/setup.ts | 10 + packages/api-client/tsconfig.json | 22 +- packages/composables/.lintstagedrc | 8 - packages/composables/README.md | 16 +- packages/composables/babel.config.js | 9 + packages/composables/jest.config.js | 4 +- packages/composables/nuxt/plugin.js | 3 +- packages/composables/package.json | 22 +- packages/composables/rollup.config.js | 4 - .../src/composables/useAddresses/index.ts | 5 +- .../src/composables/useBilling/index.ts | 3 + .../src/composables/useCart/index.ts | 5 +- .../src/composables/useCategory/index.ts | 3 + .../composables/useCategorySearch/index.ts | 3 + .../src/composables/useConfig/index.ts | 5 +- .../src/composables/useContent/index.ts | 3 + .../src/composables/useCountrySearch/index.ts | 3 + .../src/composables/useCurrency/index.ts | 3 + .../composables/useCustomMutation/index.ts | 3 + .../src/composables/useCustomQuery/index.ts | 4 + .../composables/useExternalCheckout/index.ts | 3 + .../src/composables/useFacet/_utils.ts | 2 + .../src/composables/useFacet/index.ts | 6 + .../composables/useForgotPassword/index.ts | 3 + .../useGetShippingMethods/index.ts | 3 + .../src/composables/useGuestUser/index.ts | 3 + .../src/composables/useMakeOrder/index.ts | 3 + .../src/composables/useNewsletter/index.ts | 4 +- .../composables/usePaymentProvider/index.ts | 3 + .../src/composables/useProduct/index.ts | 3 + .../composables/useRelatedProducts/index.ts | 3 + .../src/composables/useReview/index.ts | 4 +- .../src/composables/useShipping/index.ts | 4 + .../composables/useShippingProvider/index.ts | 4 + .../src/composables/useStore/index.ts | 3 + .../composables/useUpsellProducts/index.ts | 3 + .../src/composables/useUrlResolver/index.ts | 3 + .../src/composables/useUser/index.ts | 10 +- .../src/composables/useUserBilling/index.ts | 3 + .../src/composables/useUserOrder/index.ts | 4 +- .../src/composables/useUserShipping/index.ts | 3 + .../src/composables/useWishlist/index.ts | 8 +- .../src/factories/useAddressesFactory.ts | 9 +- .../src/factories/useCartFactory.ts | 16 +- .../src/factories/useCategorySearchFactory.ts | 6 +- .../src/factories/useConfigFactory.ts | 9 +- .../src/factories/useContentFactory.ts | 5 +- .../src/factories/useCountrySearchFactory.ts | 9 +- .../src/factories/useCurrencyFactory.ts | 8 +- .../src/factories/useCustomQueryFactory.ts | 6 +- .../factories/useExternalCheckoutFactory.ts | 5 +- .../src/factories/useForgotPasswordFactory.ts | 3 + .../factories/useGetShippingMethodsFactory.ts | 5 +- .../src/factories/useGuestUserFactory.ts | 8 +- .../src/factories/useMutationQueryFactory.ts | 5 +- .../src/factories/useNewsletterFactory.ts | 5 +- .../factories/usePaymentProviderFactory.ts | 5 +- .../factories/useRelatedProductsFactory.ts | 10 +- .../src/factories/useReviewFactory.ts | 6 +- .../src/factories/useStoreFactory.ts | 6 +- .../src/factories/useUpsellProductsFactory.ts | 9 +- .../src/factories/useUrlResolverFactory.ts | 6 +- .../src/factories/useWishlistFactory.ts | 14 +- packages/composables/src/getVueContext.ts | 18 - packages/composables/src/getters/_utils.ts | 6 + .../composables/src/getters/addressGetter.ts | 3 + .../composables/src/getters/cartGetters.ts | 9 +- .../src/getters/categoryGetters.ts | 3 + .../src/getters/checkoutGetters.ts | 3 + .../composables/src/getters/facetGetters.ts | 3 + .../src/getters/forgotPasswordGetters.ts | 3 + packages/composables/src/getters/index.ts | 4 +- .../composables/src/getters/orderGetters.ts | 5 +- .../composables/src/getters/productGetters.ts | 3 + .../composables/src/getters/reviewGetters.ts | 4 +- .../src/getters/storeConfigGetters.ts | 3 + .../composables/src/getters/storeGetters.ts | 3 + .../src/getters/userAddressesGetters.ts | 3 + .../src/getters/userBillingGetters.ts | 3 + .../composables/src/getters/userGetters.ts | 4 +- .../src/getters/userShippingGetters.ts | 3 + .../src/getters/wishlistGetters.ts | 4 +- .../src/helpers/buildCategoryTree.ts | 4 +- .../src/helpers/compareWishlist.ts | 3 + .../src/helpers/findItemOnWishlist.ts | 3 + .../src/helpers/getContextProperty.ts | 3 - .../composables/src/helpers/htmlDecoder.ts | 3 + .../src/helpers/userAddressManipulator.ts | 3 + .../src/helpers/userDataGenerator.ts | 4 + packages/composables/src/index.ts | 10 +- packages/composables/src/types/composables.ts | 2 +- packages/composables/tsconfig.json | 26 +- packages/theme/.env.example | 56 +- packages/theme/.gitignore | 5 +- packages/theme/.lintstagedrc | 11 - packages/theme/components/AppFooter.vue | 2 +- packages/theme/components/AppHeader.vue | 89 +- .../theme/components/BottomNavigation.vue | 21 +- packages/theme/components/CartSidebar.vue | 73 +- .../Category/CategorySidebarMenu.vue | 198 - .../theme/components/Checkout/CartPreview.vue | 3 +- .../Checkout/UserBillingAddresses.vue | 40 +- .../Checkout/UserShippingAddresses.vue | 43 +- .../Checkout/VsfPaymentProvider.vue | 9 +- .../Checkout/VsfShippingProvider.vue | 53 +- packages/theme/components/ContentBlocks.vue | 13 +- packages/theme/components/CouponCode.vue | 3 +- .../CurrencySelector/CurrenciesModal.vue | 18 +- .../Header/Navigation/HeaderNavigation.vue | 137 + .../Navigation/HeaderNavigationItem.vue | 49 +- .../HeaderNavigationSubcategories.vue | 228 + .../__tests__/HeaderNavigation.spec.js | 92 + .../__tests__/HeaderNavigationItem.spec.js | 12 + .../HeaderNavigationSubcategories.spec.js | 54 + .../components/Header/SearchBar/SearchBar.vue | 44 +- .../Header/SearchBar/SearchResults.vue | 171 +- packages/theme/components/HeaderLogo.vue | 28 +- packages/theme/components/Hero.vue | 156 + packages/theme/components/InstagramFeed.vue | 57 +- packages/theme/components/LoginModal.vue | 13 +- .../theme/components/MobileMenuSidebar.vue | 78 - .../theme/components/MobileStoreBanner.vue | 66 +- packages/theme/components/NewProducts.vue | 179 + .../theme/components/ProductAddReviewForm.vue | 61 +- .../Products/BundleProductSelector.vue | 222 - .../theme/components/SkeletonLoader/index.vue | 98 + packages/theme/components/StoreSwitcher.vue | 35 +- .../components/StoreSwitcher/StoresModal.vue | 53 +- packages/theme/components/UpsellProducts.vue | 42 - .../theme/components/UserAddressDetails.vue | 33 +- .../__tests__/AddtoWishlist.spec.js | 8 +- .../components/__tests__/CartSidebar.spec.js | 15 +- .../components/__tests__/LoginModal.spec.js | 11 +- .../__tests__/ProductAddReviewForm.spec.js | 18 +- packages/theme/composables/context.ts | 13 + packages/theme/composables/index.ts | 52 +- packages/theme/composables/types.ts | 255 + packages/theme/composables/useApi/index.ts | 158 +- .../composables/useBilling/BillingDetails.ts | 17 + .../commands/saveBillingAddressCommand.ts | 38 + .../theme/composables/useBilling/index.ts | 96 + .../composables/useBilling/useBilling.ts | 45 + .../useCart/commands/addItemCommand.ts | 168 + .../useCart/commands/applyCouponCommand.ts | 28 + .../useCart/commands/clearCartCommand.ts | 7 + .../useCart/commands/loadCartCommand.ts | 84 + .../useCart/commands/loadTotalQtyCommand.ts | 17 + .../useCart/commands/removeCouponCommand.ts | 19 + .../useCart/commands/removeItemCommand.ts | 36 + .../useCart/commands/updateItemQtyCommand.ts | 36 + packages/theme/composables/useCart/index.ts | 263 + packages/theme/composables/useCart/useCart.ts | 112 + packages/theme/composables/useConfig/index.ts | 47 + .../theme/composables/useConfig/useConfig.ts | 20 + .../useContent/commands/loadBlocksCommand.ts | 13 + .../useContent/commands/loadContentCommand.ts | 15 + .../theme/composables/useContent/index.ts | 141 + .../composables/useContent/useContent.ts | 174 + .../composables/useCountrySearch/index.ts | 77 + .../useCountrySearch/useCountrySearch.ts | 35 + .../theme/composables/useCurrency/index.ts | 67 + .../composables/useCurrency/useCurrency.ts | 43 + .../composables/useExternalCheckout/index.ts | 59 + .../useExternalCheckout.ts | 14 + .../theme/composables/useFacet/SearchData.ts | 15 + packages/theme/composables/useFacet/_utils.ts | 68 + packages/theme/composables/useFacet/index.ts | 141 + .../theme/composables/useFacet/useFacet.ts | 49 + .../getCustomerShippingMethodsCommand.ts | 9 + .../getGuestShippingMethodsCommand.ts | 12 + .../useGetShippingMethods/index.ts | 56 + .../useGetShippingMethods.ts | 19 + packages/theme/composables/useImage/index.ts | 11 +- .../theme/composables/useImage/useImage.ts | 32 + .../composables/useMagentoConfiguration.ts | 73 - .../UseMagentoConfiguration.ts | 17 + .../useMagentoConfiguration/index.ts | 33 + .../commands/placeOrderCommand.ts | 12 + .../theme/composables/useMakeOrder/index.ts | 40 + .../composables/useMakeOrder/useMakeOrder.ts | 27 + .../commands/updateSubscriptionCommand.ts | 15 + .../theme/composables/useNewsletter/index.ts | 49 + .../useNewsletter/useNewsletter.ts | 35 + .../usePaymentProvider/PaymentMethodParams.ts | 8 + .../getAvailablePaymentMethodsCommand.ts | 12 + .../commands/setPaymentMethodOnCartCommand.ts | 13 + .../composables/usePaymentProvider/index.ts | 80 + .../usePaymentProvider/usePaymentProvider.ts | 42 + .../useReview/commands/addReviewCommand.ts | 21 + .../commands/loadCustomerReviewsCommand.ts | 15 + .../commands/loadReviewMetadataCommand.ts | 15 + .../commands/searchReviewsCommand.ts | 21 + packages/theme/composables/useReview/index.ts | 102 + .../theme/composables/useReview/useReview.ts | 66 + .../theme/composables/useShipping/index.ts | 110 + .../composables/useShipping/useShipping.ts | 43 + .../setShippingMethodsOnCartCommand.ts | 13 + .../composables/useShippingProvider/index.ts | 86 + .../useShippingProvider.ts | 43 + packages/theme/composables/useStore/index.ts | 74 + .../theme/composables/useStore/useStore.ts | 41 + .../theme/composables/useUiHelpers/Params.ts | 32 + .../theme/composables/useUiHelpers/index.ts | 205 +- .../composables/useUiHelpers/useUiHelpers.ts | 60 + .../composables/useUiNotification/index.ts | 38 +- .../useUiNotification/useUiNotification.ts | 32 + .../{useUiState.ts => useUiState/index.ts} | 42 +- .../composables/useUiState/useUiState.ts | 107 + packages/theme/composables/useUrlResolver.ts | 26 - .../useUrlResolver/UseUrlResolver.ts | 33 + .../theme/composables/useUrlResolver/index.ts | 58 + packages/theme/composables/utils/mask.ts | 19 + packages/theme/config.js | 138 - packages/theme/config/example.json | 18 - packages/theme/enums/imageEnums.js | 18 +- packages/theme/getters/_utils.ts | 27 + packages/theme/getters/cartGetters.ts | 208 + packages/theme/getters/checkoutGetters.ts | 27 + packages/theme/getters/facetGetters.ts | 95 + packages/theme/getters/index.ts | 16 + packages/theme/getters/orderGetters.ts | 47 + packages/theme/getters/reviewGetters.ts | 58 + packages/theme/getters/storeConfigGetters.ts | 31 + packages/theme/getters/storeGetters.ts | 18 + packages/theme/getters/types.d.ts | 139 + packages/theme/getters/wishlistGetters.ts | 138 + packages/theme/graphqlClient.ts | 0 packages/theme/helpers/README.md | 1 - packages/theme/helpers/addBasePath.ts | 17 + packages/theme/helpers/cart/addToCart.ts | 22 +- .../checkout/getShippingMethodPrice.ts | 4 +- packages/theme/helpers/htmlDecoder.ts | 13 + .../helpers/integrationPlugin/_proxyUtils.ts | 52 + .../helpers/integrationPlugin/context.ts | 30 + .../theme/helpers/integrationPlugin/index.ts | 61 + packages/theme/helpers/logger/index.ts | 4 + packages/theme/helpers/logger/style.ts | 61 + packages/theme/helpers/logger/verbosity.ts | 43 + .../helpers/magentoConfig/handleChanges.ts | 39 - packages/theme/helpers/product/productData.ts | 22 - packages/theme/jest-setup.js | 34 + packages/theme/lang/de.js | 14 +- packages/theme/lang/en.js | 16 +- packages/theme/layouts/default.vue | 30 +- packages/theme/layouts/error.vue | 53 + packages/theme/middleware.config.js | 33 +- .../middleware/{checkout.js => checkout.ts} | 7 +- packages/theme/middleware/is-authenticated.js | 5 - packages/theme/middleware/is-authenticated.ts | 8 + packages/theme/modules/GraphQL/types.ts | 51436 ++++++++++++++++ .../components/CategoryEmptyResults.vue | 37 + .../__tests__/CategoryEmptyResults.spec.ts | 24 + .../breadcrumbs/CategoryBreadcrumbs.vue | 35 + .../category/components/cms/CmsContent.scss | 234 + .../category/components/cms/CmsContent.vue | 22 + .../components/cms/categoryContent.gql.ts | 15 + .../components/cms/useCategoryContent.ts | 44 + .../components/filters/CategoryFilters.scss | 72 + .../components/filters/CategoryFilters.vue | 233 + .../FiltersSidebar/SelectedFilters.vue | 68 + .../filters/__tests__/useFilters.spec.ts | 31 + .../command/getProductFilterByCategory.gql.ts | 22 + .../getProductFilterByCategoryCommand.ts | 14 + .../filters/renderer/CheckboxType.vue | 42 + .../components/filters/renderer/RadioType.vue | 61 + .../filters/renderer/RendererTypesEnum.ts | 9 + .../filters/renderer/SwatchColorType.vue | 52 + .../components/filters/renderer/YesNoType.vue | 51 + .../category/components/filters/useFilters.ts | 86 + .../components/navbar/CategoryNavbar.vue | 294 + .../MobileCategorySidebar.vue | 128 + .../__tests__/logic.spec.ts | 41 + .../sidebar/MobileCategorySidebar/logic.ts | 20 + .../components/views/CategoryProductGrid.vue | 109 + .../components/views/CategoryProductList.vue | 160 + .../__tests__/CategoryProductGrid.spec.ts | 30 + .../__tests__/CategoryProductList.spec.ts | 49 + .../views/__tests__/productsMock.ts | 258 + .../category/components/views/transition.scss | 10 + .../views/useProductsWithCommonCardProps.ts | 69 + .../category/composables/useCategory/index.ts | 103 + .../composables/useCategory/useCategory.ts | 88 + .../composables/useCategorySearch/index.ts | 48 + .../useCategorySearch/useCategorySearch.ts | 36 + .../catalog/category/config/FiltersConfig.ts | 22 + .../config/__tests__/filtersConfig.spec.ts | 75 + .../modules/catalog/category/config/config.ts | 49 + .../category/enums/displayModesEnum.ts | 7 + .../__tests__/findActiveCategory.spec.ts | 46 + .../__tests__/findCategoryAncestor.spec.ts | 26 + .../__tests__/useTraverseCategory.spec.ts | 63 + .../category/helpers/findActiveCategory.ts | 18 + .../category/helpers/findCategoryAncestors.ts | 28 + .../category/helpers/useTraverseCategory.ts | 40 + .../theme/modules/catalog/category/types.d.ts | 226 + packages/theme/modules/catalog/index.ts | 21 + .../theme/modules/catalog/pages/category.vue | 390 + .../catalog/pages/product.vue} | 434 +- .../pricing/__tests__/usePrice.spec.ts | 48 + .../catalog/pricing/getPricesQuery.gql.ts | 33 + .../theme/modules/catalog/pricing/usePrice.ts | 28 + .../components/BundleProductSelector.vue | 244 + .../components}/GroupedProductSelector.vue | 85 +- .../product}/components/ProductsCarousel.vue | 84 +- .../product}/components/RelatedProducts.vue | 24 +- .../product/components/UpsellProducts.vue | 44 + .../commands/getProductDetailsCommand.ts | 12 + .../commands/getProductListCommand.ts | 12 + .../product/composables/useProduct/index.ts | 71 + .../composables/useProduct/useProduct.ts | 38 + .../composables/useRelatedProducts/index.ts | 56 + .../useRelatedProducts/useRelatedProducts.ts | 36 + .../composables/useUpsellProducts/index.ts | 64 + .../useUpsellProducts/useUpsellProducts.ts | 38 + .../catalog/product/getters/productGetters.ts | 314 + .../catalog/product/helpers}/bundleProduct.ts | 6 +- .../theme/modules/catalog/product/types.ts | 37 + .../customer/components}/AddressForm.vue | 41 +- .../components}/PasswordResetForm.vue | 7 +- .../components}/ProfileUpdateForm.vue | 50 +- .../modules/customer/composables/types.d.ts | 9 + .../composables/useAddresses/index.ts | 118 + .../composables/useAddresses/useAddresses.ts | 222 + .../composables/useForgotPassword/index.ts | 87 + .../useForgotPassword/useForgotPassword.ts | 44 + .../commands/attachToCartCommand.ts | 17 + .../composables/useGuestUser/index.ts | 42 + .../composables/useGuestUser/useGuestUser.ts | 25 + .../customer/composables/useUser/index.ts | 314 + .../useUser/loginStatusPingQuery.gql.ts | 15 + .../customer/composables/useUser/useUser.ts | 125 + .../commands/createCustomerAddressCommand.ts | 9 + .../commands/deleteCustomerAddressCommand.ts | 9 + .../commands/updateCustomerAddressCommand.ts | 12 + .../composables/useUserAddress/index.ts | 162 + .../useUserAddress/useUserAddress.ts | 76 + .../composables/useUserOrder/index.ts | 53 + .../composables/useUserOrder/useUserOrder.ts | 39 + .../modules/customer/getters/addressGetter.ts | 31 + .../customer/getters/forgotPasswordGetters.ts | 15 + .../theme/modules/customer/getters/types.d.ts | 71 + .../customer/getters/userAddressesGetters.ts | 65 + .../customer/getters/userBillingGetters.ts | 40 + .../modules/customer/getters/userGetters.ts | 19 + .../customer/getters/userShippingGetters.ts | 37 + .../customer/helpers/generateUserData.ts | 43 + .../customer/helpers/passwordValidation.ts} | 0 .../helpers/userAddressManipulator.ts | 78 + packages/theme/modules/customer/index.ts | 20 + .../customer/pages}/AddressesDetails.vue | 107 +- .../customer}/pages/MyAccount.vue | 91 +- .../customer/pages}/MyNewsletter.vue | 13 +- .../customer/pages}/MyProfile.vue | 14 +- .../customer/pages}/MyReviews.vue | 31 +- .../customer/pages}/MyWishlist.vue | 223 +- .../customer/pages}/OrderHistory.vue | 28 +- .../theme/modules/magento/defaultConfig.ts | 14 + .../theme/modules/magento/helpers/index.ts | 24 + packages/theme/modules/magento/index.ts | 18 + packages/theme/modules/magento/plugin.ts | 113 + .../components/wishlist}/WishlistSidebar.vue | 160 +- packages/theme/modules/theme/index.ts | 5 + .../wishlist/composables/useWishlist/index.ts | 268 + .../composables/useWishlist/useWishlist.ts | 112 + .../wishlist/helpers/findItemOnWishlist.ts | 10 + .../modules/wishlist/helpers/productMatch.ts | 11 + packages/theme/modules/wishlist/index.ts | 5 + .../modules/wishlist/store/wishlistStore.ts | 12 + packages/theme/nuxt.config.js | 162 +- packages/theme/package.json | 46 +- packages/theme/pages/Category.vue | 1106 - packages/theme/pages/Checkout.vue | 58 +- packages/theme/pages/Checkout/Billing.vue | 132 +- packages/theme/pages/Checkout/Payment.vue | 76 +- packages/theme/pages/Checkout/Shipping.vue | 137 +- packages/theme/pages/Checkout/ThankYou.vue | 7 +- packages/theme/pages/Checkout/UserAccount.vue | 23 +- .../pages/Checkout/__tests__/Shipping.spec.js | 11 +- .../Checkout/__tests__/UserAccount.spec.js | 7 +- packages/theme/pages/Home.vue | 244 +- packages/theme/pages/Page.vue | 33 +- packages/theme/pages/ResetPassword.vue | 5 +- packages/theme/pages/Shipping.vue | 371 - .../pages/__tests__/ResetPassword.spec.js | 8 +- packages/theme/plugins/__tests__/i18n.spec.js | 24 +- .../plugins/__tests__/token-expired.spec.js | 60 +- packages/theme/plugins/fcPlugin.ts | 10 +- packages/theme/plugins/graphqlClient.ts | 83 + packages/theme/plugins/i18n.ts | 118 +- .../theme/plugins/query/StoreConfig.gql.ts | 20 + packages/theme/plugins/storeConfigPlugin.ts | 22 + packages/theme/plugins/token-expired.ts | 50 +- packages/theme/routes.js | 20 +- packages/theme/static/icon.png | Bin 0 -> 4796 bytes packages/theme/stores/category.ts | 28 + packages/theme/stores/config.ts | 17 + packages/theme/stores/customer.ts | 24 + .../theme/stores/graphql/categoryList.gql.ts | 34 + .../test-utils/mocks/categoryTreeDataMock.ts | 327 + .../test-utils/mocks/useUiHelpersMock.ts | 6 + packages/theme/tests/e2e/support/index.js | 5 +- packages/theme/tests/e2e/tsconfig.json | 7 + packages/theme/tsconfig.json | 20 +- packages/theme/types/core.ts | 902 + packages/theme/types/shims-vue.d.ts | 6 + rollup.base.config.js | 47 - scripts/build.js | 31 + scripts/generateApiReference.mjs | 67 + scripts/templates/api-extractor.theme.json | 13 + scripts/templates/tsconfig.theme.json | 23 + tsconfig.base.json | 20 - tsconfig.json | 106 + yarn.lock | 3655 +- 694 files changed, 72162 insertions(+), 11944 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/deployment-template.yml create mode 100644 .github/workflows/speedcurve.yml delete mode 100755 .husky/prepare-commit-msg create mode 100644 .lintstagedrc delete mode 100644 docs/api-reference/index.md delete mode 100644 docs/api-reference/magento-api.addbundleproductstocart.md delete mode 100644 docs/api-reference/magento-api.addconfigurableproductstocart.md delete mode 100644 docs/api-reference/magento-api.adddownloadableproductstocart.md delete mode 100644 docs/api-reference/magento-api.addproductstocart.md delete mode 100644 docs/api-reference/magento-api.addproducttowishlist.md delete mode 100644 docs/api-reference/magento-api.addsimpleproductstocart.md delete mode 100644 docs/api-reference/magento-api.addvirtualproductstocart.md delete mode 100644 docs/api-reference/magento-api.applycoupontocart.md delete mode 100644 docs/api-reference/magento-api.availablestores.md delete mode 100644 docs/api-reference/magento-api.cart.md delete mode 100644 docs/api-reference/magento-api.categorylist.md delete mode 100644 docs/api-reference/magento-api.categorysearch.md delete mode 100644 docs/api-reference/magento-api.changecustomerpassword.md delete mode 100644 docs/api-reference/magento-api.cmsblocks.md delete mode 100644 docs/api-reference/magento-api.cmspage.md delete mode 100644 docs/api-reference/magento-api.countries.md delete mode 100644 docs/api-reference/magento-api.country.md delete mode 100644 docs/api-reference/magento-api.createcustomer.md delete mode 100644 docs/api-reference/magento-api.createcustomeraddress.md delete mode 100644 docs/api-reference/magento-api.createemptycart.md delete mode 100644 docs/api-reference/magento-api.createproductreview.md delete mode 100644 docs/api-reference/magento-api.currency.md delete mode 100644 docs/api-reference/magento-api.customer.md delete mode 100644 docs/api-reference/magento-api.customercart.md delete mode 100644 docs/api-reference/magento-api.customerorders.md delete mode 100644 docs/api-reference/magento-api.customerproductreview.md delete mode 100644 docs/api-reference/magento-api.custommutation.md delete mode 100644 docs/api-reference/magento-api.customquery.md delete mode 100644 docs/api-reference/magento-api.deletecustomeraddress.md delete mode 100644 docs/api-reference/magento-api.generatecustomertoken.md delete mode 100644 docs/api-reference/magento-api.getavailablecustomerpaymentmethods.md delete mode 100644 docs/api-reference/magento-api.getavailablecustomershippingmethods.md delete mode 100644 docs/api-reference/magento-api.getavailablepaymentmethods.md delete mode 100644 docs/api-reference/magento-api.getavailableshippingmethods.md delete mode 100644 docs/api-reference/magento-api.getcustomeraddresses.md delete mode 100644 docs/api-reference/magento-api.md delete mode 100644 docs/api-reference/magento-api.mergecarts.md delete mode 100644 docs/api-reference/magento-api.placeorder.md delete mode 100644 docs/api-reference/magento-api.productdetail.md delete mode 100644 docs/api-reference/magento-api.productreview.md delete mode 100644 docs/api-reference/magento-api.productreviewratingsmetadata.md delete mode 100644 docs/api-reference/magento-api.products.md delete mode 100644 docs/api-reference/magento-api.relatedproduct.md delete mode 100644 docs/api-reference/magento-api.removecouponfromcart.md delete mode 100644 docs/api-reference/magento-api.removeitemfromcart.md delete mode 100644 docs/api-reference/magento-api.removeproductsfromwishlist.md delete mode 100644 docs/api-reference/magento-api.requestpasswordresetemail.md delete mode 100644 docs/api-reference/magento-api.resetpassword.md delete mode 100644 docs/api-reference/magento-api.revokecustomertoken.md delete mode 100644 docs/api-reference/magento-api.setbillingaddressoncart.md delete mode 100644 docs/api-reference/magento-api.setguestemailoncart.md delete mode 100644 docs/api-reference/magento-api.setpaymentmethodoncart.md delete mode 100644 docs/api-reference/magento-api.setshippingaddressesoncart.md delete mode 100644 docs/api-reference/magento-api.setshippingmethodsoncart.md delete mode 100644 docs/api-reference/magento-api.storeconfig.md delete mode 100644 docs/api-reference/magento-api.subscribeemailtonewsletter.md delete mode 100644 docs/api-reference/magento-api.updatecartitems.md delete mode 100644 docs/api-reference/magento-api.updatecustomer.md delete mode 100644 docs/api-reference/magento-api.updatecustomeraddress.md delete mode 100644 docs/api-reference/magento-api.updatecustomeremail.md delete mode 100644 docs/api-reference/magento-api.upsellproduct.md delete mode 100644 docs/api-reference/magento-api.urlresolver.md delete mode 100644 docs/api-reference/magento-api.wishlist.md delete mode 100644 docs/api-reference/magento.addressgetter.md delete mode 100644 docs/api-reference/magento.cartgetters.md delete mode 100644 docs/api-reference/magento.categorygetters.md delete mode 100644 docs/api-reference/magento.checkoutgetters.md delete mode 100644 docs/api-reference/magento.extendscopecontext.md delete mode 100644 docs/api-reference/magento.facetgetters.md delete mode 100644 docs/api-reference/magento.forgotpasswordgetters.md delete mode 100644 docs/api-reference/magento.md delete mode 100644 docs/api-reference/magento.ordergetters.md delete mode 100644 docs/api-reference/magento.productgetters.md delete mode 100644 docs/api-reference/magento.reviewgetters.md delete mode 100644 docs/api-reference/magento.storeconfiggetters.md delete mode 100644 docs/api-reference/magento.storegetters.md delete mode 100644 docs/api-reference/magento.useaddresses.md delete mode 100644 docs/api-reference/magento.usebilling.md delete mode 100644 docs/api-reference/magento.usecart.md delete mode 100644 docs/api-reference/magento.usecategory.md delete mode 100644 docs/api-reference/magento.usecategorysearch.md delete mode 100644 docs/api-reference/magento.useconfig.md delete mode 100644 docs/api-reference/magento.usecontent.md delete mode 100644 docs/api-reference/magento.usecountrysearch.md delete mode 100644 docs/api-reference/magento.usecurrency.md delete mode 100644 docs/api-reference/magento.usecustommutation.md delete mode 100644 docs/api-reference/magento.usecustomquery.md delete mode 100644 docs/api-reference/magento.useexternalcheckout.md delete mode 100644 docs/api-reference/magento.usefacet.md delete mode 100644 docs/api-reference/magento.useforgotpassword.md delete mode 100644 docs/api-reference/magento.usegetshippingmethods.md delete mode 100644 docs/api-reference/magento.useguestuser.md delete mode 100644 docs/api-reference/magento.usemakeorder.md delete mode 100644 docs/api-reference/magento.usenewsletter.md delete mode 100644 docs/api-reference/magento.usepaymentprovider.md delete mode 100644 docs/api-reference/magento.useproduct.md delete mode 100644 docs/api-reference/magento.useraddressesgetters.md delete mode 100644 docs/api-reference/magento.userbillinggetters.md delete mode 100644 docs/api-reference/magento.userelatedproducts.md delete mode 100644 docs/api-reference/magento.usereview.md delete mode 100644 docs/api-reference/magento.usergetters.md delete mode 100644 docs/api-reference/magento.usershippinggetters.md delete mode 100644 docs/api-reference/magento.useshipping.md delete mode 100644 docs/api-reference/magento.useshippingprovider.md delete mode 100644 docs/api-reference/magento.usestore.md delete mode 100644 docs/api-reference/magento.useupsellproducts.md delete mode 100644 docs/api-reference/magento.useurlresolver.md delete mode 100644 docs/api-reference/magento.useuser.md delete mode 100644 docs/api-reference/magento.useuserbilling.md delete mode 100644 docs/api-reference/magento.useuserorder.md delete mode 100644 docs/api-reference/magento.useusershipping.md delete mode 100644 docs/api-reference/magento.usewishlist.md delete mode 100644 docs/api-reference/magento.wishlistgetters.md delete mode 100644 docs/api-reference/magento.wishlistproduct.md create mode 100644 docs/guide/api-client/reference.md delete mode 100644 docs/guide/composables/use-addresses.md delete mode 100644 docs/guide/composables/use-billing.md delete mode 100644 docs/guide/composables/use-cart.md delete mode 100644 docs/guide/composables/use-category-search.md delete mode 100644 docs/guide/composables/use-category.md delete mode 100644 docs/guide/composables/use-config.md delete mode 100644 docs/guide/composables/use-content.md delete mode 100644 docs/guide/composables/use-country-search.md delete mode 100644 docs/guide/composables/use-custom-mutation.md delete mode 100644 docs/guide/composables/use-custom-query.md delete mode 100644 docs/guide/composables/use-external-checkout.md delete mode 100644 docs/guide/composables/use-facet.md delete mode 100644 docs/guide/composables/use-forgot-password.md delete mode 100644 docs/guide/composables/use-get-shipping-methods.md delete mode 100644 docs/guide/composables/use-guest-user.md delete mode 100644 docs/guide/composables/use-make-oder.md delete mode 100644 docs/guide/composables/use-menu-category.md delete mode 100644 docs/guide/composables/use-newsletter.md delete mode 100644 docs/guide/composables/use-payment-provider.md delete mode 100644 docs/guide/composables/use-product.md delete mode 100644 docs/guide/composables/use-related-products.md delete mode 100644 docs/guide/composables/use-review.md delete mode 100644 docs/guide/composables/use-shipping-provider.md delete mode 100644 docs/guide/composables/use-shipping.md delete mode 100644 docs/guide/composables/use-store.md delete mode 100644 docs/guide/composables/use-upsell-products.md delete mode 100644 docs/guide/composables/use-url-resolver.md delete mode 100644 docs/guide/composables/use-user-billing.md delete mode 100644 docs/guide/composables/use-user-order.md delete mode 100644 docs/guide/composables/use-user-shipping.md delete mode 100644 docs/guide/composables/use-user.md delete mode 100644 docs/guide/composables/use-wishlist.md delete mode 100644 docs/guide/functional-catalog.md create mode 100644 docs/guide/supported-features.md create mode 100644 docs/migration-guides/1.0.0-rc.7/index.md create mode 100644 docs/migration-guides/1.0.0-rc.7/rc.7-bic.md create mode 100644 docs/migration-guides/index.md delete mode 100644 docs/typedoc.json create mode 100644 internals/eslint-vue/rules/rules.js delete mode 100644 packages/api-client/.lintstagedrc create mode 100644 packages/api-client/babel.config.js delete mode 100644 packages/api-client/rollup.config.js delete mode 100644 packages/composables/.lintstagedrc create mode 100644 packages/composables/babel.config.js delete mode 100644 packages/composables/rollup.config.js delete mode 100644 packages/composables/src/getVueContext.ts delete mode 100644 packages/composables/src/helpers/getContextProperty.ts delete mode 100644 packages/theme/.lintstagedrc delete mode 100644 packages/theme/components/Category/CategorySidebarMenu.vue create mode 100644 packages/theme/components/Header/Navigation/HeaderNavigation.vue create mode 100644 packages/theme/components/Header/Navigation/HeaderNavigationSubcategories.vue create mode 100644 packages/theme/components/Header/Navigation/__tests__/HeaderNavigation.spec.js create mode 100644 packages/theme/components/Header/Navigation/__tests__/HeaderNavigationItem.spec.js create mode 100644 packages/theme/components/Header/Navigation/__tests__/HeaderNavigationSubcategories.spec.js create mode 100644 packages/theme/components/Hero.vue delete mode 100644 packages/theme/components/MobileMenuSidebar.vue create mode 100644 packages/theme/components/NewProducts.vue delete mode 100644 packages/theme/components/Products/BundleProductSelector.vue create mode 100644 packages/theme/components/SkeletonLoader/index.vue delete mode 100644 packages/theme/components/UpsellProducts.vue create mode 100644 packages/theme/composables/context.ts create mode 100644 packages/theme/composables/types.ts create mode 100644 packages/theme/composables/useBilling/BillingDetails.ts create mode 100644 packages/theme/composables/useBilling/commands/saveBillingAddressCommand.ts create mode 100644 packages/theme/composables/useBilling/index.ts create mode 100644 packages/theme/composables/useBilling/useBilling.ts create mode 100644 packages/theme/composables/useCart/commands/addItemCommand.ts create mode 100644 packages/theme/composables/useCart/commands/applyCouponCommand.ts create mode 100644 packages/theme/composables/useCart/commands/clearCartCommand.ts create mode 100644 packages/theme/composables/useCart/commands/loadCartCommand.ts create mode 100644 packages/theme/composables/useCart/commands/loadTotalQtyCommand.ts create mode 100644 packages/theme/composables/useCart/commands/removeCouponCommand.ts create mode 100644 packages/theme/composables/useCart/commands/removeItemCommand.ts create mode 100644 packages/theme/composables/useCart/commands/updateItemQtyCommand.ts create mode 100644 packages/theme/composables/useCart/index.ts create mode 100644 packages/theme/composables/useCart/useCart.ts create mode 100644 packages/theme/composables/useConfig/index.ts create mode 100644 packages/theme/composables/useConfig/useConfig.ts create mode 100644 packages/theme/composables/useContent/commands/loadBlocksCommand.ts create mode 100644 packages/theme/composables/useContent/commands/loadContentCommand.ts create mode 100644 packages/theme/composables/useContent/index.ts create mode 100644 packages/theme/composables/useContent/useContent.ts create mode 100644 packages/theme/composables/useCountrySearch/index.ts create mode 100644 packages/theme/composables/useCountrySearch/useCountrySearch.ts create mode 100644 packages/theme/composables/useCurrency/index.ts create mode 100644 packages/theme/composables/useCurrency/useCurrency.ts create mode 100644 packages/theme/composables/useExternalCheckout/index.ts create mode 100644 packages/theme/composables/useExternalCheckout/useExternalCheckout.ts create mode 100644 packages/theme/composables/useFacet/SearchData.ts create mode 100644 packages/theme/composables/useFacet/_utils.ts create mode 100644 packages/theme/composables/useFacet/index.ts create mode 100644 packages/theme/composables/useFacet/useFacet.ts create mode 100644 packages/theme/composables/useGetShippingMethods/commands/getCustomerShippingMethodsCommand.ts create mode 100644 packages/theme/composables/useGetShippingMethods/commands/getGuestShippingMethodsCommand.ts create mode 100644 packages/theme/composables/useGetShippingMethods/index.ts create mode 100644 packages/theme/composables/useGetShippingMethods/useGetShippingMethods.ts create mode 100644 packages/theme/composables/useImage/useImage.ts delete mode 100644 packages/theme/composables/useMagentoConfiguration.ts create mode 100644 packages/theme/composables/useMagentoConfiguration/UseMagentoConfiguration.ts create mode 100644 packages/theme/composables/useMagentoConfiguration/index.ts create mode 100644 packages/theme/composables/useMakeOrder/commands/placeOrderCommand.ts create mode 100644 packages/theme/composables/useMakeOrder/index.ts create mode 100644 packages/theme/composables/useMakeOrder/useMakeOrder.ts create mode 100644 packages/theme/composables/useNewsletter/commands/updateSubscriptionCommand.ts create mode 100644 packages/theme/composables/useNewsletter/index.ts create mode 100644 packages/theme/composables/useNewsletter/useNewsletter.ts create mode 100644 packages/theme/composables/usePaymentProvider/PaymentMethodParams.ts create mode 100644 packages/theme/composables/usePaymentProvider/commands/getAvailablePaymentMethodsCommand.ts create mode 100644 packages/theme/composables/usePaymentProvider/commands/setPaymentMethodOnCartCommand.ts create mode 100644 packages/theme/composables/usePaymentProvider/index.ts create mode 100644 packages/theme/composables/usePaymentProvider/usePaymentProvider.ts create mode 100644 packages/theme/composables/useReview/commands/addReviewCommand.ts create mode 100644 packages/theme/composables/useReview/commands/loadCustomerReviewsCommand.ts create mode 100644 packages/theme/composables/useReview/commands/loadReviewMetadataCommand.ts create mode 100644 packages/theme/composables/useReview/commands/searchReviewsCommand.ts create mode 100644 packages/theme/composables/useReview/index.ts create mode 100644 packages/theme/composables/useReview/useReview.ts create mode 100644 packages/theme/composables/useShipping/index.ts create mode 100644 packages/theme/composables/useShipping/useShipping.ts create mode 100644 packages/theme/composables/useShippingProvider/commands/setShippingMethodsOnCartCommand.ts create mode 100644 packages/theme/composables/useShippingProvider/index.ts create mode 100644 packages/theme/composables/useShippingProvider/useShippingProvider.ts create mode 100644 packages/theme/composables/useStore/index.ts create mode 100644 packages/theme/composables/useStore/useStore.ts create mode 100644 packages/theme/composables/useUiHelpers/Params.ts create mode 100644 packages/theme/composables/useUiHelpers/useUiHelpers.ts create mode 100644 packages/theme/composables/useUiNotification/useUiNotification.ts rename packages/theme/composables/{useUiState.ts => useUiState/index.ts} (65%) create mode 100644 packages/theme/composables/useUiState/useUiState.ts delete mode 100644 packages/theme/composables/useUrlResolver.ts create mode 100644 packages/theme/composables/useUrlResolver/UseUrlResolver.ts create mode 100644 packages/theme/composables/useUrlResolver/index.ts create mode 100644 packages/theme/composables/utils/mask.ts delete mode 100644 packages/theme/config.js delete mode 100644 packages/theme/config/example.json create mode 100644 packages/theme/getters/_utils.ts create mode 100644 packages/theme/getters/cartGetters.ts create mode 100644 packages/theme/getters/checkoutGetters.ts create mode 100644 packages/theme/getters/facetGetters.ts create mode 100644 packages/theme/getters/index.ts create mode 100644 packages/theme/getters/orderGetters.ts create mode 100644 packages/theme/getters/reviewGetters.ts create mode 100644 packages/theme/getters/storeConfigGetters.ts create mode 100644 packages/theme/getters/storeGetters.ts create mode 100644 packages/theme/getters/types.d.ts create mode 100644 packages/theme/getters/wishlistGetters.ts delete mode 100644 packages/theme/graphqlClient.ts delete mode 100644 packages/theme/helpers/README.md create mode 100644 packages/theme/helpers/addBasePath.ts create mode 100644 packages/theme/helpers/htmlDecoder.ts create mode 100644 packages/theme/helpers/integrationPlugin/_proxyUtils.ts create mode 100644 packages/theme/helpers/integrationPlugin/context.ts create mode 100644 packages/theme/helpers/integrationPlugin/index.ts create mode 100644 packages/theme/helpers/logger/index.ts create mode 100644 packages/theme/helpers/logger/style.ts create mode 100644 packages/theme/helpers/logger/verbosity.ts delete mode 100644 packages/theme/helpers/magentoConfig/handleChanges.ts delete mode 100644 packages/theme/helpers/product/productData.ts create mode 100644 packages/theme/layouts/error.vue rename packages/theme/middleware/{checkout.js => checkout.ts} (56%) delete mode 100644 packages/theme/middleware/is-authenticated.js create mode 100644 packages/theme/middleware/is-authenticated.ts create mode 100644 packages/theme/modules/GraphQL/types.ts create mode 100644 packages/theme/modules/catalog/category/components/CategoryEmptyResults.vue create mode 100644 packages/theme/modules/catalog/category/components/__tests__/CategoryEmptyResults.spec.ts create mode 100644 packages/theme/modules/catalog/category/components/breadcrumbs/CategoryBreadcrumbs.vue create mode 100644 packages/theme/modules/catalog/category/components/cms/CmsContent.scss create mode 100644 packages/theme/modules/catalog/category/components/cms/CmsContent.vue create mode 100644 packages/theme/modules/catalog/category/components/cms/categoryContent.gql.ts create mode 100644 packages/theme/modules/catalog/category/components/cms/useCategoryContent.ts create mode 100644 packages/theme/modules/catalog/category/components/filters/CategoryFilters.scss create mode 100644 packages/theme/modules/catalog/category/components/filters/CategoryFilters.vue create mode 100644 packages/theme/modules/catalog/category/components/filters/FiltersSidebar/SelectedFilters.vue create mode 100644 packages/theme/modules/catalog/category/components/filters/__tests__/useFilters.spec.ts create mode 100644 packages/theme/modules/catalog/category/components/filters/command/getProductFilterByCategory.gql.ts create mode 100644 packages/theme/modules/catalog/category/components/filters/command/getProductFilterByCategoryCommand.ts create mode 100644 packages/theme/modules/catalog/category/components/filters/renderer/CheckboxType.vue create mode 100644 packages/theme/modules/catalog/category/components/filters/renderer/RadioType.vue create mode 100644 packages/theme/modules/catalog/category/components/filters/renderer/RendererTypesEnum.ts create mode 100644 packages/theme/modules/catalog/category/components/filters/renderer/SwatchColorType.vue create mode 100644 packages/theme/modules/catalog/category/components/filters/renderer/YesNoType.vue create mode 100644 packages/theme/modules/catalog/category/components/filters/useFilters.ts create mode 100644 packages/theme/modules/catalog/category/components/navbar/CategoryNavbar.vue create mode 100644 packages/theme/modules/catalog/category/components/sidebar/MobileCategorySidebar/MobileCategorySidebar.vue create mode 100644 packages/theme/modules/catalog/category/components/sidebar/MobileCategorySidebar/__tests__/logic.spec.ts create mode 100644 packages/theme/modules/catalog/category/components/sidebar/MobileCategorySidebar/logic.ts create mode 100644 packages/theme/modules/catalog/category/components/views/CategoryProductGrid.vue create mode 100644 packages/theme/modules/catalog/category/components/views/CategoryProductList.vue create mode 100644 packages/theme/modules/catalog/category/components/views/__tests__/CategoryProductGrid.spec.ts create mode 100644 packages/theme/modules/catalog/category/components/views/__tests__/CategoryProductList.spec.ts create mode 100644 packages/theme/modules/catalog/category/components/views/__tests__/productsMock.ts create mode 100644 packages/theme/modules/catalog/category/components/views/transition.scss create mode 100644 packages/theme/modules/catalog/category/components/views/useProductsWithCommonCardProps.ts create mode 100644 packages/theme/modules/catalog/category/composables/useCategory/index.ts create mode 100644 packages/theme/modules/catalog/category/composables/useCategory/useCategory.ts create mode 100644 packages/theme/modules/catalog/category/composables/useCategorySearch/index.ts create mode 100644 packages/theme/modules/catalog/category/composables/useCategorySearch/useCategorySearch.ts create mode 100644 packages/theme/modules/catalog/category/config/FiltersConfig.ts create mode 100644 packages/theme/modules/catalog/category/config/__tests__/filtersConfig.spec.ts create mode 100644 packages/theme/modules/catalog/category/config/config.ts create mode 100644 packages/theme/modules/catalog/category/enums/displayModesEnum.ts create mode 100644 packages/theme/modules/catalog/category/helpers/__tests__/findActiveCategory.spec.ts create mode 100644 packages/theme/modules/catalog/category/helpers/__tests__/findCategoryAncestor.spec.ts create mode 100644 packages/theme/modules/catalog/category/helpers/__tests__/useTraverseCategory.spec.ts create mode 100644 packages/theme/modules/catalog/category/helpers/findActiveCategory.ts create mode 100644 packages/theme/modules/catalog/category/helpers/findCategoryAncestors.ts create mode 100644 packages/theme/modules/catalog/category/helpers/useTraverseCategory.ts create mode 100644 packages/theme/modules/catalog/category/types.d.ts create mode 100644 packages/theme/modules/catalog/index.ts create mode 100644 packages/theme/modules/catalog/pages/category.vue rename packages/theme/{pages/Product.vue => modules/catalog/pages/product.vue} (62%) create mode 100644 packages/theme/modules/catalog/pricing/__tests__/usePrice.spec.ts create mode 100644 packages/theme/modules/catalog/pricing/getPricesQuery.gql.ts create mode 100644 packages/theme/modules/catalog/pricing/usePrice.ts create mode 100644 packages/theme/modules/catalog/product/components/BundleProductSelector.vue rename packages/theme/{components/Products => modules/catalog/product/components}/GroupedProductSelector.vue (58%) rename packages/theme/{ => modules/catalog/product}/components/ProductsCarousel.vue (63%) rename packages/theme/{ => modules/catalog/product}/components/RelatedProducts.vue (50%) create mode 100644 packages/theme/modules/catalog/product/components/UpsellProducts.vue create mode 100644 packages/theme/modules/catalog/product/composables/useProduct/commands/getProductDetailsCommand.ts create mode 100644 packages/theme/modules/catalog/product/composables/useProduct/commands/getProductListCommand.ts create mode 100644 packages/theme/modules/catalog/product/composables/useProduct/index.ts create mode 100644 packages/theme/modules/catalog/product/composables/useProduct/useProduct.ts create mode 100644 packages/theme/modules/catalog/product/composables/useRelatedProducts/index.ts create mode 100644 packages/theme/modules/catalog/product/composables/useRelatedProducts/useRelatedProducts.ts create mode 100644 packages/theme/modules/catalog/product/composables/useUpsellProducts/index.ts create mode 100644 packages/theme/modules/catalog/product/composables/useUpsellProducts/useUpsellProducts.ts create mode 100644 packages/theme/modules/catalog/product/getters/productGetters.ts rename packages/theme/{helpers/product => modules/catalog/product/helpers}/bundleProduct.ts (73%) create mode 100644 packages/theme/modules/catalog/product/types.ts rename packages/theme/{components/MyAccount => modules/customer/components}/AddressForm.vue (92%) rename packages/theme/{components/MyAccount => modules/customer/components}/PasswordResetForm.vue (97%) rename packages/theme/{components/MyAccount => modules/customer/components}/ProfileUpdateForm.vue (84%) create mode 100644 packages/theme/modules/customer/composables/types.d.ts create mode 100644 packages/theme/modules/customer/composables/useAddresses/index.ts create mode 100644 packages/theme/modules/customer/composables/useAddresses/useAddresses.ts create mode 100644 packages/theme/modules/customer/composables/useForgotPassword/index.ts create mode 100644 packages/theme/modules/customer/composables/useForgotPassword/useForgotPassword.ts create mode 100644 packages/theme/modules/customer/composables/useGuestUser/commands/attachToCartCommand.ts create mode 100644 packages/theme/modules/customer/composables/useGuestUser/index.ts create mode 100644 packages/theme/modules/customer/composables/useGuestUser/useGuestUser.ts create mode 100644 packages/theme/modules/customer/composables/useUser/index.ts create mode 100644 packages/theme/modules/customer/composables/useUser/loginStatusPingQuery.gql.ts create mode 100644 packages/theme/modules/customer/composables/useUser/useUser.ts create mode 100644 packages/theme/modules/customer/composables/useUserAddress/commands/createCustomerAddressCommand.ts create mode 100644 packages/theme/modules/customer/composables/useUserAddress/commands/deleteCustomerAddressCommand.ts create mode 100644 packages/theme/modules/customer/composables/useUserAddress/commands/updateCustomerAddressCommand.ts create mode 100644 packages/theme/modules/customer/composables/useUserAddress/index.ts create mode 100644 packages/theme/modules/customer/composables/useUserAddress/useUserAddress.ts create mode 100644 packages/theme/modules/customer/composables/useUserOrder/index.ts create mode 100644 packages/theme/modules/customer/composables/useUserOrder/useUserOrder.ts create mode 100644 packages/theme/modules/customer/getters/addressGetter.ts create mode 100644 packages/theme/modules/customer/getters/forgotPasswordGetters.ts create mode 100644 packages/theme/modules/customer/getters/types.d.ts create mode 100644 packages/theme/modules/customer/getters/userAddressesGetters.ts create mode 100644 packages/theme/modules/customer/getters/userBillingGetters.ts create mode 100644 packages/theme/modules/customer/getters/userGetters.ts create mode 100644 packages/theme/modules/customer/getters/userShippingGetters.ts create mode 100644 packages/theme/modules/customer/helpers/generateUserData.ts rename packages/theme/{helpers/customer/regex.ts => modules/customer/helpers/passwordValidation.ts} (100%) create mode 100644 packages/theme/modules/customer/helpers/userAddressManipulator.ts create mode 100644 packages/theme/modules/customer/index.ts rename packages/theme/{pages/MyAccount => modules/customer/pages}/AddressesDetails.vue (69%) rename packages/theme/{ => modules/customer}/pages/MyAccount.vue (62%) rename packages/theme/{pages/MyAccount => modules/customer/pages}/MyNewsletter.vue (92%) rename packages/theme/{pages/MyAccount => modules/customer/pages}/MyProfile.vue (87%) rename packages/theme/{pages/MyAccount => modules/customer/pages}/MyReviews.vue (83%) rename packages/theme/{pages/MyAccount => modules/customer/pages}/MyWishlist.vue (71%) rename packages/theme/{pages/MyAccount => modules/customer/pages}/OrderHistory.vue (93%) create mode 100644 packages/theme/modules/magento/defaultConfig.ts create mode 100644 packages/theme/modules/magento/helpers/index.ts create mode 100644 packages/theme/modules/magento/index.ts create mode 100644 packages/theme/modules/magento/plugin.ts rename packages/theme/{components => modules/theme/components/wishlist}/WishlistSidebar.vue (59%) create mode 100644 packages/theme/modules/theme/index.ts create mode 100644 packages/theme/modules/wishlist/composables/useWishlist/index.ts create mode 100644 packages/theme/modules/wishlist/composables/useWishlist/useWishlist.ts create mode 100644 packages/theme/modules/wishlist/helpers/findItemOnWishlist.ts create mode 100644 packages/theme/modules/wishlist/helpers/productMatch.ts create mode 100644 packages/theme/modules/wishlist/index.ts create mode 100644 packages/theme/modules/wishlist/store/wishlistStore.ts delete mode 100644 packages/theme/pages/Category.vue delete mode 100644 packages/theme/pages/Shipping.vue create mode 100644 packages/theme/plugins/graphqlClient.ts create mode 100644 packages/theme/plugins/query/StoreConfig.gql.ts create mode 100644 packages/theme/plugins/storeConfigPlugin.ts create mode 100644 packages/theme/static/icon.png create mode 100644 packages/theme/stores/category.ts create mode 100644 packages/theme/stores/config.ts create mode 100644 packages/theme/stores/customer.ts create mode 100644 packages/theme/stores/graphql/categoryList.gql.ts create mode 100644 packages/theme/test-utils/mocks/categoryTreeDataMock.ts create mode 100644 packages/theme/test-utils/mocks/useUiHelpersMock.ts create mode 100644 packages/theme/tests/e2e/tsconfig.json create mode 100644 packages/theme/types/core.ts create mode 100644 packages/theme/types/shims-vue.d.ts delete mode 100644 rollup.base.config.js create mode 100644 scripts/build.js create mode 100644 scripts/generateApiReference.mjs create mode 100644 scripts/templates/api-extractor.theme.json create mode 100644 scripts/templates/tsconfig.theme.json delete mode 100644 tsconfig.base.json create mode 100644 tsconfig.json diff --git a/.eslintrc.js b/.eslintrc.js index 00e852c11..d0858feb9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,10 +12,11 @@ module.exports = { parserOptions: { parser: '@typescript-eslint/parser', project: [ - resolve(__dirname, './tsconfig.base.json'), + resolve(__dirname, './tsconfig.json'), resolve(__dirname, './packages/api-client/tsconfig.json'), resolve(__dirname, './packages/composables/tsconfig.json'), - resolve(__dirname, './packages/theme/tsconfig.json') + resolve(__dirname, './packages/theme/tsconfig.json'), + resolve(__dirname, './packages/theme/tests/e2e/tsconfig.json'), ], tsconfigRootDir: __dirname, extraFileExtensions: ['.vue'], @@ -30,6 +31,14 @@ module.exports = { '@vue-storefront/eslint-config-jest', ], rules: { - "@typescript-eslint/no-floating-promises": "off" + "@typescript-eslint/no-floating-promises": "off", + "jest/expect-expect": [ + "error", + { + "assertFunctionNames": ["expect", "getByRole", "getByTestId"], + } + ], + "no-plusplus": "off", } } + diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..084db9f1d --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @Frodigo @bartoszherba @sethidden diff --git a/.github/workflows/assing-pr-to-author.yml b/.github/workflows/assing-pr-to-author.yml index 3cf7226c9..37af3ceb7 100644 --- a/.github/workflows/assing-pr-to-author.yml +++ b/.github/workflows/assing-pr-to-author.yml @@ -3,6 +3,10 @@ on: pull_request: types: [opened, ready_for_review, edited, synchronize] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: assignAuthor: name: Assing diff --git a/.github/workflows/conventional-pr-name.yml b/.github/workflows/conventional-pr-name.yml index 895c766f6..465216619 100644 --- a/.github/workflows/conventional-pr-name.yml +++ b/.github/workflows/conventional-pr-name.yml @@ -3,6 +3,10 @@ on: pull_request: types: ['opened', 'edited', 'reopened', 'synchronize'] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: lint: name: Validate PR Title (conventional-commit) diff --git a/.github/workflows/deploy-vue-storefront-cloud.yml b/.github/workflows/deploy-vue-storefront-cloud.yml index 755917066..214eb9977 100644 --- a/.github/workflows/deploy-vue-storefront-cloud.yml +++ b/.github/workflows/deploy-vue-storefront-cloud.yml @@ -4,6 +4,7 @@ on: branches: - main - develop + - enterprise - release/* jobs: @@ -25,108 +26,93 @@ jobs: password: ${{ secrets.CLOUD_PASSWORD }} dockerfile: .vuestorefrontcloud/docker/Dockerfile buildoptions: --compress - buildargs: NPM_EMAIL,NPM_PASS,NPM_USER,NPM_REGISTRY,STORE_URL,MAGENTO_GRAPHQL,MAGENTO_EXTERNAL_CHECKOUT,MAGENTO_EXTERNAL_CHECKOUT_URL,MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH,IMAGE_PROVIDER,IMAGE_PROVIDER_BASE_URL,REDIS__HOST,REDIS__PORT,REDIS__CACHE_INVALIDATE_KEY,REDIS__CACHE_INVALIDATE_URL,REDIS__KEY_PREFIX,REDIS__ENABLED,SENTRY_DSN,RECAPTCHA_SITE_KEY,RECAPTCHA_SECRET_KEY + buildargs: NPM_EMAIL,NPM_PASS,NPM_USER,NPM_REGISTRY,LAST_COMMIT,VSF_STORE_URL,VSF_MAGENTO_BASE_URL,VSF_MAGENTO_GRAPHQL_URL,VSF_MAGENTO_EXTERNAL_CHECKOUT_ENABLED,VSF_MAGENTO_EXTERNAL_CHECKOUT_URL,VSF_MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH,VSF_IMAGE_PROVIDER,VSF_IMAGE_PROVIDER_BASE_URL,VSF_IMAGE_PROVIDER_DOMAIN,VSF_REDIS_HOST,VSF_REDIS_PORT,VSF_REDIS_CACHE_INVALIDATE_KEY,VSF_REDIS_CACHE_INVALIDATE_URL,VSF_REDIS_KEY_PREFIX,VSF_REDIS_ENABLED,VSF_RECAPTCHA_ENABLED,VSF_RECAPTCHA_HIDE_BADGE,VSF_RECAPTCHA_VERSION,VSF_RECAPTCHA_SIZE,VSF_RECAPTCHA_MIN_SCORE,VSF_RECAPTCHA_SITE_KEY,VSF_RECAPTCHA_SECRET_KEY,VSF_SENTRY_DSN, + env: NPM_EMAIL: ${{ secrets.NPM_EMAIL }} - NPM_PASS: ${{ secrets.CLOUD_PASSWORD }} NPM_USER: ${{ secrets.CLOUD_USERNAME }} + NPM_PASS: ${{ secrets.CLOUD_PASSWORD }} NPM_REGISTRY: https://registrynpm.storefrontcloud.io - STORE_URL: ${{ secrets.STORE_URL }} - MAGENTO_GRAPHQL: ${{ secrets.MAGENTO_GRAPHQL }} - MAGENTO_EXTERNAL_CHECKOUT: false - MAGENTO_EXTERNAL_CHECKOUT_URL: ${{ secrets.MAGENTO_EXTERNAL_CHECKOUT_URL }} - MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH: ${{ secrets.MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH }} - IMAGE_PROVIDER: ${{ secrets.IMAGE_PROVIDER }} - IMAGE_PROVIDER_BASE_URL: ${{ secrets.IMAGE_PROVIDER_BASE_URL }} - REDIS__HOST: ${{ secrets.REDIS__HOST }} - REDIS__PORT: ${{ secrets.REDIS__PORT }} - REDIS__KEY_PREFIX: ${{ secrets.REDIS__KEY_PREFIX }} - REDIS__CACHE_INVALIDATE_KEY: ${{ secrets.REDIS__CACHE_INVALIDATE_KEY }} - REDIS__CACHE_INVALIDATE_URL: ${{ secrets.REDIS__CACHE_INVALIDATE_URL }} - REDIS__ENABLED: ${{ secrets.REDIS__ENABLED }} - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - RECAPTCHA_SITE_KEY: ${{ secrets.RECAPTCHA_SITE_KEY }} - RECAPTCHA_SECRET_KEY: ${{ secrets.RECAPTCHA_SECRET_KEY }} - deploy: - runs-on: ubuntu-latest + + VSF_STORE_URL: '' # TODO + + VSF_MAGENTO_BASE_URL: https://magento2-instance.vuestorefront.io/ + VSF_MAGENTO_GRAPHQL_URL: https://magento2-instance.vuestorefront.io/graphql + VSF_MAGENTO_EXTERNAL_CHECKOUT_ENABLED: false + VSF_MAGENTO_EXTERNAL_CHECKOUT_URL: '' + VSF_MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH: '' + + VSF_IMAGE_PROVIDER: cloudinary + VSF_IMAGE_PROVIDER_BASE_URL: https://res-4.cloudinary.com/dnozky7on/image/upload/ + VSF_IMAGE_PROVIDER_DOMAIN: https://res-4.cloudinary.com + + VSF_REDIS_ENABLED: true + VSF_REDIS_HOST: redis # VSF cloud specific + VSF_REDIS_PORT: 6379 + VSF_REDIS_KEY_PREFIX: ${{ github.sha }} + VSF_REDIS_CACHE_INVALIDATE_KEY: magento2vsf2 + VSF_REDIS_CACHE_INVALIDATE_URL: /cache-invalidate + + VSF_RECAPTCHA_ENABLED: false + VSF_RECAPTCHA_HIDE_BADGE: false + VSF_RECAPTCHA_VERSION: 3 + VSF_RECAPTCHA_SIZE: invisible + VSF_RECAPTCHA_MIN_SCORE: 0.5 + VSF_RECAPTCHA_SITE_KEY: 6Ldce0EeAAAAAAGGtGWG-e-SygXiFub6PXHT5fKd + VSF_RECAPTCHA_SECRET_KEY: ${{ secrets.RECAPTCHA_SECRET_KEY }} + + VSF_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + + LAST_COMMIT: ${{ github.sha }} + + deploy-main: + uses: ./.github/workflows/deployment-template.yml needs: build - steps: - - uses: chrnorm/deployment-action@releases/v1 - name: Create GitHub deployment - id: deployment - with: - token: ${{ github.token }} - target_url: https://demo-magento2.europe-west1.gcp.storefrontcloud.io - environment: production - initial_status: in_progress - - name: Deploy on demo-magento2.europe-west1.gcp.storefrontcloud.io - if: startsWith(github.ref, 'refs/heads/main') - run: | - if curl -s -H 'X-User-Id: ${{ secrets.CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '{ - "code":"demo-magento2", - "region":"europe-west1.gcp", - "frontContainerVersion":"${{ github.sha }}" - }' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then - echo "Instance updated" - else - echo "Something went wrong during the update process..." - exit 1 - fi - - name: Deploy on demo-magento2-dev.europe-west1.gcp.storefrontcloud.io/ - if: startsWith(github.ref, 'refs/heads/develop') - run: | - if curl -s -H 'X-User-Id: ${{ secrets.CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '{ - "code":"demo-magento2-dev", - "region":"europe-west1.gcp", - "frontContainerVersion":"${{ github.sha }}" - }' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then - echo "Instance updated" - else - echo "Something went wrong during the update process..." - exit 1 - fi - - name: Deploy on demo-magento2-canary.europe-west1.gcp.storefrontcloud.io - if: startsWith(github.ref, 'refs/heads/release') - run: | - if curl -s -H 'X-User-Id: ${{ secrets.CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '{ - "code":"demo-magento2-canary", - "region":"europe-west1.gcp", - "frontContainerVersion":"${{ github.sha }}" - }' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then - echo "Instance updated" - else - echo "Something went wrong during the update process..." - exit 1 - fi - - name: Deploy on demo-magento2-enterprise.europe-west1.gcp.storefrontcloud.io - if: startsWith(github.ref, 'refs/heads/enterprise') - run: | - if curl -s -H 'X-User-Id: ${{ secrets.CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '{ - "code":"demo-magento2-enterprise", - "region":"europe-west1.gcp", - "frontContainerVersion":"${{ github.sha }}" - }' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then - echo "Instance updated" - else - echo "Something went wrong during the update process..." - exit 1 - fi + if: github.ref == 'refs/heads/main' + with: + github_environment_name: production + environment_code: demo-magento2 + target_url: https://demo-magento2.europe-west1.gcp.storefrontcloud.io + secrets: + cloud_username: ${{ secrets.CLOUD_USERNAME }} + cloud_password: ${{ secrets.CLOUD_PASSWORD }} + deployment_status_token: ${{ secrets.DEPLOYMENT_PERSONAL_ACCESS_TOKEN }} - - name: Update deployment status (success) - if: success() - uses: chrnorm/deployment-status@releases/v1 - with: - token: ${{ github.token }} - target_url: https://demo-magento2.europe-west1.gcp.storefrontcloud.io - state: success - description: Congratulations! The deploy is done. - deployment_id: ${{ steps.deployment.outputs.deployment_id }} - - name: Update deployment status (failure) - if: failure() - uses: chrnorm/deployment-status@releases/v1 - with: - token: ${{ github.token }} - target_url: https://demo-magento2.europe-west1.gcp.storefrontcloud.io - description: Unfortunately, the instance hasn't been updated. - state: failure - deployment_id: ${{ steps.deployment.outputs.deployment_id }} + deploy-develop: + uses: ./.github/workflows/deployment-template.yml + needs: build + if: github.ref == 'refs/heads/develop' + with: + github_environment_name: dev + environment_code: demo-magento2-dev + target_url: https://demo-magento2-dev.europe-west1.gcp.storefrontcloud.io + secrets: + cloud_username: ${{ secrets.CLOUD_USERNAME }} + cloud_password: ${{ secrets.CLOUD_PASSWORD }} + deployment_status_token: ${{ secrets.DEPLOYMENT_PERSONAL_ACCESS_TOKEN }} + + deploy-release: + uses: ./.github/workflows/deployment-template.yml + needs: build + if: startsWith(github.ref, 'refs/heads/release') + with: + github_environment_name: canary + environment_code: demo-magento2-canary + target_url: https://demo-magento2-canary.europe-west1.gcp.storefrontcloud.io + secrets: + cloud_username: ${{ secrets.CLOUD_USERNAME }} + cloud_password: ${{ secrets.CLOUD_PASSWORD }} + deployment_status_token: ${{ secrets.DEPLOYMENT_PERSONAL_ACCESS_TOKEN }} + + deploy-enterprise: + uses: ./.github/workflows/deployment-template.yml + needs: build + if: github.ref == 'refs/heads/enterprise' + with: + github_environment_name: enterprise + environment_code: demo-magento2-enterprise + target_url: https://demo-magento2-enterprise.europe-west1.gcp.storefrontcloud.io + secrets: + cloud_username: ${{ secrets.CLOUD_USERNAME }} + cloud_password: ${{ secrets.CLOUD_PASSWORD }} + deployment_status_token: ${{ secrets.DEPLOYMENT_PERSONAL_ACCESS_TOKEN }} diff --git a/.github/workflows/deployment-template.yml b/.github/workflows/deployment-template.yml new file mode 100644 index 000000000..73bb98996 --- /dev/null +++ b/.github/workflows/deployment-template.yml @@ -0,0 +1,69 @@ + # https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow +on: + workflow_call: + inputs: + github_environment_name: + required: true + type: string + + environment_code: + required: true + type: string + + target_url: + required: true + type: string + secrets: + cloud_username: + required: true + cloud_password: + required: true + deployment_status_token: # can be ${{ github.token }} + required: true + + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: chrnorm/deployment-action@releases/v1 + name: Create GitHub deployment + id: deployment + with: + token: ${{ secrets.deployment_status_token }} + environment: ${{ inputs.github_environment_name }} + initial_status: in_progress + target_url: ${{ inputs.target_url }} + - name: Deploy on ${{ inputs.target_url }} + run: | + if curl -s -H 'X-User-Id: ${{ secrets.cloud_username }}' -H 'X-Api-Key: ${{ secrets.cloud_password }}' -H 'Content-Type: application/json' -X POST -d '{ + "code":"${{ inputs.environment_code }}", + "region":"europe-west1.gcp", + "frontContainerVersion":"${{ github.sha }}" + }' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then + echo "Instance updated" + else + echo "Something went wrong during the update process..." + exit 1 + fi + + - name: Update deployment status (success) + if: success() + uses: chrnorm/deployment-status@releases/v1 + with: + token: ${{ secrets.deployment_status_token }} + target_url: ${{ inputs.target_url }} + state: success + description: Congratulations! The deploy is done. + deployment_id: ${{ steps.deployment.outputs.deployment_id }} + + - name: Update deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@releases/v1 + with: + token: ${{ secrets.deployment_status_token }} + target_url: ${{ inputs.target_url }} + description: Unfortunately, the instance hasn't been updated. + state: failure + deployment_id: ${{ steps.deployment.outputs.deployment_id }} + diff --git a/.github/workflows/speedcurve.yml b/.github/workflows/speedcurve.yml new file mode 100644 index 000000000..eaec33634 --- /dev/null +++ b/.github/workflows/speedcurve.yml @@ -0,0 +1,25 @@ +name: "Run SpeedCurve test" + +on: + deployment_status + +jobs: + speedcurve: + if: github.event.deployment_status.state == 'success' && github.event.deployment.ref == 'refs/heads/develop' + runs-on: ubuntu-latest + steps: + - name: 'Wait for container deployed on VSF Cloud to come online' + run: 'sleep 300' + shell: 'bash' + + - name: Shorten deployment commit SHA + id: vars + shell: bash + run: echo "::set-output name=sha_short::$(echo ${{ github.event.deployment.sha }} | cut -c1-8)" + + - name: 'Ask SpeedCurve to run performance tests' + uses: SpeedCurve-Metrics/speedcurve-test-action@v1.2.2 + with: + api_key: ${{ secrets.SPEEDCURVE_API_KEY }} + site_id: 744017 + note: commit ${{ steps.vars.outputs.sha_short }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 67f469d92..c81da536b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,10 @@ on: - develop - release-** +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: test_repository: name: Build and test diff --git a/.gitignore b/.gitignore index 11f332738..b60b71922 100644 --- a/.gitignore +++ b/.gitignore @@ -118,3 +118,4 @@ dist .history/ .graphqlconfig .idea +docs.sh diff --git a/.husky/pre-commit b/.husky/pre-commit index beaa057b4..6e2035b72 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx lerna run --parallel precommit +yarn run --silent lint-staged diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg deleted file mode 100755 index 73a4cdc33..000000000 --- a/.husky/prepare-commit-msg +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -exec < /dev/tty && git cz --hook || true diff --git a/.lintstagedrc b/.lintstagedrc new file mode 100644 index 000000000..54065f8e0 --- /dev/null +++ b/.lintstagedrc @@ -0,0 +1,3 @@ +{ + "*.{js,jsx,ts,tsx,vue}": "eslint --fix", +} diff --git a/.vuestorefrontcloud/docker/Dockerfile b/.vuestorefrontcloud/docker/Dockerfile index 31e441bd8..918540d3d 100644 --- a/.vuestorefrontcloud/docker/Dockerfile +++ b/.vuestorefrontcloud/docker/Dockerfile @@ -1,51 +1,68 @@ FROM node:16 -ARG COMMIT +ARG LAST_COMMIT ARG NPM_USER ARG NPM_PASS ARG NPM_EMAIL ARG NPM_REGISTRY -ARG MAGENTO_EXTERNAL_CHECKOUT -ARG MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH -ARG STORE_URL -ARG IMAGE_PROVIDER_BASE_URL -ARG REDIS__HOST -ARG REDIS__PORT -ARG REDIS__CACHE_INVALIDATE_KEY -ARG RECAPTCHA_ENABLED -ARG RECAPTCHA_HIDE_BADGE -ARG RECAPTCHA_VERSION -ARG RECAPTCHA_SIZE -ARG RECAPTCHA_MIN_SCORE -ARG RECAPTCHA_SITE_KEY -ARG RECAPTCHA_SECRET_KEY - -ENV MAGENTO_GRAPHQL=https://magento2-instance.vuestorefront.io:8443/graphql -ENV MAGENTO_EXTERNAL_CHECKOUT_URL=https://magento2-instance.vuestorefront.io -ENV MAGENTO_EXTERNAL_CHECKOUT=${MAGENTO_EXTERNAL_CHECKOUT} -ENV MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH=${MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH} -ENV STORE_URL=${STORE_URL} -ENV LAST_COMMIT=${COMMIT} -ENV STORE_ENV=production -ENV NUXT_APP_ENV=production -ENV NUXT_APP_PORT=3000 -ENV MAGENTO_BASE_URL=https://magento2-instance.vuestorefront.io/ -ENV IMAGE_PROVIDER=cloudinary -ENV IMAGE_PROVIDER_BASE_URL=${IMAGE_PROVIDER_BASE_URL} -ENV REDIS__HOST=${REDIS__HOST} -ENV REDIS__PORT=${REDIS__PORT} -ENV REDIS__CACHE_INVALIDATE_KEY=${REDIS__CACHE_INVALIDATE_KEY} -ENV REDIS__CACHE_INVALIDATE_URL=/cache-invalidate -ENV REDIS__KEY_PREFIX=magento2vsf2 -ENV REDIS__ENABLED=true -ENV SENTRY_DSN=${SENTRY_DSN} -ENV RECAPTCHA_ENABLED=false -ENV RECAPTCHA_HIDE_BADGE=false -ENV RECAPTCHA_VERSION=3 -ENV RECAPTCHA_SIZE=invisible -ENV RECAPTCHA_MIN_SCORE=0.5 -ENV RECAPTCHA_SITE_KEY=${RECAPTCHA_SITE_KEY} -ENV RECAPTCHA_SECRET_KEY=${RECAPTCHA_SITE_KEY} + +ARG VSF_STORE_URL + +ARG VSF_MAGENTO_BASE_URL +ARG VSF_MAGENTO_GRAPHQL_URL +ARG VSF_MAGENTO_EXTERNAL_CHECKOUT_ENABLED +ARG VSF_MAGENTO_EXTERNAL_CHECKOUT_URL +ARG VSF_MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH + +ARG VSF_IMAGE_PROVIDER +ARG VSF_IMAGE_PROVIDER_BASE_URL +ARG VSF_IMAGE_PROVIDER_DOMAIN + +ARG VSF_REDIS_ENABLED +ARG VSF_REDIS_HOST +ARG VSF_REDIS_PORT +ARG VSF_REDIS_KEY_PREFIX +ARG VSF_REDIS_CACHE_INVALIDATE_URL +ARG VSF_REDIS_CACHE_INVALIDATE_KEY + +ARG VSF_RECAPTCHA_ENABLED +ARG VSF_RECAPTCHA_HIDE_BADGE +ARG VSF_RECAPTCHA_VERSION +ARG VSF_RECAPTCHA_SIZE +ARG VSF_RECAPTCHA_MIN_SCORE +ARG VSF_RECAPTCHA_SITE_KEY +ARG VSF_RECAPTCHA_SECRET_KEY + +ARG VSF_SENTRY_DSN + +ENV LAST_COMMIT=${LAST_COMMIT} + +ENV VSF_NUXT_APP_ENV=production +ENV VSF_NUXT_APP_PORT=3000 + +ENV VSF_MAGENTO_BASE_URL=${VSF_MAGENTO_BASE_URL} +ENV VSF_MAGENTO_GRAPHQL_URL=${VSF_MAGENTO_GRAPHQL_URL} +ENV VSF_MAGENTO_EXTERNAL_CHECKOUT_ENABLED=${VSF_MAGENTO_EXTERNAL_CHECKOUT_ENABLED} +ENV VSF_MAGENTO_EXTERNAL_CHECKOUT_URL=${VSF_MAGENTO_EXTERNAL_CHECKOUT_URL} +ENV VSF_MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH=${VSF_MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH} +ENV VSF_STORE_URL=${VSF_STORE_URL} +ENV VSF_IMAGE_PROVIDER=${VSF_IMAGE_PROVIDER} +ENV VSF_IMAGE_PROVIDER_BASE_URL=${VSF_IMAGE_PROVIDER_BASE_URL} +ENV VSF_IMAGE_PROVIDER_DOMAINL=${VSF_IMAGE_PROVIDER_DOMAINL} +ENV VSF_REDIS_ENABLED=${VSF_REDIS_ENABLED} +ENV VSF_REDIS_HOST=${VSF_REDIS_HOST} +ENV VSF_REDIS_PORT=${VSF_REDIS_PORT} +ENV VSF_REDIS_KEY_PREFIX=${VSF_REDIS_KEY_PREFIX} +ENV VSF_REDIS_CACHE_INVALIDATE_KEY=${VSF_REDIS_CACHE_INVALIDATE_KEY} +ENV VSF_REDIS_CACHE_INVALIDATE_URL=${VSF_REDIS_CACHE_INVALIDATE_URL} +ENV VSF_SENTRY_DSN=${VSF_SENTRY_DSN} +ENV VSF_RECAPTCHA_ENABLED=${VSF_RECAPTCHA_ENABLED} +ENV VSF_RECAPTCHA_HIDE_BADGE=${VSF_RECAPTCHA_HIDE_BADGE} +ENV VSF_RECAPTCHA_VERSION=${VSF_RECAPTCHA_VERSION} +ENV VSF_RECAPTCHA_SIZE=${VSF_RECAPTCHA_SIZE} +ENV VSF_RECAPTCHA_MIN_SCORE=${VSF_RECAPTCHA_MIN_SCORE} +ENV VSF_RECAPTCHA_SITE_KEY=${VSF_RECAPTCHA_SITE_KEY} +ENV VSF_RECAPTCHA_SECRET_KEY=${VSF_RECAPTCHA_SITE_KEY} RUN npm config set @vsf-enterprise:registry=https://registrynpm.storefrontcloud.io @@ -60,8 +77,7 @@ RUN mv /var/www/packages/theme/nuxt.config.js /var/www/packages/theme/base.nuxt. RUN yarn install -RUN npx yarn@1.19.0 workspace @vue-storefront/magento-theme add @nuxtjs/sentry @sentry/tracing - +RUN npx yarn@1.19.0 workspace @vue-storefront/magento-theme add @sentry/tracing @nuxtjs/sentry RUN yarn build && yarn cache clean --all COPY .vuestorefrontcloud/docker/vue-storefront.sh /usr/local/bin/ diff --git a/.vuestorefrontcloud/docker/nuxt.config.additional.js b/.vuestorefrontcloud/docker/nuxt.config.additional.js index aa9029696..b5e52cd90 100755 --- a/.vuestorefrontcloud/docker/nuxt.config.additional.js +++ b/.vuestorefrontcloud/docker/nuxt.config.additional.js @@ -10,7 +10,7 @@ export default () => { '@nuxtjs/sentry' ], sentry: { - dsn: process.env.SENTRY_DSN, + dsn: process.env.VSF_SENTRY_DSN, tracing: true, }, }; diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b2941210..5b48d7e56 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,7 +52,7 @@ To make your life easier @vuestorefront/magento2 is commitizen-friendly and prov > Commit standards - [conventional-changelog](https://github.com/conventional-changelog) -- husky commit message hook available +- run `npx cz` to commit using commitizen - present tense - maximum of 100 characters - message format of `$type($scope): $message` diff --git a/README.md b/README.md index 139dd161b..a3e32dc57 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,11 @@ ### Stay connected -[![GitHub Repo stars](https://img.shields.io/github/stars/vuestorefront/vue-storefront?style=social)](https://github.com/vuestorefront/vue-storefront) -[![Twitter Follow](https://img.shields.io/twitter/follow/vuestorefront?style=social)](https://twitter.com/vuestorefront) -[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCkm1F3Cglty3CE1QwKQUhhg?style=social)](https://www.youtube.com/c/VueStorefront) +![GitHub Repo stars](https://img.shields.io/github/stars/vuestorefront/vue-storefront?style=social) +![Twitter Follow](https://img.shields.io/twitter/follow/vuestorefront?style=social) +![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCkm1F3Cglty3CE1QwKQUhhg?style=social) [![Discord](https://img.shields.io/discord/770285988244750366?label=join%20discord&logo=Discord&logoColor=white)](https://discord.vuestorefront.io) - -[![All Contributors](https://img.shields.io/badge/all_contributors-19-orange.svg?style=flat-square)](#contributors-) - + ## Vue Storefront 2 integration with Magento @@ -19,6 +17,10 @@ This project is a Magento 2 integration for Vue Storefront 2.
+ +[![All Contributors](https://img.shields.io/badge/all_contributors-15-orange.svg?style=flat-square)](#contributors-) + + ## How to start if you want to try out the integration ``` @@ -77,23 +79,19 @@ Find more information about the module [GraphQl Custom Config](https://github.co ```bash yarn install ``` -5. Define a store running environment by adding a `STORE_ENV` to your running project or execute the code - ```bash - echo "STORE_ENV=dev" >> .env - ``` -6. Copy `config/example.json` to an environment named config and update GraphQL Endpoint +5. Copy `.env.example` to `.env` ```bash - cp packages/theme/config/example.json packages/theme/config/dev.json + cp packages/theme/.env.example packages/theme/.env ``` -7. Update `magentoGraphQl` with url to Magento >=2.4.2 GraphQL endpoint, and the other variable accordingly to your store configurations. +6. Update `MAGENTO_GRAPHQL_URL` with url to Magento >=2.4.2 GraphQL endpoint, and the other variable accordingly to your store configurations. ``` - "magentoGraphQl": "https://{YOUR_SITE_FRONT_URL}/graphql", + MAGENTO_GRAPHQL_URL=https://{YOUR_SITE_FRONT_URL}/graphql ``` -8. Build dependencies `yarn build:api-client && yarn build:composables` +7. Build dependencies `yarn build:api-client && yarn build:composables` ```bash yarn build:api-client && yarn build:composables ``` -9. Run `yarn dev:theme` to run theme. You can find other commands in `package.json` +8. Run `yarn dev:theme` to run theme. You can find other commands in `package.json` ```bash yarn dev:theme ``` @@ -107,12 +105,11 @@ Find more information about the module [GraphQl Custom Config](https://github.co ## Support -If you have any questions about this integration we will be happy to answer them on `magento2` channel on [our Discord](http://discord.vuestorefront.io). +If you have any questions about this integration we will be happy to answer them on `magento2-vsf2` channel on [our Discord](http://discord.vuestorefront.io). ## Contributors ✨ ### Honorable Mentions -- [Caravel x](https://www.caravelx.com/) - [Cyberfuze](https://cyberfuze.com/) - [Leonex](https://www.leonex.de/) @@ -131,24 +128,18 @@ Thanks go to these wonderful people 🙌:
Patrick Monteiro

💻 -
Kevin Gorjan

💻 📖 -
Bartosz Herba

💻 📖 🚧 🧑‍🏫 👀 -
Marcin Kwiatkowski

💻 📆 💼 📖 🤔 🚧 🧑‍🏫 👀 +
Kevin Gorjan

💻 +
Bartosz Herba

💻 +
Marcin Kwiatkowski

💻 📆
Filip Rakowski

💬 🧑‍🏫 👀 -
Filip Sobol

💬 🧑‍🏫 👀 📖 +
Filip Sobol

💬 🧑‍🏫 👀
Patryk Andrzejewski

💬 🧑‍🏫 👀
Renan Oliveira

🔧 🔌
Dominik Deimel

💻 📖
Lior Lindvor

💻 - -
Artur Tagisow

💻 -
Jonathan Ribas

💻 -
Ali Ghanei

💻 -
Maya Shavin

📖 - diff --git a/api-extractor.base.json b/api-extractor.base.json index 6b0a718b0..8aa2f0c35 100644 --- a/api-extractor.base.json +++ b/api-extractor.base.json @@ -2,7 +2,7 @@ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "projectFolder": ".", "compiler": { - "tsconfigFilePath": "/tsconfig.base.json" + "tsconfigFilePath": "/tsconfig.json" }, "docModel": { "enabled": true diff --git a/docs/.gitignore b/docs/.gitignore index 60239afcf..6511fed0b 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1 +1,2 @@ .yarn/ +api-reference/ diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 4ecffda10..32610a906 100755 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -17,19 +17,22 @@ module.exports = { `]], ], configureWebpack: (config) => { - config.module.rules = config.module.rules.map(rule => ({ + config.module.rules = config.module.rules.map((rule) => ({ ...rule, - use: rule.use && rule.use.map(useRule => ({ - ...useRule, - options: useRule.loader === 'url-loader' ? - /** + use: + rule.use && + rule.use.map((useRule) => ({ + ...useRule, + options: + useRule.loader === 'url-loader' + ? /** Hack for loading images properly. ref: https://github.com/vuejs/vue-loader/issues/1612#issuecomment-559366730 */ - { ...useRule.options, esModule: false } : - useRule.options - })) - })) + { ...useRule.options, esModule: false } + : useRule.options, + })), + })); }, /** * Ref:https://v1.vuepress.vuejs.org/plugin/ @@ -40,11 +43,11 @@ module.exports = { '@vuepress/plugin-medium-zoom', { // This selector excludes images from the "Integrations" page - selector: 'main :not(.tile-image) > img' - } + selector: 'main :not(.tile-image) > img', + }, ], '@vuepress/active-header-links', - '@vuepress/search' + '@vuepress/search', ], themeConfig: { GTM_TAG, @@ -58,8 +61,8 @@ module.exports = { { text: 'Vue Storefront', link: 'https://vuestorefront.io/' }, { text: 'Core Documentation', link: 'https://docs.vuestorefront.io/v2/' }, { text: 'Demo', link: 'https://demo-magento2.europe-west1.gcp.storefrontcloud.io/' }, - { text: 'GitHub', link: 'https://github.com/vuestorefront/magento2'}, - { text: 'Environments', link: 'https://docs.vuestorefront.io/magento/guide/environments.html'} + { text: 'GitHub', link: 'https://github.com/vuestorefront/magento2' }, + { text: 'Environments', link: 'https://docs.vuestorefront.io/magento/guide/environments.html' }, ], sidebar: [ { @@ -67,10 +70,10 @@ module.exports = { collapsable: false, children: [ ['/', 'Introduction'], - ['/guide/environments', 'Environments'], - ['/guide/functional-catalog', 'Functional catalog'], + ['/guide/environments', 'Demo environments'], + ['/guide/supported-features', 'Supported features'], ['/guide/about', 'About'], - ] + ], }, { title: 'Creating a Storefront', @@ -80,8 +83,8 @@ module.exports = { ['/guide/configuration', 'Configuration'], ['/guide/override-queries', 'Override queries'], ['/guide/testing', 'Testing'], - ['/guide/recaptcha', 'ReCaptcha'] - ] + ['/guide/recaptcha', 'ReCaptcha'], + ], }, { title: 'Performance', @@ -89,45 +92,63 @@ module.exports = { children: [ ['/guide/graphql-get', 'Varnish & GET for GraphQL Queries'], ['/guide/ssr', 'Server Side Rendering Cache'], - ] + ], + }, + { + title: 'Performance', + collapsable: false, + children: [ + ['/guide/graphql-get', 'Varnish & GET for GraphQL Queries'], + ['/guide/ssr', 'Server Side Rendering Cache'], + ], }, { title: 'Composables', children: [ - ['/guide/composables/use-addresses', 'useAddresses'], - ['/guide/composables/use-billing', 'useBilling'], - ['/guide/composables/use-cart', 'useCart'], - ['/guide/composables/use-category', 'useCategory'], - ['/guide/composables/use-category-search', 'useCategorySearch'], - ['/guide/composables/use-config', 'useConfig'], - ['/guide/composables/use-content', 'useContent'], - ['/guide/composables/use-country-search', 'useCountrySearch'], - ['/guide/composables/use-custom-mutation', 'useCustomMutation'], - ['/guide/composables/use-custom-query', 'useCustomQuery'], - ['/guide/composables/use-external-checkout', 'useExternalCheckout'], - ['/guide/composables/use-facet', 'useFacet'], - ['/guide/composables/use-forgot-password', 'useForgotPassword'], - ['/guide/composables/use-get-shipping-methods', 'useGetShippingMethods'], - ['/guide/composables/use-guest-user', 'useGuestUser'], - ['/guide/composables/use-make-oder', 'useMakeOrder'], - ['/guide/composables/use-menu-category', 'useMenuCategory'], - ['/guide/composables/use-newsletter', 'useNewsletter'], - ['/guide/composables/use-payment-provider', 'usePaymentProvider'], - ['/guide/composables/use-product', 'useProduct'], - ['/guide/composables/use-related-products', 'useRelatedProducts'], - ['/guide/composables/use-review', 'useReview'], - ['/guide/composables/use-store', 'useStore'], - ['/guide/composables/use-upsell-products', 'useUpsellProducts'], - ['/guide/composables/use-url-resolver', 'useUrlResolver'], - ['/guide/composables/use-wishlist', 'useWishlist'], - ] + ['/api-reference/magento-theme.useaddresses', 'useAddresses()'], + ['/api-reference/magento-theme.useapi', 'useApi()'], + ['/api-reference/magento-theme.usebilling', 'useBilling()'], + ['/api-reference/magento-theme.usecart', 'useCart()'], + ['/api-reference/magento-theme.usecategory', 'useCategory()'], + ['/api-reference/magento-theme.usecategorysearch', 'useCategorySearch()'], + ['/api-reference/magento-theme.useconfig', 'useConfig()'], + ['/api-reference/magento-theme.usecontent', 'useContent()'], + ['/api-reference/magento-theme.usecountrysearch', 'useCountrySearch()'], + ['/api-reference/magento-theme.usecurrency', 'useCurrency()'], + ['/api-reference/magento-theme.useexternalcheckout', 'useExternalCheckout()'], + ['/api-reference/magento-theme.usefacet', 'useFacet()'], + ['/api-reference/magento-theme.useforgotpassword', 'useForgotPassword()'], + ['/api-reference/magento-theme.usegetshippingmethods', 'useGetShippingMethods()'], + ['/api-reference/magento-theme.useguestuser', 'useGuestUser()'], + ['/api-reference/magento-theme.useimage', 'useImage()'], + ['/api-reference/magento-theme.usemagentoconfiguration', 'useMagentoConfiguration()'], + ['/api-reference/magento-theme.usemakeorder', 'useMakeOrder()'], + ['/api-reference/magento-theme.usenewsletter', 'useNewsletter()'], + ['/api-reference/magento-theme.usepaymentprovider', 'usePaymentProvider()'], + ['/api-reference/magento-theme.useproduct', 'useProduct()'], + ['/api-reference/magento-theme.userelatedproducts', 'useRelatedProducts()'], + ['/api-reference/magento-theme.usereview', 'useReview()'], + ['/api-reference/magento-theme.useshipping', 'useShipping()'], + ['/api-reference/magento-theme.useshippingprovider', 'useShippingProvider()'], + ['/api-reference/magento-theme.usestore', 'useStore()'], + ['/api-reference/magento-theme.useuihelpers', 'useUiHelpers()'], + ['/api-reference/magento-theme.useuinotification', 'useUiNotification()'], + ['/api-reference/magento-theme.useuistate', 'useUiState()'], + ['/api-reference/magento-theme.useupsellproducts', 'useUpsellProducts()'], + ['/api-reference/magento-theme.useurlresolver', 'useUrlResolver()'], + ['/api-reference/magento-theme.useuser', 'useUser()'], + ['/api-reference/magento-theme.useuseraddress', 'useUserAddress()'], + ['/api-reference/magento-theme.useuserorder', 'useUserOrder()'], + ['/api-reference/magento-theme.usewishlist', 'useWishlist()'], + ], }, { title: 'Reference', children: [ ['/plugins/', 'Plugins'], ['/api-reference/', 'API Reference'], - ] + ['/migration-guides/', 'Migration guides'], + ], }, { title: 'Nuxt Tips & Tricks', @@ -136,8 +157,8 @@ module.exports = { ['/improvements/security/', 'Security'], ['/improvements/logging/', 'Logging'], ['/improvements/analytics/', 'Analytics'], - ] - } - ] - } -} + ], + }, + ], + }, +}; diff --git a/docs/api-reference/index.md b/docs/api-reference/index.md deleted file mode 100644 index 55e173d49..000000000 --- a/docs/api-reference/index.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) - -## API Reference - -## Packages - -| Package | Description | -| --- | --- | -| [@vue-storefront/magento](./magento.md) | | -| [@vue-storefront/magento-api](./magento-api.md) | api-client for Magento 2 integration for Vue Storefront 2. | - diff --git a/docs/api-reference/magento-api.addbundleproductstocart.md b/docs/api-reference/magento-api.addbundleproductstocart.md deleted file mode 100644 index 7232b602e..000000000 --- a/docs/api-reference/magento-api.addbundleproductstocart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [addBundleProductsToCart](./magento-api.addbundleproductstocart.md) - -## addBundleProductsToCart variable - -Signature: - -```typescript -_default: (context: Context, input: AddBundleProductsToCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.addconfigurableproductstocart.md b/docs/api-reference/magento-api.addconfigurableproductstocart.md deleted file mode 100644 index 4183d13c8..000000000 --- a/docs/api-reference/magento-api.addconfigurableproductstocart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [addConfigurableProductsToCart](./magento-api.addconfigurableproductstocart.md) - -## addConfigurableProductsToCart variable - -Signature: - -```typescript -_default: (context: Context, input: AddConfigurableProductsToCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.adddownloadableproductstocart.md b/docs/api-reference/magento-api.adddownloadableproductstocart.md deleted file mode 100644 index 437fa7b33..000000000 --- a/docs/api-reference/magento-api.adddownloadableproductstocart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [addDownloadableProductsToCart](./magento-api.adddownloadableproductstocart.md) - -## addDownloadableProductsToCart variable - -Signature: - -```typescript -_default: (context: Context, input: AddDownloadableProductsToCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.addproductstocart.md b/docs/api-reference/magento-api.addproductstocart.md deleted file mode 100644 index 431a040f6..000000000 --- a/docs/api-reference/magento-api.addproductstocart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [addProductsToCart](./magento-api.addproductstocart.md) - -## addProductsToCart variable - -Signature: - -```typescript -_default: (context: Context, input: AddProductsToCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.addproducttowishlist.md b/docs/api-reference/magento-api.addproducttowishlist.md deleted file mode 100644 index acfa824a7..000000000 --- a/docs/api-reference/magento-api.addproducttowishlist.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [addProductToWishList](./magento-api.addproducttowishlist.md) - -## addProductToWishList variable - -Signature: - -```typescript -_default: (context: Context, input: AddProductsToWishlistMutationVariables, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.addsimpleproductstocart.md b/docs/api-reference/magento-api.addsimpleproductstocart.md deleted file mode 100644 index d2b68a46b..000000000 --- a/docs/api-reference/magento-api.addsimpleproductstocart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [addSimpleProductsToCart](./magento-api.addsimpleproductstocart.md) - -## addSimpleProductsToCart variable - -Signature: - -```typescript -_default: (context: Context, input: AddSimpleProductsToCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.addvirtualproductstocart.md b/docs/api-reference/magento-api.addvirtualproductstocart.md deleted file mode 100644 index 75b4bd9a6..000000000 --- a/docs/api-reference/magento-api.addvirtualproductstocart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [addVirtualProductsToCart](./magento-api.addvirtualproductstocart.md) - -## addVirtualProductsToCart variable - -Signature: - -```typescript -_default: (context: Context, input: AddVirtualProductsToCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.applycoupontocart.md b/docs/api-reference/magento-api.applycoupontocart.md deleted file mode 100644 index 5cb3439d0..000000000 --- a/docs/api-reference/magento-api.applycoupontocart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [applyCouponToCart](./magento-api.applycoupontocart.md) - -## applyCouponToCart variable - -Signature: - -```typescript -_default: (context: Context, input: ApplyCouponToCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.availablestores.md b/docs/api-reference/magento-api.availablestores.md deleted file mode 100644 index fe4756883..000000000 --- a/docs/api-reference/magento-api.availablestores.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [availableStores](./magento-api.availablestores.md) - -## availableStores variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.cart.md b/docs/api-reference/magento-api.cart.md deleted file mode 100644 index 9ef22f357..000000000 --- a/docs/api-reference/magento-api.cart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [cart](./magento-api.cart.md) - -## cart variable - -Signature: - -```typescript -_default: (context: Context, cartId: string, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.categorylist.md b/docs/api-reference/magento-api.categorylist.md deleted file mode 100644 index d3d4d5af3..000000000 --- a/docs/api-reference/magento-api.categorylist.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [categoryList](./magento-api.categorylist.md) - -## categoryList variable - -Signature: - -```typescript -_default: (context: Context, params: CategoryListQueryVariables, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.categorysearch.md b/docs/api-reference/magento-api.categorysearch.md deleted file mode 100644 index cf197eb15..000000000 --- a/docs/api-reference/magento-api.categorysearch.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [categorySearch](./magento-api.categorysearch.md) - -## categorySearch variable - -Signature: - -```typescript -_default: (context: Context, filters: CategorySearchQueryVariables, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.changecustomerpassword.md b/docs/api-reference/magento-api.changecustomerpassword.md deleted file mode 100644 index 07d282405..000000000 --- a/docs/api-reference/magento-api.changecustomerpassword.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [changeCustomerPassword](./magento-api.changecustomerpassword.md) - -## changeCustomerPassword variable - -Signature: - -```typescript -_default: (context: Context, params: { - currentPassword: string; - newPassword: string; -}, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.cmsblocks.md b/docs/api-reference/magento-api.cmsblocks.md deleted file mode 100644 index bb01fbbba..000000000 --- a/docs/api-reference/magento-api.cmsblocks.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [cmsBlocks](./magento-api.cmsblocks.md) - -## cmsBlocks variable - -Signature: - -```typescript -_default: (context: Context, identifiers: string, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.cmspage.md b/docs/api-reference/magento-api.cmspage.md deleted file mode 100644 index 1f3386c2c..000000000 --- a/docs/api-reference/magento-api.cmspage.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [cmsPage](./magento-api.cmspage.md) - -## cmsPage variable - -Signature: - -```typescript -_default: (context: Context, identifier: string, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.countries.md b/docs/api-reference/magento-api.countries.md deleted file mode 100644 index de6747cf5..000000000 --- a/docs/api-reference/magento-api.countries.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [countries](./magento-api.countries.md) - -## countries variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.country.md b/docs/api-reference/magento-api.country.md deleted file mode 100644 index 7794bc2cb..000000000 --- a/docs/api-reference/magento-api.country.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [country](./magento-api.country.md) - -## country variable - -Signature: - -```typescript -_default: (context: Context, id: string, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.createcustomer.md b/docs/api-reference/magento-api.createcustomer.md deleted file mode 100644 index 6d8c5320f..000000000 --- a/docs/api-reference/magento-api.createcustomer.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [createCustomer](./magento-api.createcustomer.md) - -## createCustomer variable - -Signature: - -```typescript -_default: (context: Context, input: CustomerCreateInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.createcustomeraddress.md b/docs/api-reference/magento-api.createcustomeraddress.md deleted file mode 100644 index 12d654d3e..000000000 --- a/docs/api-reference/magento-api.createcustomeraddress.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [createCustomerAddress](./magento-api.createcustomeraddress.md) - -## createCustomerAddress variable - -Signature: - -```typescript -_default: (context: Context, input: CustomerAddressInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.createemptycart.md b/docs/api-reference/magento-api.createemptycart.md deleted file mode 100644 index 9c3cd91d2..000000000 --- a/docs/api-reference/magento-api.createemptycart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [createEmptyCart](./magento-api.createemptycart.md) - -## createEmptyCart variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.createproductreview.md b/docs/api-reference/magento-api.createproductreview.md deleted file mode 100644 index dcdafc6eb..000000000 --- a/docs/api-reference/magento-api.createproductreview.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [createProductReview](./magento-api.createproductreview.md) - -## createProductReview variable - -Signature: - -```typescript -_default: (context: Context, input: CreateProductReviewInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.currency.md b/docs/api-reference/magento-api.currency.md deleted file mode 100644 index ddce17ecf..000000000 --- a/docs/api-reference/magento-api.currency.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [currency](./magento-api.currency.md) - -## currency variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.customer.md b/docs/api-reference/magento-api.customer.md deleted file mode 100644 index cc53f8e26..000000000 --- a/docs/api-reference/magento-api.customer.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [customer](./magento-api.customer.md) - -## customer variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.customercart.md b/docs/api-reference/magento-api.customercart.md deleted file mode 100644 index 4008e9e21..000000000 --- a/docs/api-reference/magento-api.customercart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [customerCart](./magento-api.customercart.md) - -## customerCart variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.customerorders.md b/docs/api-reference/magento-api.customerorders.md deleted file mode 100644 index 786211b6c..000000000 --- a/docs/api-reference/magento-api.customerorders.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [customerOrders](./magento-api.customerorders.md) - -## customerOrders variable - -Signature: - -```typescript -_default: (context: Context, searchParams: GetOrdersSearchParams, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.customerproductreview.md b/docs/api-reference/magento-api.customerproductreview.md deleted file mode 100644 index 93c6a1325..000000000 --- a/docs/api-reference/magento-api.customerproductreview.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [customerProductReview](./magento-api.customerproductreview.md) - -## customerProductReview variable - -Signature: - -```typescript -_default: (context: Context, searchParams?: CustomerProductReviewParams, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.custommutation.md b/docs/api-reference/magento-api.custommutation.md deleted file mode 100644 index e6e531227..000000000 --- a/docs/api-reference/magento-api.custommutation.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [customMutation](./magento-api.custommutation.md) - -## customMutation variable - -Signature: - -```typescript -_default: ({ client }: Context, { mutation, mutationVariables, fetchPolicy, }: { - mutation: MUTATION; - mutationVariables: MUTATION_VARIABLES; - fetchPolicy?: Extract; -}) => Promise, Record>> -``` diff --git a/docs/api-reference/magento-api.customquery.md b/docs/api-reference/magento-api.customquery.md deleted file mode 100644 index 97c967908..000000000 --- a/docs/api-reference/magento-api.customquery.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [customQuery](./magento-api.customquery.md) - -## customQuery variable - -Signature: - -```typescript -_default: ({ client }: Context, { query, queryVariables, fetchPolicy, }: { - query: QUERY; - queryVariables?: QUERY_VARIABLES; - fetchPolicy?: FetchPolicy; -}) => Promise> -``` diff --git a/docs/api-reference/magento-api.deletecustomeraddress.md b/docs/api-reference/magento-api.deletecustomeraddress.md deleted file mode 100644 index 768a361c3..000000000 --- a/docs/api-reference/magento-api.deletecustomeraddress.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [deleteCustomerAddress](./magento-api.deletecustomeraddress.md) - -## deleteCustomerAddress variable - -Signature: - -```typescript -_default: (context: Context, addressId: number, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.generatecustomertoken.md b/docs/api-reference/magento-api.generatecustomertoken.md deleted file mode 100644 index 35836219a..000000000 --- a/docs/api-reference/magento-api.generatecustomertoken.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [generateCustomerToken](./magento-api.generatecustomertoken.md) - -## generateCustomerToken variable - -Signature: - -```typescript -_default: (context: Context, params: { - email: string; - password: string; - recaptchaToken: string; -}, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.getavailablecustomerpaymentmethods.md b/docs/api-reference/magento-api.getavailablecustomerpaymentmethods.md deleted file mode 100644 index 6154074a4..000000000 --- a/docs/api-reference/magento-api.getavailablecustomerpaymentmethods.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [getAvailableCustomerPaymentMethods](./magento-api.getavailablecustomerpaymentmethods.md) - -## getAvailableCustomerPaymentMethods variable - -Signature: - -```typescript -_default: (context: Context, params: { - cartId: string; -}, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.getavailablecustomershippingmethods.md b/docs/api-reference/magento-api.getavailablecustomershippingmethods.md deleted file mode 100644 index 8c54d893e..000000000 --- a/docs/api-reference/magento-api.getavailablecustomershippingmethods.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [getAvailableCustomerShippingMethods](./magento-api.getavailablecustomershippingmethods.md) - -## getAvailableCustomerShippingMethods variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.getavailablepaymentmethods.md b/docs/api-reference/magento-api.getavailablepaymentmethods.md deleted file mode 100644 index d4b7d9eb4..000000000 --- a/docs/api-reference/magento-api.getavailablepaymentmethods.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [getAvailablePaymentMethods](./magento-api.getavailablepaymentmethods.md) - -## getAvailablePaymentMethods variable - -Signature: - -```typescript -_default: (context: Context, params: { - cartId: string; -}, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.getavailableshippingmethods.md b/docs/api-reference/magento-api.getavailableshippingmethods.md deleted file mode 100644 index 86368b4c1..000000000 --- a/docs/api-reference/magento-api.getavailableshippingmethods.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [getAvailableShippingMethods](./magento-api.getavailableshippingmethods.md) - -## getAvailableShippingMethods variable - -Signature: - -```typescript -_default: (context: Context, params: { - cartId: string; -}, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.getcustomeraddresses.md b/docs/api-reference/magento-api.getcustomeraddresses.md deleted file mode 100644 index cf2f7cad4..000000000 --- a/docs/api-reference/magento-api.getcustomeraddresses.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [getCustomerAddresses](./magento-api.getcustomeraddresses.md) - -## getCustomerAddresses variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.md b/docs/api-reference/magento-api.md deleted file mode 100644 index c93c675cd..000000000 --- a/docs/api-reference/magento-api.md +++ /dev/null @@ -1,81 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) - -## magento-api package - -`api-client` for Magento 2 integration for Vue Storefront 2. - -## Remarks - -The `@vue-storefront/magento2` library includes everything needed to fetch data from the Magento 2 eCommerce platform. This includes API client configuration, API endpoints, and GraphQL types and fragments. - -## Variables - -| Variable | Description | -| --- | --- | -| [addBundleProductsToCart](./magento-api.addbundleproductstocart.md) | | -| [addConfigurableProductsToCart](./magento-api.addconfigurableproductstocart.md) | | -| [addDownloadableProductsToCart](./magento-api.adddownloadableproductstocart.md) | | -| [addProductsToCart](./magento-api.addproductstocart.md) | | -| [addProductToWishList](./magento-api.addproducttowishlist.md) | | -| [addSimpleProductsToCart](./magento-api.addsimpleproductstocart.md) | | -| [addVirtualProductsToCart](./magento-api.addvirtualproductstocart.md) | | -| [applyCouponToCart](./magento-api.applycoupontocart.md) | | -| [availableStores](./magento-api.availablestores.md) | | -| [cart](./magento-api.cart.md) | | -| [cartTotalQty](./magento-api.carttotalqty.md) | | -| [categoryList](./magento-api.categorylist.md) | | -| [categorySearch](./magento-api.categorysearch.md) | | -| [changeCustomerPassword](./magento-api.changecustomerpassword.md) | | -| [cmsBlocks](./magento-api.cmsblocks.md) | | -| [cmsPage](./magento-api.cmspage.md) | | -| [countries](./magento-api.countries.md) | | -| [country](./magento-api.country.md) | | -| [createCustomer](./magento-api.createcustomer.md) | | -| [createCustomerAddress](./magento-api.createcustomeraddress.md) | | -| [createEmptyCart](./magento-api.createemptycart.md) | | -| [createProductReview](./magento-api.createproductreview.md) | | -| [currency](./magento-api.currency.md) | | -| [customer](./magento-api.customer.md) | | -| [customerCart](./magento-api.customercart.md) | | -| [customerOrders](./magento-api.customerorders.md) | | -| [customerProductReview](./magento-api.customerproductreview.md) | | -| [customMutation](./magento-api.custommutation.md) | | -| [customQuery](./magento-api.customquery.md) | | -| [deleteCustomerAddress](./magento-api.deletecustomeraddress.md) | | -| [generateCustomerToken](./magento-api.generatecustomertoken.md) | | -| [getAvailableCustomerPaymentMethods](./magento-api.getavailablecustomerpaymentmethods.md) | | -| [getAvailableCustomerShippingMethods](./magento-api.getavailablecustomershippingmethods.md) | | -| [getAvailablePaymentMethods](./magento-api.getavailablepaymentmethods.md) | | -| [getAvailableShippingMethods](./magento-api.getavailableshippingmethods.md) | | -| [getCustomerAddresses](./magento-api.getcustomeraddresses.md) | | -| [mergeCarts](./magento-api.mergecarts.md) | | -| [placeOrder](./magento-api.placeorder.md) | | -| [productDetail](./magento-api.productdetail.md) | | -| [productReview](./magento-api.productreview.md) | | -| [productReviewRatingsMetadata](./magento-api.productreviewratingsmetadata.md) | | -| [products](./magento-api.products.md) | | -| [relatedProduct](./magento-api.relatedproduct.md) | | -| [removeCouponFromCart](./magento-api.removecouponfromcart.md) | | -| [removeItemFromCart](./magento-api.removeitemfromcart.md) | | -| [removeProductsFromWishlist](./magento-api.removeproductsfromwishlist.md) | | -| [requestPasswordResetEmail](./magento-api.requestpasswordresetemail.md) | | -| [resetPassword](./magento-api.resetpassword.md) | | -| [revokeCustomerToken](./magento-api.revokecustomertoken.md) | | -| [setBillingAddressOnCart](./magento-api.setbillingaddressoncart.md) | | -| [setGuestEmailOnCart](./magento-api.setguestemailoncart.md) | | -| [setPaymentMethodOnCart](./magento-api.setpaymentmethodoncart.md) | | -| [setShippingAddressesOnCart](./magento-api.setshippingaddressesoncart.md) | | -| [setShippingMethodsOnCart](./magento-api.setshippingmethodsoncart.md) | | -| [storeConfig](./magento-api.storeconfig.md) | | -| [subscribeEmailToNewsletter](./magento-api.subscribeemailtonewsletter.md) | | -| [updateCartItems](./magento-api.updatecartitems.md) | | -| [updateCustomer](./magento-api.updatecustomer.md) | | -| [updateCustomerAddress](./magento-api.updatecustomeraddress.md) | | -| [updateCustomerEmail](./magento-api.updatecustomeremail.md) | | -| [upsellProduct](./magento-api.upsellproduct.md) | | -| [urlResolver](./magento-api.urlresolver.md) | | -| [wishlist](./magento-api.wishlist.md) | | -| [wishlistItemsCount](./magento-api.wishlistitemscount.md) | | - diff --git a/docs/api-reference/magento-api.mergecarts.md b/docs/api-reference/magento-api.mergecarts.md deleted file mode 100644 index 4a7cccbd5..000000000 --- a/docs/api-reference/magento-api.mergecarts.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [mergeCarts](./magento-api.mergecarts.md) - -## mergeCarts variable - -Signature: - -```typescript -_default: (context: Context, params: { - sourceCartId: string; - destinationCartId: string; -}, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.placeorder.md b/docs/api-reference/magento-api.placeorder.md deleted file mode 100644 index f8d0dd5e7..000000000 --- a/docs/api-reference/magento-api.placeorder.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [placeOrder](./magento-api.placeorder.md) - -## placeOrder variable - -Signature: - -```typescript -_default: (context: Context, input: PlaceOrderInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.productdetail.md b/docs/api-reference/magento-api.productdetail.md deleted file mode 100644 index 57dee5259..000000000 --- a/docs/api-reference/magento-api.productdetail.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [productDetail](./magento-api.productdetail.md) - -## productDetail variable - -Signature: - -```typescript -_default: (context: Context, searchParams?: GetProductSearchParams, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.productreview.md b/docs/api-reference/magento-api.productreview.md deleted file mode 100644 index 8d1612a10..000000000 --- a/docs/api-reference/magento-api.productreview.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [productReview](./magento-api.productreview.md) - -## productReview variable - -Signature: - -```typescript -_default: (context: Context, searchParams?: GetProductSearchParams, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.productreviewratingsmetadata.md b/docs/api-reference/magento-api.productreviewratingsmetadata.md deleted file mode 100644 index 2cd8626c7..000000000 --- a/docs/api-reference/magento-api.productreviewratingsmetadata.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [productReviewRatingsMetadata](./magento-api.productreviewratingsmetadata.md) - -## productReviewRatingsMetadata variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.products.md b/docs/api-reference/magento-api.products.md deleted file mode 100644 index e3da94362..000000000 --- a/docs/api-reference/magento-api.products.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [products](./magento-api.products.md) - -## products variable - -Signature: - -```typescript -_default: (context: Context, searchParams?: GetProductSearchParams, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.relatedproduct.md b/docs/api-reference/magento-api.relatedproduct.md deleted file mode 100644 index 3a3f613c2..000000000 --- a/docs/api-reference/magento-api.relatedproduct.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [relatedProduct](./magento-api.relatedproduct.md) - -## relatedProduct variable - -Signature: - -```typescript -_default: (context: Context, searchParams?: GetProductSearchParams, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.removecouponfromcart.md b/docs/api-reference/magento-api.removecouponfromcart.md deleted file mode 100644 index 2b54f05c7..000000000 --- a/docs/api-reference/magento-api.removecouponfromcart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [removeCouponFromCart](./magento-api.removecouponfromcart.md) - -## removeCouponFromCart variable - -Signature: - -```typescript -_default: (context: Context, input: RemoveCouponFromCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.removeitemfromcart.md b/docs/api-reference/magento-api.removeitemfromcart.md deleted file mode 100644 index 814b05896..000000000 --- a/docs/api-reference/magento-api.removeitemfromcart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [removeItemFromCart](./magento-api.removeitemfromcart.md) - -## removeItemFromCart variable - -Signature: - -```typescript -_default: (context: Context, input: RemoveItemFromCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.removeproductsfromwishlist.md b/docs/api-reference/magento-api.removeproductsfromwishlist.md deleted file mode 100644 index 90841a670..000000000 --- a/docs/api-reference/magento-api.removeproductsfromwishlist.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [removeProductsFromWishlist](./magento-api.removeproductsfromwishlist.md) - -## removeProductsFromWishlist variable - -Signature: - -```typescript -_default: (context: Context, input: RemoveProductsFromWishlistMutationVariables, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.requestpasswordresetemail.md b/docs/api-reference/magento-api.requestpasswordresetemail.md deleted file mode 100644 index 905c371c0..000000000 --- a/docs/api-reference/magento-api.requestpasswordresetemail.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [requestPasswordResetEmail](./magento-api.requestpasswordresetemail.md) - -## requestPasswordResetEmail variable - -Signature: - -```typescript -_default: (context: Context, input: RequestPasswordResetEmailMutationVariables, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.resetpassword.md b/docs/api-reference/magento-api.resetpassword.md deleted file mode 100644 index 65e8ba8b2..000000000 --- a/docs/api-reference/magento-api.resetpassword.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [resetPassword](./magento-api.resetpassword.md) - -## resetPassword variable - -Signature: - -```typescript -_default: (context: Context, input: ResetPasswordMutationVariables, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.revokecustomertoken.md b/docs/api-reference/magento-api.revokecustomertoken.md deleted file mode 100644 index f8d703610..000000000 --- a/docs/api-reference/magento-api.revokecustomertoken.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [revokeCustomerToken](./magento-api.revokecustomertoken.md) - -## revokeCustomerToken variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.setbillingaddressoncart.md b/docs/api-reference/magento-api.setbillingaddressoncart.md deleted file mode 100644 index 84ebb1b2a..000000000 --- a/docs/api-reference/magento-api.setbillingaddressoncart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [setBillingAddressOnCart](./magento-api.setbillingaddressoncart.md) - -## setBillingAddressOnCart variable - -Signature: - -```typescript -_default: (context: Context, input: SetBillingAddressOnCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.setguestemailoncart.md b/docs/api-reference/magento-api.setguestemailoncart.md deleted file mode 100644 index a567c7daf..000000000 --- a/docs/api-reference/magento-api.setguestemailoncart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [setGuestEmailOnCart](./magento-api.setguestemailoncart.md) - -## setGuestEmailOnCart variable - -Signature: - -```typescript -_default: (context: Context, input: SetGuestEmailOnCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.setpaymentmethodoncart.md b/docs/api-reference/magento-api.setpaymentmethodoncart.md deleted file mode 100644 index 3e268c12d..000000000 --- a/docs/api-reference/magento-api.setpaymentmethodoncart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [setPaymentMethodOnCart](./magento-api.setpaymentmethodoncart.md) - -## setPaymentMethodOnCart variable - -Signature: - -```typescript -_default: (context: Context, input: SetPaymentMethodOnCartInputs, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.setshippingaddressesoncart.md b/docs/api-reference/magento-api.setshippingaddressesoncart.md deleted file mode 100644 index 54ac98537..000000000 --- a/docs/api-reference/magento-api.setshippingaddressesoncart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [setShippingAddressesOnCart](./magento-api.setshippingaddressesoncart.md) - -## setShippingAddressesOnCart variable - -Signature: - -```typescript -_default: (context: Context, input: SetShippingAddressesOnCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.setshippingmethodsoncart.md b/docs/api-reference/magento-api.setshippingmethodsoncart.md deleted file mode 100644 index 867f1d20e..000000000 --- a/docs/api-reference/magento-api.setshippingmethodsoncart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [setShippingMethodsOnCart](./magento-api.setshippingmethodsoncart.md) - -## setShippingMethodsOnCart variable - -Signature: - -```typescript -_default: (context: Context, input: SetShippingMethodsOnCartInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.storeconfig.md b/docs/api-reference/magento-api.storeconfig.md deleted file mode 100644 index 28c53c7c1..000000000 --- a/docs/api-reference/magento-api.storeconfig.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [storeConfig](./magento-api.storeconfig.md) - -## storeConfig variable - -Signature: - -```typescript -_default: (context: Context, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.subscribeemailtonewsletter.md b/docs/api-reference/magento-api.subscribeemailtonewsletter.md deleted file mode 100644 index a93032786..000000000 --- a/docs/api-reference/magento-api.subscribeemailtonewsletter.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [subscribeEmailToNewsletter](./magento-api.subscribeemailtonewsletter.md) - -## subscribeEmailToNewsletter variable - -Signature: - -```typescript -_default: (context: Context, { email }: SubscribeEmailToNewsletterMutationVariables, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.updatecartitems.md b/docs/api-reference/magento-api.updatecartitems.md deleted file mode 100644 index 4d11ab05e..000000000 --- a/docs/api-reference/magento-api.updatecartitems.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [updateCartItems](./magento-api.updatecartitems.md) - -## updateCartItems variable - -Signature: - -```typescript -_default: (context: Context, input: UpdateCartItemsInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.updatecustomer.md b/docs/api-reference/magento-api.updatecustomer.md deleted file mode 100644 index 6289cca20..000000000 --- a/docs/api-reference/magento-api.updatecustomer.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [updateCustomer](./magento-api.updatecustomer.md) - -## updateCustomer variable - -Signature: - -```typescript -_default: (context: Context, input: CustomerUpdateInput, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.updatecustomeraddress.md b/docs/api-reference/magento-api.updatecustomeraddress.md deleted file mode 100644 index c85e1efba..000000000 --- a/docs/api-reference/magento-api.updatecustomeraddress.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [updateCustomerAddress](./magento-api.updatecustomeraddress.md) - -## updateCustomerAddress variable - -Signature: - -```typescript -_default: (context: Context, params: { - addressId: number; - input: CustomerAddressInput; -}, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.updatecustomeremail.md b/docs/api-reference/magento-api.updatecustomeremail.md deleted file mode 100644 index 5e98bb056..000000000 --- a/docs/api-reference/magento-api.updatecustomeremail.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [updateCustomerEmail](./magento-api.updatecustomeremail.md) - -## updateCustomerEmail variable - -Signature: - -```typescript -_default: (context: Context, input: UpdateCustomerEmailMutationVariables, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.upsellproduct.md b/docs/api-reference/magento-api.upsellproduct.md deleted file mode 100644 index fd7afdf32..000000000 --- a/docs/api-reference/magento-api.upsellproduct.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [upsellProduct](./magento-api.upsellproduct.md) - -## upsellProduct variable - -Signature: - -```typescript -_default: (context: Context, searchParams?: GetProductSearchParams, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.urlresolver.md b/docs/api-reference/magento-api.urlresolver.md deleted file mode 100644 index 6f25b5ad7..000000000 --- a/docs/api-reference/magento-api.urlresolver.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [urlResolver](./magento-api.urlresolver.md) - -## urlResolver variable - -Signature: - -```typescript -_default: (context: Context, url: string, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento-api.wishlist.md b/docs/api-reference/magento-api.wishlist.md deleted file mode 100644 index 3426b85dc..000000000 --- a/docs/api-reference/magento-api.wishlist.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento-api](./magento-api.md) > [wishlist](./magento-api.wishlist.md) - -## wishlist variable - -Signature: - -```typescript -_default: (context: Context, searchParams: WishlistQueryVariables, customQuery?: CustomQuery) => Promise> -``` diff --git a/docs/api-reference/magento.addressgetter.md b/docs/api-reference/magento.addressgetter.md deleted file mode 100644 index c430efc28..000000000 --- a/docs/api-reference/magento.addressgetter.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [addressGetter](./magento.addressgetter.md) - -## addressGetter variable - -Signature: - -```typescript -_default: AddressGetter -``` diff --git a/docs/api-reference/magento.cartgetters.md b/docs/api-reference/magento.cartgetters.md deleted file mode 100644 index e12b22a67..000000000 --- a/docs/api-reference/magento.cartgetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [cartGetters](./magento.cartgetters.md) - -## cartGetters variable - -Signature: - -```typescript -cartGetters: CartGetters -``` diff --git a/docs/api-reference/magento.categorygetters.md b/docs/api-reference/magento.categorygetters.md deleted file mode 100644 index 17f141718..000000000 --- a/docs/api-reference/magento.categorygetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [categoryGetters](./magento.categorygetters.md) - -## categoryGetters variable - -Signature: - -```typescript -categoryGetters: CategoryGetters -``` diff --git a/docs/api-reference/magento.checkoutgetters.md b/docs/api-reference/magento.checkoutgetters.md deleted file mode 100644 index ffc750bd1..000000000 --- a/docs/api-reference/magento.checkoutgetters.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [checkoutGetters](./magento.checkoutgetters.md) - -## checkoutGetters variable - -Signature: - -```typescript -checkoutGetters: { - getShippingMethodId: (shippingMethod: ShippingMethod) => string; - getShippingMethodName: (shippingMethod: ShippingMethod) => string; - getShippingMethodDescription: (shippingMethod: ShippingMethod) => string; - getFormattedPrice: (price: number) => string; - getShippingMethodPrice: (shippingMethod: ShippingMethod) => number; -} -``` diff --git a/docs/api-reference/magento.extendscopecontext.md b/docs/api-reference/magento.extendscopecontext.md deleted file mode 100644 index d48174f77..000000000 --- a/docs/api-reference/magento.extendscopecontext.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [extendScopeContext](./magento.extendscopecontext.md) - -## extendScopeContext variable - -Signature: - -```typescript -extendScopeContext: (scope: EffectScope, app: NuxtAppOptions) => void -``` diff --git a/docs/api-reference/magento.facetgetters.md b/docs/api-reference/magento.facetgetters.md deleted file mode 100644 index ec625c279..000000000 --- a/docs/api-reference/magento.facetgetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [facetGetters](./magento.facetgetters.md) - -## facetGetters variable - -Signature: - -```typescript -facetGetters: FacetsGetters -``` diff --git a/docs/api-reference/magento.forgotpasswordgetters.md b/docs/api-reference/magento.forgotpasswordgetters.md deleted file mode 100644 index 6c3bceb61..000000000 --- a/docs/api-reference/magento.forgotpasswordgetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [forgotPasswordGetters](./magento.forgotpasswordgetters.md) - -## forgotPasswordGetters variable - -Signature: - -```typescript -forgotPasswordGetters: ForgotPasswordGetters -``` diff --git a/docs/api-reference/magento.md b/docs/api-reference/magento.md deleted file mode 100644 index cfc052bdc..000000000 --- a/docs/api-reference/magento.md +++ /dev/null @@ -1,66 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) - -## magento package - -## Variables - -| Variable | Description | -| --- | --- | -| [addressGetter](./magento.addressgetter.md) | | -| [cartGetters](./magento.cartgetters.md) | | -| [categoryGetters](./magento.categorygetters.md) | | -| [checkoutGetters](./magento.checkoutgetters.md) | | -| [extendScopeContext](./magento.extendscopecontext.md) | | -| [facetGetters](./magento.facetgetters.md) | | -| [forgotPasswordGetters](./magento.forgotpasswordgetters.md) | | -| [orderGetters](./magento.ordergetters.md) | | -| [productGetters](./magento.productgetters.md) | | -| [reviewGetters](./magento.reviewgetters.md) | | -| [storeConfigGetters](./magento.storeconfiggetters.md) | | -| [storeGetters](./magento.storegetters.md) | | -| [useAddresses](./magento.useaddresses.md) | | -| [useBilling](./magento.usebilling.md) | | -| [useCart](./magento.usecart.md) | | -| [useCategory](./magento.usecategory.md) | | -| [useCategorySearch](./magento.usecategorysearch.md) | | -| [useConfig](./magento.useconfig.md) | | -| [useContent](./magento.usecontent.md) | | -| [useCountrySearch](./magento.usecountrysearch.md) | | -| [useCurrency](./magento.usecurrency.md) | | -| [useCustomMutation](./magento.usecustommutation.md) | | -| [useCustomQuery](./magento.usecustomquery.md) | | -| [useExternalCheckout](./magento.useexternalcheckout.md) | | -| [useFacet](./magento.usefacet.md) | | -| [useForgotPassword](./magento.useforgotpassword.md) | | -| [useGetShippingMethods](./magento.usegetshippingmethods.md) | | -| [useGuestUser](./magento.useguestuser.md) | | -| [useMakeOrder](./magento.usemakeorder.md) | | -| [useNewsletter](./magento.usenewsletter.md) | | -| [usePaymentProvider](./magento.usepaymentprovider.md) | | -| [useProduct](./magento.useproduct.md) | | -| [userAddressesGetters](./magento.useraddressesgetters.md) | | -| [userBillingGetters](./magento.userbillinggetters.md) | | -| [useRelatedProducts](./magento.userelatedproducts.md) | | -| [useReview](./magento.usereview.md) | | -| [userGetters](./magento.usergetters.md) | | -| [userShippingGetters](./magento.usershippinggetters.md) | | -| [useShipping](./magento.useshipping.md) | | -| [useShippingProvider](./magento.useshippingprovider.md) | | -| [useStore](./magento.usestore.md) | | -| [useUpsellProducts](./magento.useupsellproducts.md) | | -| [useUrlResolver](./magento.useurlresolver.md) | | -| [useUser](./magento.useuser.md) | | -| [useUserBilling](./magento.useuserbilling.md) | | -| [useUserOrder](./magento.useuserorder.md) | | -| [useUserShipping](./magento.useusershipping.md) | | -| [useWishlist](./magento.usewishlist.md) | | -| [wishlistGetters](./magento.wishlistgetters.md) | | - -## Type Aliases - -| Type Alias | Description | -| --- | --- | -| [WishlistProduct](./magento.wishlistproduct.md) | | - diff --git a/docs/api-reference/magento.ordergetters.md b/docs/api-reference/magento.ordergetters.md deleted file mode 100644 index 1a1c42776..000000000 --- a/docs/api-reference/magento.ordergetters.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [orderGetters](./magento.ordergetters.md) - -## orderGetters variable - -Signature: - -```typescript -orderGetters: { - getDate: (order: any) => string; - getId: (order: any) => string; - getStatus: (order: any) => string; - getPrice: (order: any) => number | null; - getItems: (order: any) => any[]; - getItemSku: (item: any) => string; - getItemName: (item: any) => string; - getItemQty: (item: any) => number; - getItemPrice: (item: any) => number; - getFormattedPrice: (price: number) => string; - getPagination: (orders: any) => AgnosticPagination; -} -``` diff --git a/docs/api-reference/magento.productgetters.md b/docs/api-reference/magento.productgetters.md deleted file mode 100644 index 25ffbc78a..000000000 --- a/docs/api-reference/magento.productgetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [productGetters](./magento.productgetters.md) - -## productGetters variable - -Signature: - -```typescript -productGetters: ProductGetters -``` diff --git a/docs/api-reference/magento.reviewgetters.md b/docs/api-reference/magento.reviewgetters.md deleted file mode 100644 index 13432a476..000000000 --- a/docs/api-reference/magento.reviewgetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [reviewGetters](./magento.reviewgetters.md) - -## reviewGetters variable - -Signature: - -```typescript -reviewGetters: MagentoReviewGetters -``` diff --git a/docs/api-reference/magento.storeconfiggetters.md b/docs/api-reference/magento.storeconfiggetters.md deleted file mode 100644 index 330fdddbd..000000000 --- a/docs/api-reference/magento.storeconfiggetters.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [storeConfigGetters](./magento.storeconfiggetters.md) - -## storeConfigGetters variable - -Signature: - -```typescript -storeConfigGetters: { - getCode: (config: StoreConfig) => string; - getTitle: (config: StoreConfig) => string; - getName: (config: StoreConfig) => string; - getCurrency: (config: StoreConfig) => string; - getLocale: (config: StoreConfig) => string; - allowGuestProductReview: (config: StoreConfig) => string; - enabledWishlist: (config: StoreConfig) => string; - getBaseMediaUrl: (config: StoreConfig) => string; - getLogoSrc: (config: StoreConfig) => string; - getLogoWidth: (config: StoreConfig) => number; - getLogoHeight: (config: StoreConfig) => number; - getLogoAlt: (config: StoreConfig) => string; -} -``` diff --git a/docs/api-reference/magento.storegetters.md b/docs/api-reference/magento.storegetters.md deleted file mode 100644 index 2bcceb195..000000000 --- a/docs/api-reference/magento.storegetters.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [storeGetters](./magento.storegetters.md) - -## storeGetters variable - -Signature: - -```typescript -storeGetters: { - getItems: typeof getItems; - getSelected: typeof getSelected; -} -``` diff --git a/docs/api-reference/magento.useaddresses.md b/docs/api-reference/magento.useaddresses.md deleted file mode 100644 index 68b93915b..000000000 --- a/docs/api-reference/magento.useaddresses.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useAddresses](./magento.useaddresses.md) - -## useAddresses variable - -Signature: - -```typescript -_default: () => import("../../types/composables").UseAddresses -``` diff --git a/docs/api-reference/magento.usebilling.md b/docs/api-reference/magento.usebilling.md deleted file mode 100644 index 31fd5f80e..000000000 --- a/docs/api-reference/magento.usebilling.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useBilling](./magento.usebilling.md) - -## useBilling variable - -Signature: - -```typescript -_default: () => import("@vue-storefront/core").UseBilling -``` diff --git a/docs/api-reference/magento.usecart.md b/docs/api-reference/magento.usecart.md deleted file mode 100644 index 90ec30f88..000000000 --- a/docs/api-reference/magento.usecart.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useCart](./magento.usecart.md) - -## useCart variable - -Signature: - -```typescript -_default: () => import("../../factories/useCartFactory").UseCart -``` diff --git a/docs/api-reference/magento.usecategory.md b/docs/api-reference/magento.usecategory.md deleted file mode 100644 index ec7e19664..000000000 --- a/docs/api-reference/magento.usecategory.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useCategory](./magento.usecategory.md) - -## useCategory variable - -Signature: - -```typescript -_default: (id: string) => import("@vue-storefront/core").UseCategory, any> -``` diff --git a/docs/api-reference/magento.usecategorysearch.md b/docs/api-reference/magento.usecategorysearch.md deleted file mode 100644 index 4d60f3d06..000000000 --- a/docs/api-reference/magento.usecategorysearch.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useCategorySearch](./magento.usecategorysearch.md) - -## useCategorySearch variable - -Signature: - -```typescript -useCategorySearch: (cacheId?: string) => UseCategorySearch -``` diff --git a/docs/api-reference/magento.useconfig.md b/docs/api-reference/magento.useconfig.md deleted file mode 100644 index e11314523..000000000 --- a/docs/api-reference/magento.useconfig.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useConfig](./magento.useconfig.md) - -## useConfig variable - -Signature: - -```typescript -useConfig: (cacheId?: string) => UseConfig -``` diff --git a/docs/api-reference/magento.usecontent.md b/docs/api-reference/magento.usecontent.md deleted file mode 100644 index 817ec31df..000000000 --- a/docs/api-reference/magento.usecontent.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useContent](./magento.usecontent.md) - -## useContent variable - -Signature: - -```typescript -_default: (ssrKey?: string) => import("../../types/composables").UseContent -``` diff --git a/docs/api-reference/magento.usecountrysearch.md b/docs/api-reference/magento.usecountrysearch.md deleted file mode 100644 index 5c3da0660..000000000 --- a/docs/api-reference/magento.usecountrysearch.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useCountrySearch](./magento.usecountrysearch.md) - -## useCountrySearch variable - -Signature: - -```typescript -useCountrySearch: (cacheId?: string) => UseCountrySearch -``` diff --git a/docs/api-reference/magento.usecurrency.md b/docs/api-reference/magento.usecurrency.md deleted file mode 100644 index 9f059eac5..000000000 --- a/docs/api-reference/magento.usecurrency.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useCurrency](./magento.usecurrency.md) - -## useCurrency variable - -Signature: - -```typescript -useCurrency: () => UseCurrency -``` diff --git a/docs/api-reference/magento.usecustommutation.md b/docs/api-reference/magento.usecustommutation.md deleted file mode 100644 index b17e7e42d..000000000 --- a/docs/api-reference/magento.usecustommutation.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useCustomMutation](./magento.usecustommutation.md) - -## useCustomMutation variable - -Signature: - -```typescript -_default: (ssrKey?: string) => import("../../types/composables").UseCustomMutation, Record>, any> -``` diff --git a/docs/api-reference/magento.usecustomquery.md b/docs/api-reference/magento.usecustomquery.md deleted file mode 100644 index 9388a68c5..000000000 --- a/docs/api-reference/magento.usecustomquery.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useCustomQuery](./magento.usecustomquery.md) - -## useCustomQuery variable - -Signature: - -```typescript -_default: (ssrKey?: string) => import("../../types/composables").UseCustomQuery, any> -``` diff --git a/docs/api-reference/magento.useexternalcheckout.md b/docs/api-reference/magento.useexternalcheckout.md deleted file mode 100644 index 85e1d14c5..000000000 --- a/docs/api-reference/magento.useexternalcheckout.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useExternalCheckout](./magento.useexternalcheckout.md) - -## useExternalCheckout variable - -Signature: - -```typescript -_default: (ssrKey?: string) => import("../../types/composables").UseExternalCheckout -``` diff --git a/docs/api-reference/magento.usefacet.md b/docs/api-reference/magento.usefacet.md deleted file mode 100644 index a16080f29..000000000 --- a/docs/api-reference/magento.usefacet.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useFacet](./magento.usefacet.md) - -## useFacet variable - -Signature: - -```typescript -_default: (id?: string) => import("@vue-storefront/core").UseFacet -``` diff --git a/docs/api-reference/magento.useforgotpassword.md b/docs/api-reference/magento.useforgotpassword.md deleted file mode 100644 index 2cee23001..000000000 --- a/docs/api-reference/magento.useforgotpassword.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useForgotPassword](./magento.useforgotpassword.md) - -## useForgotPassword variable - -Signature: - -```typescript -useForgotPassword: () => import("@vue-storefront/core").UseForgotPassword -``` diff --git a/docs/api-reference/magento.usegetshippingmethods.md b/docs/api-reference/magento.usegetshippingmethods.md deleted file mode 100644 index 9a98d2822..000000000 --- a/docs/api-reference/magento.usegetshippingmethods.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useGetShippingMethods](./magento.usegetshippingmethods.md) - -## useGetShippingMethods variable - -Signature: - -```typescript -useGetShippingMethods: (cacheId?: string) => UseGetShippingMethods -``` diff --git a/docs/api-reference/magento.useguestuser.md b/docs/api-reference/magento.useguestuser.md deleted file mode 100644 index bf429d205..000000000 --- a/docs/api-reference/magento.useguestuser.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useGuestUser](./magento.useguestuser.md) - -## useGuestUser variable - -Signature: - -```typescript -_default: () => import("../../types/composables").UseGuestUser -``` diff --git a/docs/api-reference/magento.usemakeorder.md b/docs/api-reference/magento.usemakeorder.md deleted file mode 100644 index 45cae2d45..000000000 --- a/docs/api-reference/magento.usemakeorder.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useMakeOrder](./magento.usemakeorder.md) - -## useMakeOrder variable - -Signature: - -```typescript -useMakeOrder: () => UseMakeOrder -``` diff --git a/docs/api-reference/magento.usenewsletter.md b/docs/api-reference/magento.usenewsletter.md deleted file mode 100644 index 9761b9a2c..000000000 --- a/docs/api-reference/magento.usenewsletter.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useNewsletter](./magento.usenewsletter.md) - -## useNewsletter variable - -Signature: - -```typescript -_default: () => import("../../types/composables").UseNewsletter -``` diff --git a/docs/api-reference/magento.usepaymentprovider.md b/docs/api-reference/magento.usepaymentprovider.md deleted file mode 100644 index 4df5f331d..000000000 --- a/docs/api-reference/magento.usepaymentprovider.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [usePaymentProvider](./magento.usepaymentprovider.md) - -## usePaymentProvider variable - -Signature: - -```typescript -_default: () => import("../../types/composables").UsePaymentProvider -``` diff --git a/docs/api-reference/magento.useproduct.md b/docs/api-reference/magento.useproduct.md deleted file mode 100644 index 1dbad2b2d..000000000 --- a/docs/api-reference/magento.useproduct.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useProduct](./magento.useproduct.md) - -## useProduct variable - -Signature: - -```typescript -useProduct: (cacheId?: string) => UseProduct -``` diff --git a/docs/api-reference/magento.useraddressesgetters.md b/docs/api-reference/magento.useraddressesgetters.md deleted file mode 100644 index ede441886..000000000 --- a/docs/api-reference/magento.useraddressesgetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [userAddressesGetters](./magento.useraddressesgetters.md) - -## userAddressesGetters variable - -Signature: - -```typescript -userAddressesGetters: UserAddressesGetters -``` diff --git a/docs/api-reference/magento.userbillinggetters.md b/docs/api-reference/magento.userbillinggetters.md deleted file mode 100644 index 4d32a815e..000000000 --- a/docs/api-reference/magento.userbillinggetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [userBillingGetters](./magento.userbillinggetters.md) - -## userBillingGetters variable - -Signature: - -```typescript -userBillingGetters: UserBillingGetters -``` diff --git a/docs/api-reference/magento.userelatedproducts.md b/docs/api-reference/magento.userelatedproducts.md deleted file mode 100644 index c7747afe1..000000000 --- a/docs/api-reference/magento.userelatedproducts.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useRelatedProducts](./magento.userelatedproducts.md) - -## useRelatedProducts variable - -Signature: - -```typescript -useRelatedProducts: (cacheId?: string) => UseRelatedProducts -``` diff --git a/docs/api-reference/magento.usereview.md b/docs/api-reference/magento.usereview.md deleted file mode 100644 index e5caf33b3..000000000 --- a/docs/api-reference/magento.usereview.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useReview](./magento.usereview.md) - -## useReview variable - -Signature: - -```typescript -_default: (id: string) => import("../../types/composables").UseReview, ComposableFunctionArgs, CreateProductReviewInput, ProductReviewRatingMetadata, any> -``` diff --git a/docs/api-reference/magento.usergetters.md b/docs/api-reference/magento.usergetters.md deleted file mode 100644 index 44e4681e3..000000000 --- a/docs/api-reference/magento.usergetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [userGetters](./magento.usergetters.md) - -## userGetters variable - -Signature: - -```typescript -userGetters: BaseUserGetters -``` diff --git a/docs/api-reference/magento.usershippinggetters.md b/docs/api-reference/magento.usershippinggetters.md deleted file mode 100644 index f997a1dd2..000000000 --- a/docs/api-reference/magento.usershippinggetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [userShippingGetters](./magento.usershippinggetters.md) - -## userShippingGetters variable - -Signature: - -```typescript -userShippingGetters: UserShippingGetters -``` diff --git a/docs/api-reference/magento.useshipping.md b/docs/api-reference/magento.useshipping.md deleted file mode 100644 index 32917d2c5..000000000 --- a/docs/api-reference/magento.useshipping.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useShipping](./magento.useshipping.md) - -## useShipping variable - -Signature: - -```typescript -_default: () => import("@vue-storefront/core").UseShipping -``` diff --git a/docs/api-reference/magento.useshippingprovider.md b/docs/api-reference/magento.useshippingprovider.md deleted file mode 100644 index d60d4c7c7..000000000 --- a/docs/api-reference/magento.useshippingprovider.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useShippingProvider](./magento.useshippingprovider.md) - -## useShippingProvider variable - -Signature: - -```typescript -_default: () => import("@vue-storefront/core").UseShippingProvider -``` diff --git a/docs/api-reference/magento.usestore.md b/docs/api-reference/magento.usestore.md deleted file mode 100644 index 083842f2c..000000000 --- a/docs/api-reference/magento.usestore.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useStore](./magento.usestore.md) - -## useStore variable - -Signature: - -```typescript -useStore: () => UseStore -``` diff --git a/docs/api-reference/magento.useupsellproducts.md b/docs/api-reference/magento.useupsellproducts.md deleted file mode 100644 index 065ef598b..000000000 --- a/docs/api-reference/magento.useupsellproducts.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useUpsellProducts](./magento.useupsellproducts.md) - -## useUpsellProducts variable - -Signature: - -```typescript -useUpsellProducts: (cacheId?: string) => UseUpsellProducts -``` diff --git a/docs/api-reference/magento.useurlresolver.md b/docs/api-reference/magento.useurlresolver.md deleted file mode 100644 index 9932d614c..000000000 --- a/docs/api-reference/magento.useurlresolver.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useUrlResolver](./magento.useurlresolver.md) - -## useUrlResolver variable - -Signature: - -```typescript -useUrlResolver: (cacheId?: string) => UseUrlResolver -``` diff --git a/docs/api-reference/magento.useuser.md b/docs/api-reference/magento.useuser.md deleted file mode 100644 index c876821f9..000000000 --- a/docs/api-reference/magento.useuser.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useUser](./magento.useuser.md) - -## useUser variable - -Signature: - -```typescript -_default: () => import("@vue-storefront/core").UseUser, any> -``` diff --git a/docs/api-reference/magento.useuserbilling.md b/docs/api-reference/magento.useuserbilling.md deleted file mode 100644 index 1644b2ffe..000000000 --- a/docs/api-reference/magento.useuserbilling.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useUserBilling](./magento.useuserbilling.md) - -## useUserBilling variable - -Signature: - -```typescript -_default: () => import("@vue-storefront/core").UseUserBilling -``` diff --git a/docs/api-reference/magento.useuserorder.md b/docs/api-reference/magento.useuserorder.md deleted file mode 100644 index 064427798..000000000 --- a/docs/api-reference/magento.useuserorder.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useUserOrder](./magento.useuserorder.md) - -## useUserOrder variable - -Signature: - -```typescript -_default: () => import("@vue-storefront/core").UseUserOrder -``` diff --git a/docs/api-reference/magento.useusershipping.md b/docs/api-reference/magento.useusershipping.md deleted file mode 100644 index b9d129a5a..000000000 --- a/docs/api-reference/magento.useusershipping.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useUserShipping](./magento.useusershipping.md) - -## useUserShipping variable - -Signature: - -```typescript -_default: () => import("@vue-storefront/core").UseUserShipping -``` diff --git a/docs/api-reference/magento.usewishlist.md b/docs/api-reference/magento.usewishlist.md deleted file mode 100644 index cc5579f85..000000000 --- a/docs/api-reference/magento.usewishlist.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [useWishlist](./magento.usewishlist.md) - -## useWishlist variable - -Signature: - -```typescript -_default: (ssrKey?: string) => import("../../types/composables").UseWishlist -``` diff --git a/docs/api-reference/magento.wishlistgetters.md b/docs/api-reference/magento.wishlistgetters.md deleted file mode 100644 index 003fc1267..000000000 --- a/docs/api-reference/magento.wishlistgetters.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [wishlistGetters](./magento.wishlistgetters.md) - -## wishlistGetters variable - -Signature: - -```typescript -wishlistGetters: WishlistGetters -``` diff --git a/docs/api-reference/magento.wishlistproduct.md b/docs/api-reference/magento.wishlistproduct.md deleted file mode 100644 index f189919f8..000000000 --- a/docs/api-reference/magento.wishlistproduct.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@vue-storefront/magento](./magento.md) > [WishlistProduct](./magento.wishlistproduct.md) - -## WishlistProduct type - -Signature: - -```typescript -export declare type WishlistProduct = WishlistQuery['customer']['wishlists'][0]['items_v2']['items'][0] & { - variant: any; -}; -``` diff --git a/docs/guide/api-client/reference.md b/docs/guide/api-client/reference.md new file mode 100644 index 000000000..d95cb5d59 --- /dev/null +++ b/docs/guide/api-client/reference.md @@ -0,0 +1,13 @@ +# Api methods + +## cmsBlocks + +The cmsBlocks API method allows loading information about CMS blocks. + +[The cmsBlocks API method reference](/api-reference/magento-api.cmsblocks.html) + +## cmsPage + +The cmsPage API method allows loading information about CMS page. + +[The cmsPage API method reference](/api-reference/magento-api.cmspage.html) diff --git a/docs/guide/composables/use-addresses.md b/docs/guide/composables/use-addresses.md deleted file mode 100644 index 5f5662cc5..000000000 --- a/docs/guide/composables/use-addresses.md +++ /dev/null @@ -1,29 +0,0 @@ -# useAddresses - -`useAddresses`: - -## API -```typescript -export interface UseAddresses extends Composable { - error: ComputedProperty; - loading: ComputedProperty; - addresses: ComputedProperty; - load: (loadParams?: LOAD_ADDRESS_PARAMS) => Promise, - save: (saveParams: SAVE_ADDRESS_PARAMS) => Promise, - remove: (removeParams: REMOVE_ADDRESS_PARAMS) => Promise, - update: (updateParams: UPDATE_ADDRESS_PARAMS) => Promise, -} -``` - -* `` - - -## Example - -```javascript -``` diff --git a/docs/guide/composables/use-billing.md b/docs/guide/composables/use-billing.md deleted file mode 100644 index ccf376c73..000000000 --- a/docs/guide/composables/use-billing.md +++ /dev/null @@ -1,113 +0,0 @@ -# useBilling - -## Features -`useBilling` composable can be used to: -* fetch existing billing addresses, -* submit new billing addresses, -* modify and delete existing billing addresses. - -## API - -### `load` -Function that takes in `CustomQuery` as optional params and gets the `billing` accordingly - -### `billing` -Returns `billing` as a `computed` property -```typescript -// packages/composables/src/composables/useBilling/index.ts -export default useBillingFactory(factoryParams); - -// packages/api-client/src/types/GraphQL.ts -interface BillingCartAddress { - city: Scalars['String']; - company?: Maybe; - country: CartAddressCountry; - firstname: Scalars['String']; - lastname: Scalars['String']; - postcode?: Maybe; - region?: Maybe; - street: Array>; - telephone: Scalars['String']; -} -``` - -### `save` -Saves new address - -### `loading` -Returns the `loading` state of `search` - -### `error` -reactive object containing the error message, if search failed for any reason. - -## Getters -* `getAddresses` - returns list of billing addresses. -* `getDefault` - returns a default billing address. -* `getTotal` - returns total number of billing addresses user has. -* `getId` - returns id from an individual address. -* `getPostCode` - returns post code from an individual address. -* `getStreetName` - returns street name from an individual address. -* `getStreetNumber` - returns street number from an individual address. -* `getCity` - returns city name from an individual address. -* `getFirstName` - returns first name from an individual address. -* `getLastName` - returns last name from an individual address. -* `getCountry` - returns country name from an individual address. -* `getPhone` - return phone number from an individual address. -* `getEmail` - returns e-mail address from an individual address. -* `getProvince` - returns province (state) from an individual address. -* `getCompanyName` - returns company name from an individual address. -* `getTaxNumber` - returns tax number from an individual address. -* `getApartmentNumber` - returns apartment number from an individual address. -* `isDefault` - return information if address is current default. - -```typescript -interface UserBillingGetters { - getAddresses: (billing, criteria?: Record) => any[]; - getDefault: (billing) => any; - getTotal: (billing) => number; - getPostCode: (address) => string; - getStreetName: (address) => string; - getStreetNumber: (address) => string | number; - getCity: (address) => string; - getFirstName: (address) => string; - getLastName: (address) => string; - getCountry: (address) => string; - getPhone: (address) => string; - getEmail: (address) => string; - getProvince: (address) => string; - getCompanyName: (address) => string; - getTaxNumber: (address) => string; - getId: (address) => string; - getApartmentNumber: (address) => string | number; - isDefault: (address) => boolean; -} -``` - -## Example - -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useBilling, userBillingGetters } from '@vue-storefront/magento'; - -export default { - setup() { - const { - billing, - load, - addAddress, - deleteAddress, - updateAddress - } = useBilling(); - - // If you're using Nuxt or any other framework for Universal Vue apps - onSSR(async () => { - await load(); - }); - - return { - billing: computed(() => userBillingGetters.getAddresses(billing.value)), - userBillingGetters - }; - } -}; -``` diff --git a/docs/guide/composables/use-cart.md b/docs/guide/composables/use-cart.md deleted file mode 100644 index df12e35b3..000000000 --- a/docs/guide/composables/use-cart.md +++ /dev/null @@ -1,186 +0,0 @@ -# useCart - -## Features -`useCart` composable can be used to: -* load cart information, -* add, update and remove items in the cart, -* applying and removing coupons, -* checking if product is already added to the cart. - -## API -```typescript -interface UseCart { - cart: ComputedProperty; - setCart(cart: Cart): void; - addItem(params: { - product: Product; - quantity: number; - customQuery?: CustomQuery; - }): Promise; - isInCart: ({ product: Product }: { - product: any; - }) => boolean; - removeItem(params: { - product: CartItem; - customQuery?: CustomQuery; - }): Promise; - updateItemQty(params: { - product: CartItem; - quantity?: number; - customQuery?: CustomQuery; - }): Promise; - clear(): Promise; - applyCoupon(params: { - couponCode: string; - customQuery?: CustomQuery; - }): Promise; - removeCoupon(params: { - coupon: Coupon; - customQuery?: CustomQuery; - }): Promise; - load(): Promise; - load(params: { - customQuery?: CustomQuery; - }): Promise; - error: ComputedProperty; - loading: ComputedProperty; -} - -export interface Cart { - /** - * An array of coupons that have been applied to the cart - * @deprecated Use applied_coupons instead - */ - applied_coupon?: Maybe; - /** An array of `AppliedCoupon` objects. Each object contains the `code` text attribute, which specifies the coupon code */ - applied_coupons?: Maybe>>; - /** Available payment methods */ - available_payment_methods?: Maybe>>; - billing_address?: Maybe; - email?: Maybe; - /** The entered gift message for the cart */ - gift_message?: Maybe; - /** The unique ID for a `Cart` object */ - id: Scalars['ID']; - is_virtual: Scalars['Boolean']; - items?: Maybe>>; - prices?: Maybe; - selected_payment_method?: Maybe; - shipping_addresses: Array>; - total_quantity: Scalars['Float']; -} - -export interface CartItem { - prices?: Maybe; - product: ProductInterface; - quantity: Scalars['Float']; - /** The unique ID for a `CartItemInterface` object */ - uid: Scalars['ID']; -} - -export interface Coupon { - code: Scalars['String']; -} - -``` -> For more information on [Product interface](use-product) visit the dedicated documentation. - - -### `cart` -Returns the Items in the Cart as a `computed` property - -### `setCart` -set new Cart - -### `addItem` -Function that takes in a `product` and its `quantity` and adds it to the cart - -### `isInCart` -Function that takes in a `product` and returns `true` or `false` - -### `removeItem` -Function that takes in a `product` and removes it from the `cart` - -### `updateItemQty` -Function that takes in a `product` and its new `quantaty` and updates it accordingly - -### `clear` -Function that clears cart - -### `applyCoupon` -Function that takes in a `coupon` and applies it to the cart - -### `removeCoupon` -Function that removes all applied coupons - -### `load` -Function that loads the current `cart` - -### `error` -reactive object containing the error message, if some properties failed for any reason. - -### `loading` -a reactive object containing information about loading state of the cart. - - -## Getters - -````typescript -interface CartGetters { - getItems: (cart: Cart) => CartItem[]; - getItemName: (cartItem: CartItem) => string; - getItemImage: (cartItem: CartItem) => string; - getItemPrice: (cartItem: CartItem) => AgnosticPrice; - getItemQty: (cartItem: CartItem) => number; - getItemAttributes: ( - cartItem: CartItem, - _filterByAttributeName?: Array, - ) => Record; - getItemSku: (cartItem: CartItem) => string; - getTotals: (cart: Cart) => AgnosticTotals; - getShippingPrice: (cart: Cart) => number; - getTotalItems: (cart: Cart) => number; - getFormattedPrice: (price: number) => string; - getCoupons: (cart: Cart) => AgnosticCoupon[]; - getDiscounts: (cart: Cart) => AgnosticDiscount[]; -} -```` - -* `getItems` - returns all items from cart. -* `getItemName` - returns product name. -* `getItemImage` - returns product image. -* `getItemPrice` - returns product price. -* `getItemQty` - returns product quantity. -* `getItemAttributes` - returns product attribute. -* `getItemSku` - returns product SKU. -* `getTotals` - returns cart totals. -* `getShippingPrice` - returns current shipping price. -* `getTotalItems` - returns products amount. -* `getFormattedPrice` - returns product price with currency sign. -* `getCoupons` - returns applied coupons. -* `getDiscounts` - returns all discounts. - -## Example - -```javascript -import { useCart, cartGetters } from '@vue-storefront/magento'; -import { onSSR } from '@vue-storefront/core' - -export default { - setup () { - const { cart, removeItem, updateItemQty, load } = useCart(); - - onSSR(async () => { - await load(); - }) - - return { - removeItem, - updateItemQty, - products: computed(() => cartGetters.getItems(cart.value)), - totals: computed(() => cartGetters.getTotals(cart.value)), - totalItems: computed(() => cartGetters.getTotalItems(cart.value)) - } - } -} -``` diff --git a/docs/guide/composables/use-category-search.md b/docs/guide/composables/use-category-search.md deleted file mode 100644 index 6808916d3..000000000 --- a/docs/guide/composables/use-category-search.md +++ /dev/null @@ -1,63 +0,0 @@ -# useCategorySearch - -## Features -`useCategorySearch` composable is responsible for fetching a list of categories based on search term provided. A common usage scenario for this composable is navigation subtrees. - -## API -The `useCategorySearch` composable implements custom factory `useCategorySearchFactory` located in `packages/composables/src/factories/useCategorySearchFactory.ts` and returns `UseCategorySearch` interface: - -```typescript -export interface UseCategorySearch { - search: (params: { term: string }) => Promise; - result: ComputedProperty; - error: ComputedProperty; - loading: ComputedProperty; -} - -export interface UseCategorySearchErrors { - search: Error; -} -``` -> For more information on [Category interface](use-category) visit the dedicated documentation. - -### `search` -Function that takes `term` as search param and gets the `categories` accordingly - -### `result` -Returns an array of categories fetched by `search` method as a `computed` property. -See [useCategory](use-category.html) for more information on `categories` interface - -### `loading` -Returns the current state of `search` as `computed` boolean property - -### `error` -Reactive object containing the error message, if search failed for any reason. - -## Example -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useCategorySearch } from '@vue-storefront/magento'; - -export default { - setup () { - const { - loading, - error, - result: categories, - search: categoriesSearch, - } = useCategorySearch('AppHeader:Categories'); - - onSSR(async () => { - await categoriesSearch({ - term: 'value', - }); - }); - - return { - categories, - loading, - error, - } - } -} -``` diff --git a/docs/guide/composables/use-category.md b/docs/guide/composables/use-category.md deleted file mode 100644 index 51c7a603e..000000000 --- a/docs/guide/composables/use-category.md +++ /dev/null @@ -1,142 +0,0 @@ -# useCategory - -## Features -`useCategory` composable is responsible for fetching a list of categories. A common usage scenario for this composable is navigation. - -## API -```typescript -interface UseCategory { - categories: ComputedProperty; - search(params: ComposableFunctionArgs): Promise; - loading: ComputedProperty; - error: ComputedProperty; -} - -export type CategoryListQueryVariables = Exact<{ [key: string]: never; }>; - -export interface Category { - available_sort_by?: Maybe>>; - /** Breadcrumbs, parent categories info. */ - breadcrumbs?: Maybe>>; - /** Relative canonical URL. This value is returned only if the system setting 'Use Canonical Link Meta Tag For Categories' is enabled */ - canonical_url?: Maybe; - /** Child categories tree. */ - children?: Maybe>>; - children_count?: Maybe; - /** Category CMS Block. */ - cms_block?: Maybe; - /** - * Timestamp indicating when the category was created. - * @deprecated The field should not be used on the storefront. - */ - created_at?: Maybe; - custom_layout_update_file?: Maybe; - /** The attribute to use for sorting. */ - default_sort_by?: Maybe; - /** An optional description of the category. */ - description?: Maybe; - display_mode?: Maybe; - filter_price_range?: Maybe; - /** - * An ID that uniquely identifies the category. - * @deprecated Use the `uid` argument instead. - */ - id?: Maybe; - image?: Maybe; - include_in_menu?: Maybe; - is_anchor?: Maybe; - landing_page?: Maybe; - /** Indicates the depth of the category within the tree. */ - level?: Maybe; - meta_description?: Maybe; - meta_keywords?: Maybe; - meta_title?: Maybe; - /** The display name of the category. */ - name?: Maybe; - /** Category Path. */ - path?: Maybe; - /** Category path in store. */ - path_in_store?: Maybe; - /** The position of the category relative to other categories at the same level in tree. */ - position?: Maybe; - /** The number of products in the category that are marked as visible. By default, in complex products, parent products are visible, but their child products are not. */ - product_count?: Maybe; - /** The list of products assigned to the category. */ - products?: Maybe; - /** The unique ID for a `CategoryInterface` object. */ - uid: Scalars['ID']; - /** - * Timestamp indicating when the category was updated. - * @deprecated The field should not be used on the storefront. - */ - updated_at?: Maybe; - /** The url key assigned to the category. */ - url_key?: Maybe; - /** The url path assigned to the category. */ - url_path?: Maybe; - /** The part of the category URL that is appended after the url key */ - url_suffix?: Maybe; -} -``` - -### `search` -Function that takes `CategoryListQueryVariables`as optional param and gets the `categories` accordingly - -### `categories` -Returns an array of categories fetched by `search` method as a `computed` property. - -### `loading` -Returns the current state of `search` as `computed` boolean property - -### `error` -Reactive object containing the error message, if search failed for any reason. - -## Getters -````typescript -interface CategoryGetters { - getTree: (category: Category) => AgnosticCategoryTree | null; - getBreadcrumbs: (category: Category) => AgnosticBreadcrumb[]; - getCategoryTree?: ( - category: Category, - currentCategory: string, - withProducts: boolean, - ) => AgnosticCategoryTree | null; -} - -export interface AgnosticBreadcrumb { - text: string; - link: string; -} - -export interface AgnosticCategoryTree { - label: string; - slug?: string; - items: AgnosticCategoryTree[]; - isCurrent: boolean; - count?: number; - [x: string]: unknown; -} -```` -## Example - -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useCategory } from '@vue-storefront/magento'; - -export default { - setup () { - const { categories, search, loading } = useCategory('AppHeader:Categories'); - - onSSR(async () => { - await search({ - pageSize: 100, - }); - }); - - return { - categories, - loading - } - } -} -``` diff --git a/docs/guide/composables/use-config.md b/docs/guide/composables/use-config.md deleted file mode 100644 index c48f7288e..000000000 --- a/docs/guide/composables/use-config.md +++ /dev/null @@ -1,209 +0,0 @@ -# useConfig - -## Features -`useConfig` composable is responsible, as its name suggests, for interactions with the configuration in your eCommerce. - -## API -The `useConfig` composable implements custom factory `useConfigFactory` located in `packages/composables/src/factories/useConfigFactory.ts` and returns `UseConfig` interface: -```typescript -interface UseConfig { - config: ComputedRef; - loadConfig: () => Promise; - loading: ComputedRef; -} - -export interface StoreConfig { - /** Footer Miscellaneous HTML */ - absolute_footer?: Maybe; - /** Indicates whether guest users can write product reviews. Possible values: 1 (Yes) and 0 (No) */ - allow_guests_to_write_product_reviews?: Maybe; - /** The value of the Allow Gift Messages for Order Items option */ - allow_items?: Maybe; - /** The value of the Allow Gift Messages on Order Level option */ - allow_order?: Maybe; - /** Enable autocomplete on login and forgot password forms */ - autocomplete_on_storefront?: Maybe; - /** Base currency code */ - base_currency_code?: Maybe; - /** Base link URL for the store */ - base_link_url?: Maybe; - /** Base media URL for the store */ - base_media_url?: Maybe; - /** Base static URL for the store */ - base_static_url?: Maybe; - /** Base URL for the store */ - base_url?: Maybe; - /** Braintree cc vault status. */ - braintree_cc_vault_active?: Maybe; - /** Default Sort By. */ - catalog_default_sort_by?: Maybe; - /** Corresponds to the 'Display Prices In Product Lists' field. It indicates how FPT information is displayed on category pages */ - category_fixed_product_tax_display_setting?: Maybe; - /** Category URL Suffix. */ - category_url_suffix?: Maybe; - /** CMS Home Page */ - cms_home_page?: Maybe; - /** CMS No Cookies Page */ - cms_no_cookies?: Maybe; - /** CMS No Route Page */ - cms_no_route?: Maybe; - /** - * A code assigned to the store to identify it - * @deprecated Use `store_code` instead. - */ - code?: Maybe; - /** The configuration setting determines which thumbnail should be used in the cart for configurable products. */ - configurable_thumbnail_source?: Maybe; - /** Copyright */ - copyright?: Maybe; - /** Default Meta Description */ - default_description?: Maybe; - /** Default display currency code */ - default_display_currency_code?: Maybe; - /** Default Meta Keywords */ - default_keywords?: Maybe; - /** Default Page Title */ - default_title?: Maybe; - /** Display Demo Store Notice */ - demonotice?: Maybe; - /** Default Web URL */ - front?: Maybe; - /** Products per Page on Grid Default Value. */ - grid_per_page?: Maybe; - /** Products per Page on Grid Allowed Values. */ - grid_per_page_values?: Maybe; - /** Scripts and Style Sheets */ - head_includes?: Maybe; - /** Favicon Icon */ - head_shortcut_icon?: Maybe; - /** Logo Image */ - header_logo_src?: Maybe; - /** - * The ID number assigned to the store - * @deprecated Use `store_code` instead. - */ - id?: Maybe; - /** Indicates whether the store view has been designated as the default within the store group */ - is_default_store?: Maybe; - /** Indicates whether the store group has been designated as the default within the website */ - is_default_store_group?: Maybe; - /** List Mode. */ - list_mode?: Maybe; - /** Products per Page on List Default Value. */ - list_per_page?: Maybe; - /** Products per Page on List Allowed Values. */ - list_per_page_values?: Maybe; - /** Store locale */ - locale?: Maybe; - /** Logo Image Alt */ - logo_alt?: Maybe; - /** Logo Attribute Height */ - logo_height?: Maybe; - /** Logo Attribute Width */ - logo_width?: Maybe; - /** Indicates whether wishlists are enabled (1) or disabled (0) */ - magento_wishlist_general_is_enabled?: Maybe; - /** The minimum number of characters required for a valid password. */ - minimum_password_length?: Maybe; - /** Default No-route URL */ - no_route?: Maybe; - /** Payflow Pro vault status. */ - payment_payflowpro_cc_vault_active?: Maybe; - /** Corresponds to the 'Display Prices On Product View Page' field. It indicates how FPT information is displayed on product pages */ - product_fixed_product_tax_display_setting?: Maybe; - /** Indicates whether product reviews are enabled. Possible values: 1 (Yes) and 0 (No) */ - product_reviews_enabled?: Maybe; - /** Product URL Suffix. */ - product_url_suffix?: Maybe; - /** The number of different character classes required in a password (lowercase, uppercase, digits, special characters). */ - required_character_classes_number?: Maybe; - /** - * The ID of the root category - * @deprecated Use `root_category_uid` instead - */ - root_category_id?: Maybe; - /** The unique ID for a `CategoryInterface` object. */ - root_category_uid?: Maybe; - /** Corresponds to the 'Display Prices In Sales Modules' field. It indicates how FPT information is displayed on cart, checkout, and order pages */ - sales_fixed_product_tax_display_setting?: Maybe; - /** Secure base link URL for the store */ - secure_base_link_url?: Maybe; - /** Secure base media URL for the store */ - secure_base_media_url?: Maybe; - /** Secure base static URL for the store */ - secure_base_static_url?: Maybe; - /** Secure base URL for the store */ - secure_base_url?: Maybe; - /** Email to a Friend configuration. */ - send_friend?: Maybe; - /** Show Breadcrumbs for CMS Pages */ - show_cms_breadcrumbs?: Maybe; - /** The unique ID of the store view. In the Admin, this is called the Store View Code. When making a GraphQL call, assign this value to the `Store` header to provide the scope */ - store_code?: Maybe; - /** The unique ID assigned to the store group. In the Admin, this is called the Store Name */ - store_group_code?: Maybe; - /** The label assigned to the store group */ - store_group_name?: Maybe; - /** The label assigned to the store view */ - store_name?: Maybe; - /** The store view sort order */ - store_sort_order?: Maybe; - /** Timezone of the store */ - timezone?: Maybe; - /** Page Title Prefix */ - title_prefix?: Maybe; - /** Page Title Separator. */ - title_separator?: Maybe; - /** Page Title Suffix */ - title_suffix?: Maybe; - /** The configuration determines if the store code should be used in the URL */ - use_store_in_url?: Maybe; - /** The unique ID for the website */ - website_code?: Maybe; - /** - * The ID number assigned to the website store - * @deprecated The field should not be used on the storefront - */ - website_id?: Maybe; - /** The label assigned to the website */ - website_name?: Maybe; - /** The unit of weight */ - weight_unit?: Maybe; - /** Welcome Text */ - welcome?: Maybe; -} -``` - -### `config` -Returns the loaded `config` as `computed` property - -### `loadConfig` -Function to load the `config` - -### `loading` -Return state of `loadConfig` Function as `computed` property - -## Example -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useConfig } from '@vue-storefront/magento'; - -export default { - setup() { - const { - config, - loadConfig, - loading - } = useConfig(); - - onSSR(async () => { - await loadConfig(); - }) - - return { - config, - loading - }; - } -}; -``` diff --git a/docs/guide/composables/use-content.md b/docs/guide/composables/use-content.md deleted file mode 100644 index 0c6c6fac6..000000000 --- a/docs/guide/composables/use-content.md +++ /dev/null @@ -1,66 +0,0 @@ -# usePage - -## Features -`usePage` is the alias used by `useContent` composable, and can be used to fetch content pages. - -## API -The `useContent` composable implements custom factory `useContentFactory` located in `packages/composables/src/factories/useContentFactory.ts` and returns `UsePage` interface: - -```typescript -interface UseContent { - page: ComputedProperty; - loadPage: (identifier: string) => Promise; - loading: ComputedProperty; -} - -export interface CmsPage { - /** CMS page content */ - content?: Maybe; - /** CMS page content heading */ - content_heading?: Maybe; - /** Identifier of the CMS page */ - identifier?: Maybe; - /** CMS page meta description */ - meta_description?: Maybe; - /** CMS page meta keywords */ - meta_keywords?: Maybe; - /** CMS page meta title */ - meta_title?: Maybe; - /** CMS page content heading */ - page_layout?: Maybe; - /** CMS page title */ - title?: Maybe; - /** URL key of CMS page */ - url_key?: Maybe; -} -``` - -### `loadPage` -Function that takes in `identifier` as param and gets the `page` accordingly - -### `page` -Returns `page` as a `computed` property - -### `loading` -Returns the `loading` state of `loadPage` - -## Example -```javascript -import { onSSR } from '@vue-storefront/core'; -import { usePage } from '@vue-storefront/magento'; - -export default { - setup(props) { - const { page, loadPage, loading } = usePage('cmsPage'); - - onSSR(async () => { - await loadPage(props.identifier); - }); - - return { - page, - loading, - }; - } -}; -``` diff --git a/docs/guide/composables/use-country-search.md b/docs/guide/composables/use-country-search.md deleted file mode 100644 index e5e78f711..000000000 --- a/docs/guide/composables/use-country-search.md +++ /dev/null @@ -1,77 +0,0 @@ -# useCountrySearch - -## Features -`useCountrySearch` composable is responsible for fetching a list of categories. A common usage scenario for this composable is navigation. - -## API -The `useCountrySearch` composable implements custom factory `useCountrySearchFactory` located in `packages/composables/src/composables/useCountrySearch/index.ts` and returns `UseCountrySearch` interface: -```typescript -export interface UseCountrySearch { - load: () => Promise; - search: (params: { id: string }) => Promise; - countries: ComputedProperty; - country: ComputedProperty; - error: ComputedProperty; - loading: ComputedProperty; -} - -export type Countries = CountriesListQuery['countries'][0]; - -export interface Country { - available_regions?: Maybe>>; - full_name_english?: Maybe; - full_name_locale?: Maybe; - /** The unique ID for a `Country` object. */ - id?: Maybe; - three_letter_abbreviation?: Maybe; - two_letter_abbreviation?: Maybe; -} -``` - -### `load` -Function that takes no params and gets the `Countries` array accordingly - -### `search` -Function that takes `id`as search param and gets the `Country` accordingly - -### `countries` -Returns an array of countries fetched by `load` method as a `computed` property. - -### `country` -Returns a single `Country` object fetched by `search` method as a `computed` property. - -### `loading` -Returns the current state of `search` as `computed` boolean property - -### `error` -Reactive object containing the error message, if search failed for any reason. - -## Example - -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useCountrySearch } from '@vue-storefront/magento'; - -export default { - setup (props) { - const { - load: loadCountries, - countries, - search: searchCountry, - country, - } = useCountrySearch('Step:Billing'); - - onSSR(async () => { - await searchCountry({ - id: props.identifier, - }); - }); - - return { - loadCountries, - countries, - country, - } - } -} -``` diff --git a/docs/guide/composables/use-custom-mutation.md b/docs/guide/composables/use-custom-mutation.md deleted file mode 100644 index 1c983d1b3..000000000 --- a/docs/guide/composables/use-custom-mutation.md +++ /dev/null @@ -1,84 +0,0 @@ -# useCustomMutation - -## Features -`useCustomMutation` composition function can be used to execute custom Mutation on the Magento GraphQL API. - -What makes it powerful is the ability to accept any GraphQL mutation, and execute it. - -## API -```typescript -export interface UseCustomMutation extends Composable { - setMutationString: (newMutationString: string) => void; - mutationString: ComputedProperty; - mutation: ({ variables, fetchPolicy }: { - variables: MUTATION_VARIABLES, - fetchPolicy?: FetchPolicy, - }) => Promise; - result: ComputedProperty; - loading: ComputedProperty; - error: ComputedProperty; - [x: string]: any; -} -``` - -### `setMutationString` -Function to define the mutation to be executed on the GraphQL Mutation - -### `mutationString` -`sharedRef` of the GraphQL mutation string - -### `query` -Actual query function to mutate the data under the Magento GraphQL API. - -### `result` -Reactive object containing the result information from mutation method. - -### `loading` -Reactive object containing the loading state of the query function. - -### `error` -Reactive object containing the error message, if mutation failed for any reason. - -## Example -`customMutationExample.ts` - -```typescript -import { useCustomMutation } from '@vue-storefront/magento'; - -export const customMutation = (id?: string) => { - const { - error, - loading, - mutation, - result, - setMutationString, - } = useCustomMutation(id); - - setMutationString(` - mutation subscribeEmailToNewsletter($email: String!){ - subscribeEmailToNewsletter(email: $email) { - status - } - }`); - - return { - error, - loading, - mutation, - result, - }; -}; -``` - -`Any File` -```typescript -import { customQuery } from '~/composables/customMutationExample.ts'; - -const { mutation } = customQuery(id); - -await mutation({ - variables: { - email: `${newEmail}`, - }, -}); -``` diff --git a/docs/guide/composables/use-custom-query.md b/docs/guide/composables/use-custom-query.md deleted file mode 100644 index dda849fd1..000000000 --- a/docs/guide/composables/use-custom-query.md +++ /dev/null @@ -1,87 +0,0 @@ -# useCustomQuery - -## Features -`useCustomQuery` composition function can be used to execute custom Queries on the Magento GraphQL API. - -What makes it powerful is the ability to accept any GraphQL query, and execute it. - -## API -```typescript -export interface UseCustomQuery extends Composable { - setQueryString: (newQueryString: string) => void; - queryString: ComputedProperty; - query: ({ variables, fetchPolicy, }: { - variables: QUERY_VARIABLES, - fetchPolicy?: FetchPolicy, - }) => Promise; - result: ComputedProperty; - loading: ComputedProperty; - error: ComputedProperty; -} -``` - -### `setQueryString` -Function to define the query to be executed on the GraphQL Query - -### `queryString` -`sharedRef` of the GraphQL query string - -### `query` -Actual query function to fetch the data under the Magento GraphQL API. - -### `result` -Reactive object containing the result information from query method. - -### `loading` -Reactive object containing the loading state of the query function. - -### `error` -Reactive object containing the error message, if query failed for any reason. - -## Example -`customQueryExample.ts` - -```typescript -import { useCustomQuery } from '@vue-storefront/magento'; - -export const customQuery = (id?: string) => { - const { - error, - loading, - query, - result, - setQueryString, - } = useCustomQuery(id); - - setQueryString(` - query urlResolver($url: String!) { - urlResolver(url:$url) { - id, - redirectCode, - relative_url, - type - entity_uid - } - }`); - - return { - error, - loading, - query, - result, - }; -}; -``` - -`Any File` -```typescript -import { customQuery } from '~/composables/customQueryExample.ts'; - -const { query } = customQuery(path); - -await query({ - variables: { - url: path.replace(/\/[cp|]\//gi, ''), - }, -}); -``` diff --git a/docs/guide/composables/use-external-checkout.md b/docs/guide/composables/use-external-checkout.md deleted file mode 100644 index b4b31bd1d..000000000 --- a/docs/guide/composables/use-external-checkout.md +++ /dev/null @@ -1,47 +0,0 @@ -# useExternalCheckout - -## Features -`useExternalCheckout` composable is responsible for redirecting checkout process and depends on [Magento 2 External Checkout for Vue Storefront](https://github.com/Vendic/magento2-external-checkout) repository. - -## API -The `useExternalCheckout` composable implements custom factory `useExternalCheckoutFactory` located in `packages/composables/src/factories/useExternalCheckoutFactory.ts` and returns `UseExternalCheckout` interface: -```typescript -export interface UseExternalCheckout { - initializeCheckout: (baseUrl: string) => Promise; - error: ComputedProperty; - loading: ComputedProperty; -} - -export interface UseExternalCheckoutErrors { - initializeCheckout: Error; -} -``` -### `initializeCheckout` -Function that takes `baseUrl`as search param. - -### `loading` -Returns the current state of `search` as `computed` boolean property - -### `error` -Reactive object containing the error message, if search failed for any reason. - -## Example - -```javascript -import { useExternalCheckout } from '@vue-storefront/magento'; - -export default { - setup (props) { - const { initializeCheckout } = useExternalCheckout(); - - const goToCheckout = async () => { - const redirectUrl = await initializeCheckout('/checkout/user-account'); - await router.push(redirectUrl); - }; - - return { - goToCheckout, - } - } -} -``` diff --git a/docs/guide/composables/use-facet.md b/docs/guide/composables/use-facet.md deleted file mode 100644 index 1ff36d2dc..000000000 --- a/docs/guide/composables/use-facet.md +++ /dev/null @@ -1,102 +0,0 @@ -# useFacet - -## Features -`useFacet` composition function can be used to fetch data related to: -* products, -* categories, -* breadcrumbs. - -What makes it powerful is the ability to accept multiple filters, allowing to narrow down the results to a specific category, search term, etc. - -## API -```typescript -interface UseFacet { - result: ComputedProperty>; - loading: ComputedProperty; - search: (params?: AgnosticFacetSearchParams) => Promise; - error: ComputedProperty; -} -``` - -### `search` -Function for searching and classifying records, allowing users to browse the catalog data. It accepts a single object as a parameter -```typescript -interface AgnosticFacetSearchParams { - categorySlug?: string; - rootCatSlug?: string; - term?: string; - page?: number; - itemsPerPage?: number; - sort?: string; - filters?: Record; - metadata?: any; - [x: string]: any; -} -``` - -### `result` -Reactive data object containing the response from the backend. - -### `loading` -Reactive object containing information about the loading state of search. - -### `error` -Reactive object containing the error message, if search failed for any reason. - - -## Getters -````typescript -interface FacetsGetters { - getAll: (searchData: FacetSearchResult, criteria?: CRITERIA) => AgnosticFacet[]; - getGrouped: (searchData: FacetSearchResult, criteria?: CRITERIA) => AgnosticGroupedFacet[]; - getCategoryTree: (searchData: FacetSearchResult) => AgnosticCategoryTree; - getSortOptions: (searchData: FacetSearchResult) => AgnosticSort; - getProducts: (searchData: FacetSearchResult) => RESULTS; - getPagination: (searchData: FacetSearchResult) => AgnosticPagination; - getBreadcrumbs: (searchData: FacetSearchResult) => AgnosticBreadcrumb[]; -} -```` - -* `getAll` - returns all available facets. -* `getGrouped` - returns grouped facets by facet name. -* `getCategoryTree` - return the tree of nested categories. -* `getSortOptions` - returns available and currently selected sorting options. -* `getProducts` - returns products matching current filters. -* `getPagination` - returns pagination information. -* `getBreadcrumbs` - returns breadcrumbs information. - -## Example -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useFacet, facetGetters } from '@vue-storefront/magento'; - -export default { - setup (props, context) { - const { result, search, loading } = useFacet(`facetId:${path}`); - - const products = computed(() => facetGetters.getProducts(result.value)); - const breadcrumbs = computed(() => facetGetters.getBreadcrumbs(result.value)); - const sortBy = computed(() => facetGetters.getSortOptions(result.value)); - const facets = computed(() => facetGetters.getGrouped(result.value)); - const pagination = computed(() => facetGetters.getPagination(result.value)); - - onSSR(async () => { - await search({ - categorySlug: 'clothing', - sort: 'latest', - itemsPerPage: 10, - term: 'some search query' - }); - }); - - return { - produproducts, - breadcrumbs, - sortBy, - facets, - pagination, - loading, - }; - } -} -``` diff --git a/docs/guide/composables/use-forgot-password.md b/docs/guide/composables/use-forgot-password.md deleted file mode 100644 index c356323f1..000000000 --- a/docs/guide/composables/use-forgot-password.md +++ /dev/null @@ -1,27 +0,0 @@ -# useForgotPassword - -`useForgotPassword` - -## API -```typescript -export interface UseForgotPassword { - result: ComputedProperty; - loading: ComputedProperty; - error: ComputedProperty; - setNew(params: ComposableFunctionArgs<{ - tokenValue: string, - newPassword: string, - email: string, - }>): Promise; - request(params: ComposableFunctionArgs<{ - email: string - }>): Promise; -} -``` - -* `` - - -## Example - -```javascript -``` diff --git a/docs/guide/composables/use-get-shipping-methods.md b/docs/guide/composables/use-get-shipping-methods.md deleted file mode 100644 index 5bcb6515a..000000000 --- a/docs/guide/composables/use-get-shipping-methods.md +++ /dev/null @@ -1,90 +0,0 @@ -# useGetShippingMethods - -## Features -`useGetShippingMethods` composable is responsible for fetching a Shipping Method - -## API -The `useGetShippingMethods` composable implements custom factory `useGetShippingMethodsFactory` located in `packages/composables/src/factories/useGetShippingMethodsFactory.ts` and returns `UseGetShippingMethods` interface: -```typescript -export interface UseGetShippingMethods { - state: ComputedProperty; - setState(state: ShippingMethod[]): void; - load: (params: { cartId: string }) => Promise; - result: ComputedProperty; - error: ComputedProperty; - loading: ComputedProperty; -} - -export type ShippingMethod = AvailableShippingMethod; - -export interface AvailableShippingMethod { - amount: Money; - available: Scalars['Boolean']; - /** @deprecated The field should not be used on the storefront */ - base_amount?: Maybe; - carrier_code: Scalars['String']; - carrier_title: Scalars['String']; - error_message?: Maybe; - /** Could be null if method is not available */ - method_code?: Maybe; - /** Could be null if method is not available */ - method_title?: Maybe; - price_excl_tax: Money; - price_incl_tax: Money; -} - -export interface Money { - /** A three-letter currency code, such as USD or EUR */ - currency?: Maybe; - /** A number expressing a monetary value */ - value?: Maybe; -} -``` -### `state` -Get all `ShippingMethods` as array. - -### `setState` -Set one or more `ShippingMethods` state. - -### `load` -Function that takes `cartId` as param and gets the `result` array accordingly - -### `result` -Returns a list of `ShippingMethods` fetched by `load` method as a `computed` property. - -### `loading` -Returns the current state of `search` as `computed` boolean property - -### `error` -Reactive object containing the error message, if search failed for any reason. - -## Example - -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useGetShippingMethods } from '@vue-storefront/magento'; - -export default { - setup (props) { - const { - load, - result: shippingMethods, - loading: loadingShippingMethods, - error: errorUseGetShippingMethods, - } = useGetShippingMethods('VsfShippingProvider'); - - - onSSR(async () => { - await load({ - cartId: props.identifier, - }); - }); - - return { - shippingMethods, - loadingShippingMethods, - errorUseGetShippingMethods, - } - } -} -``` diff --git a/docs/guide/composables/use-guest-user.md b/docs/guide/composables/use-guest-user.md deleted file mode 100644 index 26a1e4e14..000000000 --- a/docs/guide/composables/use-guest-user.md +++ /dev/null @@ -1,69 +0,0 @@ -# useGuestUser - -## Features -`useGuestUser` composable is responsible for fetching a Shipping Method - -## API -The `useGuestUser` composable implements custom factory `useGuestUserFactory` located in `packages/composables/src/factories/useGuestUserFactory.ts` and returns `UseGuestUser` interface: -```typescript -export interface UseGuestUser { - guestUser: ComputedProperty; - setGuestUser: (user: any) => void; - attachToCart: (params: { user: UseGuestUserRegisterParams }) => Promise; - loading: ComputedProperty; - error: ComputedProperty; -} - -export interface UseGuestUserRegisterParams { - email: string; - password: string; - firstName?: string; - lastName?: string; - [x: string]: any; -} - -export interface UseGuestUserErrors { - attachToCart: Error; -} -``` -### `guestUser` -Returns a User as a computed property - -### `setGuestUser` -Set the User - -### `attachToCart` -Function that takes `user` as `UseGuestUserRegisterParams` param. - -### `loading` -Returns the current state of `search` as `computed` boolean property - -### `error` -Reactive object containing the error message, if search failed for any reason. - -## Example - -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useGuestUser } from '@vue-storefront/magento'; - -export default { - setup (props) { - const { - attachToCart, - loading: loadingGuestUser, - error: errorGuestUser, - } = useGuestUser(); - - const handleFormSubmit = () => async () => { - await attachToCart({ user: props.user }); - }; - - return { - handleFormSubmit, - loadingGuestUser, - errorGuestUser, - } - } -} -``` diff --git a/docs/guide/composables/use-make-oder.md b/docs/guide/composables/use-make-oder.md deleted file mode 100644 index 67b3762d1..000000000 --- a/docs/guide/composables/use-make-oder.md +++ /dev/null @@ -1,103 +0,0 @@ -# useMakeOrder -`useMakeOrder` composable is responsible for making an order - -## API -````typescript -interface UseMakeOrder { - order: Ref; - make(params: { customQuery?: CustomQuery }): Promise; - error: ComputedProperty; - loading: ComputedProperty; -} - -export interface Order extends OrderItem { - /** @deprecated The order_id field is deprecated, use order_number instead. */ - order_id?: Maybe; - /** The unique ID for a `Order` object. */ - order_number: Scalars['String']; -} - -export interface OrderItem { - /** The final discount information for the product */ - discounts?: Maybe>>; - /** The entered option for the base product, such as a logo or image */ - entered_options?: Maybe>>; - /** The unique ID for a `OrderItemInterface` object */ - id: Scalars['ID']; - /** The name of the base product */ - product_name?: Maybe; - /** The sale price of the base product, including selected options */ - product_sale_price: Money; - /** The SKU of the base product */ - product_sku: Scalars['String']; - /** The type of product, such as simple, configurable, etc. */ - product_type?: Maybe; - /** URL key of the base product */ - product_url_key?: Maybe; - /** The number of canceled items */ - quantity_canceled?: Maybe; - /** The number of invoiced items */ - quantity_invoiced?: Maybe; - /** The number of units ordered for this item */ - quantity_ordered?: Maybe; - /** The number of refunded items */ - quantity_refunded?: Maybe; - /** The number of returned items */ - quantity_returned?: Maybe; - /** The number of shipped items */ - quantity_shipped?: Maybe; - /** The selected options for the base product, such as color or size */ - selected_options?: Maybe>>; - /** The status of the order item */ - status?: Maybe; -} -```` -### `make` -function for making an order. This method accepts a single optional params object. - -### `order` -a main data object that contains a made order. - -### `loading` -a reactive object containing information about loading state of your make method. - -### `error` -a reactive object containing the error message, if load or save failed for any reason. - - -## Getters -````typescript -interface UserOrderGetters { - getDate: (order: Order) => string; - getId: (order: Order) => string; - getStatus: (order: Order) => string; - getPrice: (order: Order) => number; - getItems: (order: Order) => OrderItem[]; - getItemSku: (item: OrderItem) => string; - getItemName: (item: OrderItem) => string; - getItemQty: (item: OrderItem) => number; - getItemPrice: (item: OrderItem) => number; - getFormattedPrice: (price: number) => string; -} -```` - -## Example -````javascript -import { useMakeOrder } from '@vue-storefront/magento'; -export default { - setup () { - const { order, make, loading } = useMakeOrder(); - - const processOrder = async () => { - await make(); - router.push(`/checkout/thank-you?order=${order.value.order_number}`); - }; - - return { - processOrder, - order, - loading, - }; - } -} -```` diff --git a/docs/guide/composables/use-menu-category.md b/docs/guide/composables/use-menu-category.md deleted file mode 100644 index 8df7a2006..000000000 --- a/docs/guide/composables/use-menu-category.md +++ /dev/null @@ -1,50 +0,0 @@ -# useMenuCategory - -## Features -`useMenuCategory` composable is responsible for fetching a list of categories with a dedicated file structure for AppHeader Menu. - -## API -```typescript -export interface UseCategory { - categories: ComputedProperty; - search(params: ComposableFunctionArgs): Promise; - loading: ComputedProperty; - error: ComputedProperty; -} - -export type CategoryMenu = CategoryTree; -``` -> For more information on [Category Tree interface](use-category) visit the dedicated documentation. - -### `search` -Function that takes `CategoryListQueryVariables` and `CustomQuery` as optional params and gets the `categories` accordingly - -### `categories` -Returns an array of categories fetched by `search` method as a `computed` property. - -### `loading` -Returns the current state of `search` as `computed` boolean property - -### `error` -Reactive object containing the error message, if search failed for any reason. - -## Example -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useMenuCategory } from '@vue-storefront/magento'; - -export default { - setup () { - const { categories, search, loading } = useMenuCategory('category-id'); - - onSSR(async () => { - await search({}); - }); - - return { - categories, - loading - } - } -} -``` diff --git a/docs/guide/composables/use-newsletter.md b/docs/guide/composables/use-newsletter.md deleted file mode 100644 index bcfe02a81..000000000 --- a/docs/guide/composables/use-newsletter.md +++ /dev/null @@ -1,21 +0,0 @@ -# useNewsletter - -`useNewsletter` - -## API -```typescript -export interface UseNewsletter extends Composable{ - error: ComputedProperty; - loading: ComputedProperty; - updateSubscription: (params: { - email: UPDATE_NEWSLETTER_PARAMS, - }) => Promise; -} -``` - -* `` - - -## Example - -```javascript -``` diff --git a/docs/guide/composables/use-payment-provider.md b/docs/guide/composables/use-payment-provider.md deleted file mode 100644 index 7ce292458..000000000 --- a/docs/guide/composables/use-payment-provider.md +++ /dev/null @@ -1,80 +0,0 @@ -# usePaymentProvider - -## Features -`usePaymentProvider` composable is responsible for fetching a Shipping Method - -## API -The `usePaymentProvider` composable implements custom factory `usePaymentProviderFactory` located in `packages/composables/src/factories/usePaymentProviderFactory.ts` and returns `UsePaymentProvider` interface: -```typescript -interface UsePaymentProvider { - error: ComputedProperty; - loading: ComputedProperty; - state: ComputedProperty; - setState(state: any): void; - load(params: { customQuery?: CustomQuery }): Promise; - save(params: { paymentMethod: any, customQuery?: CustomQuery }): Promise; -} - -export interface UsePaymentProviderErrors { - load: Error; - save: Error; -} -``` -### `state` -Get all `PaymentProviders` as array. - -### `setState` -Set one or more `PaymentProviders` state. - -### `load` -Function that takes `customQuery` as param and gets the `state` array accordingly - -### `save` -Function that takes `paymentMethod` as param and saves it - -### `loading` -Returns the current state of `search` as `computed` boolean property - -### `error` -Reactive object containing the error message, if search failed for any reason. - -## Example - -```javascript -import { onSSR } from '@vue-storefront/core'; -import { usePaymentProvider } from '@vue-storefront/magento'; - -export default { - setup (props) { - const { load, state, save } = usePaymentProvider(); - - onMounted(async () => { - await load(); - }); - - const paymentMethods = computed(() => (Array.isArray(state.value) ? state.value.map((p) => ({ - label: p.title, - value: p.code, - })) : [])); - - const definePaymentMethods = async (paymentMethod) => { - try { - await save({ - paymentMethod: { - code: paymentMethod, - }, - }); - - emit('status', paymentMethod); - } catch (e) { - console.error(e); - } - }; - - return { - definePaymentMethods, - state, - } - } -} -``` diff --git a/docs/guide/composables/use-product.md b/docs/guide/composables/use-product.md deleted file mode 100644 index 3347cd1b6..000000000 --- a/docs/guide/composables/use-product.md +++ /dev/null @@ -1,309 +0,0 @@ -# useProduct - -## Features -`useProduct` composable is responsible for fetching a list of products. - -## API -```typescript -interface UseProduct { - products: ComputedProperty; - loading: ComputedProperty; - error: ComputedProperty; - search(params: ComposableFunctionArgs): Promise; -} - -export interface ProductsSearchParams { - perPage?: number; - page?: number; - sort?: any; - term?: any; - filters?: any; - [x: string]: any; -} - -export interface Products { - /** Layered navigation aggregations. */ - aggregations?: Maybe>>; - /** - * Layered navigation filters array. - * @deprecated Use aggregations instead - */ - filters?: Maybe>>; - /** An array of products that match the specified search criteria. */ - items?: Maybe>>; - /** An object that includes the page_info and currentPage values specified in the query. */ - page_info?: Maybe; - /** An object that includes the default sort field and all available sort fields. */ - sort_fields?: Maybe; - /** The number of products that are marked as visible. By default, in complex products, parent products are visible, but their child products are not. */ - total_count?: Maybe; -} - -export interface ProductInterface { - activity?: Maybe; - /** - * The attribute set assigned to the product. - * @deprecated The field should not be used on the storefront. - */ - attribute_set_id?: Maybe; - /** Relative canonical URL. This value is returned only if the system setting 'Use Canonical Link Meta Tag For Products' is enabled */ - canonical_url?: Maybe; - /** The categories assigned to a product. */ - categories?: Maybe>>; - category_gear?: Maybe; - climate?: Maybe; - collar?: Maybe; - color?: Maybe; - /** The product's country of origin. */ - country_of_manufacture?: Maybe; - /** - * Timestamp indicating when the product was created. - * @deprecated The field should not be used on the storefront. - */ - created_at?: Maybe; - /** Crosssell Products */ - crosssell_products?: Maybe>>; - /** Detailed information about the product. The value can include simple HTML tags. */ - description?: Maybe; - eco_collection?: Maybe; - erin_recommends?: Maybe; - features_bags?: Maybe; - format?: Maybe; - gender?: Maybe; - /** Indicates whether a gift message is available. */ - gift_message_available?: Maybe; - /** - * The ID number assigned to the product. - * @deprecated Use the `uid` field instead. - */ - id?: Maybe; - /** The relative path to the main image on the product page. */ - image?: Maybe; - /** A number representing the product's manufacturer. */ - manufacturer?: Maybe; - material?: Maybe; - /** An array of Media Gallery objects. */ - media_gallery?: Maybe>>; - /** - * An array of MediaGalleryEntry objects. - * @deprecated Use product's `media_gallery` instead - */ - media_gallery_entries?: Maybe>>; - /** A brief overview of the product for search results listings, maximum 255 characters. */ - meta_description?: Maybe; - /** A comma-separated list of keywords that are visible only to search engines. */ - meta_keyword?: Maybe; - /** A string that is displayed in the title bar and tab of the browser and in search results lists. */ - meta_title?: Maybe; - /** The product name. Customers use this name to identify the product. */ - name?: Maybe; - new?: Maybe; - /** - * The beginning date for new product listings, and determines if the product is featured as a new product. - * @deprecated The field should not be used on the storefront. - */ - new_from_date?: Maybe; - /** - * The end date for new product listings. - * @deprecated The field should not be used on the storefront. - */ - new_to_date?: Maybe; - /** Product stock only x left count */ - only_x_left_in_stock?: Maybe; - /** If the product has multiple options, determines where they appear on the product page. */ - options_container?: Maybe; - pattern?: Maybe; - performance_fabric?: Maybe; - /** - * A ProductPrices object, indicating the price of an item. - * @deprecated Use price_range for product price information. - */ - price?: Maybe; - /** A PriceRange object, indicating the range of prices for the product */ - price_range: PriceRange; - /** An array of TierPrice objects. */ - price_tiers?: Maybe>>; - /** An array of ProductLinks objects. */ - product_links?: Maybe>>; - /** The average of all the ratings given to the product. */ - rating_summary: Scalars['Float']; - /** Related Products */ - related_products?: Maybe>>; - /** The total count of all the reviews given to the product. */ - review_count: Scalars['Int']; - /** The list of products reviews. */ - reviews: ProductReviews; - sale?: Maybe; - /** A short description of the product. Its use depends on the theme. */ - short_description?: Maybe; - size?: Maybe; - /** A number or code assigned to a product to identify the product, options, price, and manufacturer. */ - sku?: Maybe; - sleeve?: Maybe; - /** The relative path to the small image, which is used on catalog pages. */ - small_image?: Maybe; - /** - * The beginning date that a product has a special price. - * @deprecated The field should not be used on the storefront. - */ - special_from_date?: Maybe; - /** The discounted price of the product. */ - special_price?: Maybe; - /** The end date that a product has a special price. */ - special_to_date?: Maybe; - /** Stock status of the product */ - stock_status?: Maybe; - strap_bags?: Maybe; - style_bags?: Maybe; - style_bottom?: Maybe; - style_general?: Maybe; - /** The file name of a swatch image */ - swatch_image?: Maybe; - /** The relative path to the product's thumbnail image. */ - thumbnail?: Maybe; - /** - * The price when tier pricing is in effect and the items purchased threshold has been reached. - * @deprecated Use price_tiers for product tier price information. - */ - tier_price?: Maybe; - /** - * An array of ProductTierPrices objects. - * @deprecated Use price_tiers for product tier price information. - */ - tier_prices?: Maybe>>; - /** - * One of simple, virtual, bundle, downloadable, grouped, or configurable. - * @deprecated Use __typename instead. - */ - type_id?: Maybe; - /** The unique ID for a `ProductInterface` object. */ - uid: Scalars['ID']; - /** - * Timestamp indicating when the product was updated. - * @deprecated The field should not be used on the storefront. - */ - updated_at?: Maybe; - /** Upsell Products */ - upsell_products?: Maybe>>; - /** The part of the URL that identifies the product */ - url_key?: Maybe; - /** @deprecated Use product's `canonical_url` or url rewrites instead */ - url_path?: Maybe; - /** URL rewrites list */ - url_rewrites?: Maybe>>; - /** The part of the product URL that is appended after the url key */ - url_suffix?: Maybe; - /** - * An array of websites in which the product is available. - * @deprecated The field should not be used on the storefront. - */ - websites?: Maybe>>; -} - -export interface UseProductErrors { - search: Error; -} -``` - -### `search` -Function that takes in `ProductsSearchParams` as optional params and gets the `products` accordingly - -### `products` -Returns `products` as a `computed` property - -### `loading` -Returns the `loading` state of `search` - -### `error` -reactive object containing the error message, if search failed for any reason. - - -## Getters - -```typescript -interface ProductGetters { - getAttributes: ( - products: Product, - _filterByAttributeName?: string[], - ) => Record, - getAverageRating: () => number, - getBreadcrumbs: ( - product: Product, - category?: Category, - ) => AgnosticBreadcrumb[], - getCategory: ( - product: Product, - currentUrlPath: string, - ) => Category | null, - getCategoryIds: (product: Product) => string[], - getCoverImage: (product: Product) => string, - getDescription: (product: Product) => string, - getFiltered: ( - products: Product[], - _filters: ProductsSearchParams, - ) => Product[], - getFormattedPrice: (price: number) => string | null, - getGallery: (product: Product) => AgnosticMediaGalleryItem[], - getId: (product: Product) => string, - getName: (product: Product) => string, - getPrice: (product: Product) => AgnosticPrice, - getProductRelatedProduct: (product: Product) => Product[] | [], - getProductUpsellProduct: (product: Product) => Product[] | [], - getProductSku: (product: Product) => string, - getProductThumbnailImage: (product: Product) => string, - getShortDescription: (product: Product) => string, - getSlug: (product: Product, category?: Category) => string, - getTotalReviews: () => number, - getTypeId: (product: Product) => string, -} -``` -* `getAttributes` - returns product attributes. -* `getAverageRating` - returns average rating from all reviews. -* `getBreadcrumbs` - returns 'Breadcrumbs'. -* `getCategoryIds` - returns all product categories. -* `getCategory` - returns 'Category'. -* `getCoverImage` - returns cover image of product. -* `getDescription` - returns product description. -* `getFiltered` - returns filtered product. -* `getFormattedPrice` - returns product price with currency sign. -* `getGallery` - returns product gallery. -* `getId` - returns product ID. -* `getName` - returns product name. -* `getPrice` - returns product price. -* `getProductRelatedProduct` - returns 'ProductRelatedProduct'. -* `getProductSku` - returns 'ProductSku'. -* `getProductThumbnailImage` - returns 'ProductThumbnailImage'. -* `getProductUpsellProduct` - returns 'ProductUpsellProduct'. -* `getShortDescription` - returns 'ShortDescription'. -* `getSlug` - returns product slug. -* `getTotalReviews` - returns total number of reviews product has. -* `getTypeId` - returns 'TypeId'. - -## Example - -```javascript -import { useProduct, productGetters } from '@vue-storefront/magento'; -import { onSSR } from '@vue-storefront/core' - -export default { - setup () { - const { products, search, loading, error } = useProduct(''); - - onSSR(async () => { - await search({ - pageSize: 10, - currentPage: 1, - sort: { - position: 'ASC', - }, - }) - }) - - return { - loading, - error, - product: computed(() => productGetters.getFiltered(products.value?.items, { master: true })[0]), - } - } -} -``` diff --git a/docs/guide/composables/use-related-products.md b/docs/guide/composables/use-related-products.md deleted file mode 100644 index be90af824..000000000 --- a/docs/guide/composables/use-related-products.md +++ /dev/null @@ -1,26 +0,0 @@ -# useRelatedProducts - -`useRelatedProducts` - -## API -```typescript -export interface UseRelatedProducts< - PRODUCTS, - RELATED_PRODUCT_SEARCH_PARAMS, - API extends PlatformApi = any> - extends Composable { - products: ComputedProperty; - loading: ComputedProperty; - error: ComputedProperty; - search(params: ComposableFunctionArgs): Promise; - [x: string]: any; -} - -``` - -* `` - - -## Example - -```javascript -``` diff --git a/docs/guide/composables/use-review.md b/docs/guide/composables/use-review.md deleted file mode 100644 index 8bc23b055..000000000 --- a/docs/guide/composables/use-review.md +++ /dev/null @@ -1,14 +0,0 @@ -# useReview - -`useReview` - -## API -```typescript -``` - -* `` - - -## Example - -```javascript -``` diff --git a/docs/guide/composables/use-shipping-provider.md b/docs/guide/composables/use-shipping-provider.md deleted file mode 100644 index 99e96b860..000000000 --- a/docs/guide/composables/use-shipping-provider.md +++ /dev/null @@ -1,45 +0,0 @@ -# useShippingProvider -`useShippingProvider` composable can be used for: -* Loading shipping methods for the current cart. -* Selecting shipping method for the current cart. - -> WIP - -## API -```typescript -interface UseShippingProvider { - error: ComputedProperty; - loading: ComputedProperty; - state: ComputedProperty; - setState(state: STATE): void; - load(): Promise; - load(params: { customQuery?: CustomQuery }): Promise; - save(params: { shippingMethod: SHIPPING_METHOD, customQuery?: CustomQuery }): Promise; -} -``` -* `load` - function for fetching shipping method. When invoked, it requests data from the API and populates the response key inside the state property. This method accepts a single optional params object. -* `save` - function for selecting shipping method. This method accepts a single saveParams object. -* `state` - function for selecting shipping method. This method accepts a single saveParams object. -* `loading` - a reactive object containing information about loading state of your load or save method. -* `error` - a reactive object containing the error message, if load or save failed for any reason. - -## Example -````javascript -import { useShippingProvider } from '@vue-storefront/magento'; -import { onSSR } from '@vue-storefront/core'; -import { computed } from '@vue/composition-api'; - -export default { - setup () { - const { load, state } = useShippingProvider(); - - onSSR(async () => { - await load(); - }); - - return { - selectedShippingMethod: computed(() => state.value && state.value.response) - }; - } -} -```` diff --git a/docs/guide/composables/use-shipping.md b/docs/guide/composables/use-shipping.md deleted file mode 100644 index d30a7662d..000000000 --- a/docs/guide/composables/use-shipping.md +++ /dev/null @@ -1,43 +0,0 @@ -# useShipping -`useShipping` composable can be used for: -* Loading shipping address for the current cart. -* Saving shipping address for the current cart. - -> WIP - -## API -```typescript -interface UseShipping { - error: ComputedProperty; - loading: ComputedProperty; - shipping: ComputedProperty; - load(): Promise; - load(params: { customQuery?: CustomQuery }): Promise; - save: (params: { params: SHIPPING_PARAMS; shippingDetails: SHIPPING; customQuery?: CustomQuery }) => Promise; -} -``` -* `load` - function for fetching shipping address. When invoked, it requests data from the API and populates shipping property. This method accepts a single optional params object. -* `save` - function for saving shipping address. This method accepts a single saveParams object. -* `shipping` - a main data object that contains a shipping address. -* `loading` - a reactive object containing information about loading state of your load or save method. -* `error` - a reactive object containing the error message, if load or save failed for any reason. - -## Example -````javascript -import { useShipping } from '@vue-storefront/magento'; -import { onSSR } from '@vue-storefront/core'; - -export default { - setup () { - const { load, shipping } = useShipping(); - - onSSR(async () => { - await load(); - }); - - return { - shipping - }; - } -} -```` diff --git a/docs/guide/composables/use-store.md b/docs/guide/composables/use-store.md deleted file mode 100644 index 9775c0d8f..000000000 --- a/docs/guide/composables/use-store.md +++ /dev/null @@ -1,52 +0,0 @@ -# `useStore` - -## Features - -`useStore` composable is responsible, for interactions with the available stores in Magento. It allows to: -* fetch available stores -* switch to another store - -## API -The `useStore` composable implements custom factory `useStoreFactory` located in `packages/composables/src/factories/useStoreFactory.ts` and returns `UseStore` interface: -```typescript -interface UseStore extends Composable { - load: () => Promise; - change: (params: ComposableFunctionArgs) => void; - stores: ComputedRef; - loading: ComputedRef; -} - -export interface AvailableStores = { - availableStores? : Maybe>> -}; -``` - -## Getters - -`storeGetter` object contains following methods: - -* `getItems` - returns list of available stores. -* `getSelected` - returns if the selected store is equal to the config store. - - -## Example - -```js -import { useStore, storeGetters } from '@vue-storefront/magento'; -import { onSSR } from '@vue-storefront/core'; - -export default { - setup () { - const { load: loadStores, stores } = useStore(); - - onSSR(async () => { - await loadStores(); - }); - - return { - stores: storesGetters.getItems(stores.value), - selectedStore: storesGetters.getSelected(stores.value) - }; - } -} -``` diff --git a/docs/guide/composables/use-upsell-products.md b/docs/guide/composables/use-upsell-products.md deleted file mode 100644 index bdc914dff..000000000 --- a/docs/guide/composables/use-upsell-products.md +++ /dev/null @@ -1,24 +0,0 @@ -# useUpsellProducts - -`useUpsellProducts` - -## API -```typescript -export interface UseUpsellProducts< - PRODUCTS, UPSELL_PRODUCTS_SEARCH_PARAMS, - API extends PlatformApi = any> - extends Composable { - products: ComputedProperty; - loading: ComputedProperty; - error: ComputedProperty; - search(params: ComposableFunctionArgs): Promise; - [x: string]: any; -} -``` - -* `` - - -## Example - -```javascript -``` diff --git a/docs/guide/composables/use-url-resolver.md b/docs/guide/composables/use-url-resolver.md deleted file mode 100644 index 038f9863c..000000000 --- a/docs/guide/composables/use-url-resolver.md +++ /dev/null @@ -1,58 +0,0 @@ -# useRouter - -`useRouter` composition API function is responsible, as its name suggests, for interactions with the routes in your eCommerce. This function returns following values: - -## API -```typescript -interface UseRouter { - search: (url: string) => Promise; - route: Readonly>>; - loading: Readonly>>; -} -``` - -* `search` - Function that takes in a `url` and fills the `route` property -* `route` - Returns the current Page -* `loading` - Returns state of `search` - -## Example - -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useRouter } from '@vue-storefront/magento'; -import { computed } from '@vue/composition-api'; - -export default { - setup(props, context) { - const { - path - } = context.root.$route; - const { - loading, - search, - route - } = useRouter('router:' + path); - onSSR(async () => { - await search(path); - if (route.value.data.urlResolver === null) { - context.root.$nuxt.error({ - statusCode: 404, - message: 'Page not found' - }); - } - }); - - const routeType = computed(() => { - if (loading.value || route.value.data.urlResolver === null) { - return {}; - } - return route.value.data.urlResolver; - }); - - return { - loading, - routeType - }; - } -}; -``` diff --git a/docs/guide/composables/use-user-billing.md b/docs/guide/composables/use-user-billing.md deleted file mode 100644 index 6570b9c33..000000000 --- a/docs/guide/composables/use-user-billing.md +++ /dev/null @@ -1,106 +0,0 @@ -# useUserBilling -`useUserBilling` composable can be used to: -* fetch existing billing addresses, -* submit new billing addresses, -* modify and delete existing billing addresses. - -````typescript -interface UseUserBilling { - billing: ComputedProperty; - addAddress: (params: { - address: USER_BILLING_ITEM; - }) => Promise; - deleteAddress: (params: { - address: USER_BILLING_ITEM; - }) => Promise; - updateAddress: (params: { - address: USER_BILLING_ITEM; - }) => Promise; - load: () => Promise; - setDefaultAddress: (params: { - address: USER_BILLING_ITEM; - }) => Promise; - loading: ComputedProperty; - error: ComputedProperty; -} -```` - -* `load` - function for fetching user addresses. When invoked, it requests data from the API and populates billing property. -* `addAddress`- function for posting new billing address. This method accepts a single params object. -* `deleteAddress` - function for deleting existing billing address. This method accepts a single params object. -* `updateAddress` - function for updating existing billing address. This method accepts a single params object. -* `setDefaultAddress` - function for settings an existing billing address as default. This method accepts a single params object. -* `billing` - reactive data object containing response from the backend. -* `loading` - reactive object containing information about loading state of load, addAddress, deleteAddress, updateAddress and setDefaultAddress methods. -* `error` - reactive object containing the error message, if some properties failed for any reason. - -## Getter -````typescript -interface UserBillingGetters { - getAddresses: (billing: USER_BILLING, criteria?: Record) => USER_BILLING_ITEM[]; - getDefault: (billing: USER_BILLING) => USER_BILLING_ITEM; - getTotal: (billing: USER_BILLING) => number; - getPostCode: (address: USER_BILLING_ITEM) => string; - getStreetName: (address: USER_BILLING_ITEM) => string; - getStreetNumber: (address: USER_BILLING_ITEM) => string | number; - getCity: (address: USER_BILLING_ITEM) => string; - getFirstName: (address: USER_BILLING_ITEM) => string; - getLastName: (address: USER_BILLING_ITEM) => string; - getCountry: (address: USER_BILLING_ITEM) => string; - getPhone: (address: USER_BILLING_ITEM) => string; - getEmail: (address: USER_BILLING_ITEM) => string; - getProvince: (address: USER_BILLING_ITEM) => string; - getCompanyName: (address: USER_BILLING_ITEM) => string; - getTaxNumber: (address: USER_BILLING_ITEM) => string; - getId: (address: USER_BILLING_ITEM) => string; - getApartmentNumber: (address: USER_BILLING_ITEM) => string | number; - isDefault: (address: USER_BILLING_ITEM) => boolean; -} -```` - -* `getAddresses` - returns list of billing addresses. -* `getDefault` - returns a default billing address. -* `getTotal` - returns total number of billing addresses user has. -* `getId` - returns id from an individual address. -* `getPostCode` - returns post code from an individual address. -* `getStreetName` - returns street name from an individual address. -* `getStreetNumber` - returns street number from an individual address. -* `getCity` - returns city name from an individual address. -* `getFirstName` - returns first name from an individual address. -* `getLastName` - returns last name from an individual address. -* `getCountry` - returns country name from an individual address. -* `getPhone` - return phone number from an individual address. -* `getEmail` - returns e-mail address from an individual address. -* `getProvince` - returns province (state) from an individual address. -* `getCompanyName` - returns company name from an individual address. -* `getTaxNumber` - returns tax number from an individual address. -* `getApartmentNumber` - returns apartment number from an individual address. -* `isDefault` - return information if address is current default. - -## Example -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useUserBilling, userBillingGetters } from '@vue-storefront/magento'; - -export default { - setup() { - const { - billing, - load, - addAddress, - deleteAddress, - updateAddress - } = useUserBilling(); - - // If you're using Nuxt or any other framework for Universal Vue apps - onSSR(async () => { - await load(); - }); - - return { - billing: computed(() => userBillingGetters.getAddresses(billing.value)), - userBillingGetters - }; - } -}; -``` diff --git a/docs/guide/composables/use-user-order.md b/docs/guide/composables/use-user-order.md deleted file mode 100644 index 68f2f149f..000000000 --- a/docs/guide/composables/use-user-order.md +++ /dev/null @@ -1,44 +0,0 @@ -# useUserOrder - -`useUserOrders` composable is responsible, as it's name suggests for interactions with user's order history from your eCommerce. - -## API - -```typescript -interface UseUserOrder { - orders: ComputedProperty; - search(params: ComposableFunctionArgs): Promise; - loading: ComputedProperty; - error: ComputedProperty; -} -``` - -* `orders` - a main data object that contains an array of orders fetched by searchOrders method. -* `totalOrder` - Returns the total `number` of `orders` for the current User -* `error` - reactive object containing the error message, if some properties failed for any reason. -* `loading` - a reactive object containing information about loading state of your searchOrders method. - -## Example - -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useUserOrder } from '@vue-storefront/magento'; -import { computed } from '@vue/composition-api'; - -export default { - setup() { - const { - orders, - searchOrders - } = useUserOrders(); - - onSSR(async () => { - await searchOrder(); - }); - - return { - orders: computed(() => orders ? orders.value : []) - } - } -} -``` diff --git a/docs/guide/composables/use-user-shipping.md b/docs/guide/composables/use-user-shipping.md deleted file mode 100644 index 8820f9cbb..000000000 --- a/docs/guide/composables/use-user-shipping.md +++ /dev/null @@ -1,56 +0,0 @@ -# useUserShipping - -`useShipping` composable can be used for: -* Loading shipping address for the current cart. -* Saving shipping address for the current cart. - -## API -````typescript -interface UseUserShipping { - shipping: ComputedProperty; - addAddress: (params: { - address: USER_SHIPPING_ITEM; - }) => Promise; - deleteAddress: (params: { - address: USER_SHIPPING_ITEM; - }) => Promise; - updateAddress: (params: { - address: USER_SHIPPING_ITEM; - }) => Promise; - load: () => Promise; - setDefaultAddress: (params: { - address: USER_SHIPPING_ITEM; - }) => Promise; - loading: ComputedProperty; - error: ComputedProperty; -} -```` - -* `load` - function for fetching shipping address. When invoked, it requests data from the API and populates shipping property. This method accepts a single optional params object. -* `save` - function for saving shipping address. This method accepts a single saveParams object. -* `shipping` - a main data object that contains a shipping address. -* `addAddress` - function for adding a shipping address. This method accepts addressParams object -* `deleteAddress` - function for deleting a shipping address. This method accepts addressParams object -* `updateAddress` - function for updating a shipping address. This method accepts addressParams object -* `loading` - a reactive object containing information about loading state of your load or save method. -* `error` - a reactive object containing the error message, if load or save failed for any reason. - -## Example -```javascript -import { useShipping } from '@vue-storefront/magento'; -import { onSSR } from '@vue-storefront/core'; - -export default { - setup () { - const { load, shipping } = useShipping(); - - onSSR(async () => { - await load(); - }); - - return { - shipping - }; - } -} -``` diff --git a/docs/guide/composables/use-user.md b/docs/guide/composables/use-user.md deleted file mode 100644 index 31cfce636..000000000 --- a/docs/guide/composables/use-user.md +++ /dev/null @@ -1,82 +0,0 @@ -# useUser - -`useUser` composable can be used to: -* manage user authentication -* manage authentication data like email address, login or password. -* If you want to fetch/save other user data you should use the following composables: - -* `useUserBilling` -* `useUserShipping` -* `useUserOrders` - -## API -```typescript -interface UseUser { - user: ComputedProperty; - setUser: (user: USER) => void; - updateUser: (params: { - user: UPDATE_USER_PARAMS; - }) => Promise; - register: (params: { - user: UseUserRegisterParams; - }) => Promise; - login: (params: { - user: UseUserLoginParams; - }) => Promise; - logout: () => Promise; - changePassword: (params: { - current: string; - new: string; - }) => Promise; - load: () => Promise; - isAuthenticated: Ref; - loading: ComputedProperty; - error: ComputedProperty; -} -``` - -* `user` - reactive object containing information about current user. -* `updateUser` - function for updating user data. When invoked, it submits data to the API and populates user property with updated information. This method accepts a single params object. -* `register` - function for creating a new user. When invoked, it submits new user data to the API and saves them. This method accepts a single params object. -* `login` - function for log in a user based on a username and password. This method accepts a single params object. -* `logout` - function for logout a user. -* `changePassword` - function for changing user password. This method accepts a single params object. -* `isAuthenticated` - checks if user is authenticated or not. -* `loading` - reactive object containing information about loading state of user. -* `error` - reactive object containing the error message, if some properties failed for any reason. - -## Getters -````typescript -interface UserGetters { - getFirstName: (customer: USER) => string; - getLastName: (customer: USER) => string; - getFullName: (customer: USER) => string; - getEmailAddress: (customer: USER) => string; - [getterName: string]: (element: any, options?: any) => unknown; -} -```` -* `getFirstName` - returns user first name. -* `getLastName` - returns user last name. -* `getFullName` - returns full user name. -* `getEmailAddress` - returns user email address. - -## Example -```javascript -import { - useUser -} from '@vue-storefront/magento'; - -export default { - setup () { - const { user, register, login, loading } = useUser(); - - return { - register, - login, - loading, - firstName: userGetters.getFirstName(user.value), - email: userGetters.getEmailAddress(user.value) - } - } -} -``` diff --git a/docs/guide/composables/use-wishlist.md b/docs/guide/composables/use-wishlist.md deleted file mode 100644 index 0fd5c3d9f..000000000 --- a/docs/guide/composables/use-wishlist.md +++ /dev/null @@ -1,94 +0,0 @@ -# useWishlist - -`useWishlist` composable is responsible, for integrating with wishlist from Magento. It allows to: -* fetch products from wishlist -* add products to wishlist -* remove products from wishlist -* check if product is on wishlist - -## API -```typescript - interface UseWishlist { - wishlist: ComputedProperty; - loading: ComputedProperty; - addItem(params: { - product: PRODUCT; - customQuery?: CustomQuery; - }): Promise; - removeItem(params: { - product: WISHLIST_ITEM; - customQuery?: CustomQuery; - }): Promise; - load(): Promise; - load(params: { - customQuery?: CustomQuery; - }): Promise; - clear(): Promise; - setWishlist: (wishlist: WISHLIST) => void; - isOnWishlist({ product: PRODUCT }: { - product: any; - }): boolean; - error: ComputedProperty; -} -``` - -* `wishlist` - a main data object. -* `load` - function used to retrieve wishlist products. When invoked, it requests data from the API and populates wishlist property. This method accepts a single params object. -* `addItem` - function used to add new product to wishlist. When invoked, it submits data to the API and populates wishlist property with updated information. This method accepts a single params object. -* `removeItem` - function that removes products from the wishlist. It submits data to the API and populates updated wishlist property. This method accepts a single params object. -* `clear` - function that removes all products from the wishlist and populates clear wishlist property. -* `isOnWishlist` - function that checks if product is on the wishlist. It returns boolean value. This method accepts a single params object. -* `loading` - function that checks if product is on the wishlist. It returns boolean value. This method accepts a single params object. -* `error` - reactive object containing the error message, if some properties failed for any reason. - -## Getters -> WIP - -````typescript -interface WishlistGetters { - getItems: (wishlist: WISHLIST) => WISHLIST_ITEM[]; - getItemName: (wishlistItem: WISHLIST_ITEM) => string; - getItemImage: (wishlistItem: WISHLIST_ITEM) => string; - getItemPrice: (wishlistItem: WISHLIST_ITEM) => AgnosticPrice; - getItemAttributes: (wishlistItem: WISHLIST_ITEM, filters?: Array) => Record; - getItemSku: (wishlistItem: WISHLIST_ITEM) => string; - getTotals: (wishlist: WISHLIST) => AgnosticTotals; - getTotalItems: (wishlist: WISHLIST) => number; - getFormattedPrice: (price: number) => string; - [getterName: string]: (element: any, options?: any) => unknown; -} -```` -* `getItems` - returns list of products on wishlist -* `getItemName` - returns product's name from wishlist. -* `getItemImage` - returns product's image from wishlist. -* `getItemPrice` - returns product's price from wishlist. -* `getItemQty` - returns quantity of product which is on wishlist. -* `getItemAttributes` - returns product variant attribute chosen by its name. -* `getItemSku` - returns product's SKU code. -* `getTotals` - returns price of products. -* `getTotalItems` - returns amount of all items that are currently on wishlist. -* `getFormattedPrice` - returns price in formatted manner taking into account local specifics. - -## Example - -```javascript -import { onSSR } from '@vue-storefront/core'; -import { useWishlist, wishlistGetters } from '@vue-storefront/magento'; -export default { - setup() { - const { load: loadWishlist } = useWishlist(); - - const wishlistItems = computed(() => wishlistGetters.getItems()); - - // If you're using Nuxt or any other framework for Universal Vue apps - onSSR(async () => { - await loadWishlist(); - }); - - return { - loadWishlist, - wishlistItems - }; - } -}; -``` diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md index cfa5e8305..88023878e 100644 --- a/docs/guide/configuration.md +++ b/docs/guide/configuration.md @@ -11,8 +11,8 @@ For configure the integration using `environment variables`, you can have a `.en STORE_ENV=dev # Store environment (Usage for file configuration) NUXT_APP_ENV=development # Define nuxt application environment NUXT_APP_PORT=3000 # Define nuxt port -MAGENTO_GRAPHQL=https://{YOUR_SITE_FRONT_URL}/graphql # Define Magento GraphQL endpoint -MAGENTO_EXTERNAL_CHECKOUT=false # Flag if VSF will use External Checkout +MAGENTO_GRAPHQL_URL=https://{YOUR_SITE_FRONT_URL}/graphql # Define Magento GraphQL endpoint +MAGENTO_EXTERNAL_CHECKOUT_ENABLED=false # Flag if VSF will use External Checkout MAGENTO_EXTERNAL_CHECKOUT_URL=https://{YOUR_SITE_FRONT_URL} # External checkout URL MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH=/vue/cart/sync # External Checkout synchronization path MAGENTO_BASE_URL={YOUR_SITE_FRONT_URL} # base url of your Magento instance @@ -45,6 +45,12 @@ Then on the `config` folder create a file `dev.json` with your configurations. } ``` + +## Store Config +This type contains information about the Magento's Store Configuration which is stored in Pinia `$state.storeConfig`. To avoid over fetch, by default, the amount of data pulled from Magento is minimal but as your application grows you might want to pull more config data for different purposes. + +Plugin `plugins/storeConfigPlugin.ts` is responsible for initial population of the Store Config data based on query in `plugins/query/StoreConfig.gql.ts`. To modify the initial Store Configuration state simply adjust the query to your needs. + ## Multistore and localization Each Magento Store View need to have corresponding locale configuration object in `i18n.locales` array in `nuxt.config.js`. @@ -87,23 +93,23 @@ By default, we use the `ipx` provider. that means the images are fetched from Ma ### How to configure external image provider 1. Configure ENV variables - 1. `MAGENTO_BASE_URL` - base URL of Magento shop. It's used by the `useImage` composable to extract image's path from full Magento URL. - 2. `IMAGE_PROVIDER` - for example: `cloudinary`. List of available providers is [here](https://image.nuxtjs.org/getting-started/providers) - 3. `IMAGE_PROVIDER_BASE_URL` - the base url of your project in for example cloudinary or other image providers + 1. `MAGENTO_BASE_URL` - base URL of Magento shop. It's used by the `useImage` composable to extract image's path from full Magento URL. + 2. `IMAGE_PROVIDER` - for example: `cloudinary`. List of available providers is [here](https://image.nuxtjs.org/getting-started/providers) + 3. `IMAGE_PROVIDER_BASE_URL` - the base url of your project in for example cloudinary or other image providers 2. Configure your provider in `nuxt.config.js`. Here is the example: ```javascript image: { - provider: config.get('imageProvider'), + provider: process.env.VSF_IMAGE_PROVIDER magekit: { - baseURL: config.get('imageProviderBaseUrl'), + baseURL: process.env.VSF_IMAGE_PROVIDER_BASE_URL } }, ``` 3. Sync your Magento images with external provider - 1. For example if you have anb image in Magento with path `{YOUR_MAGENTO_BASE_URL}o/media/catalog/product/w/g/wg02-bk-0.jpg` - you should have corresponding image in your external provider: `media/catalog/product/w/g/wg02-bk-0.jpg` + 1. For example if you have anb image in Magento with path `{YOUR_MAGENTO_BASE_URL}o/media/catalog/product/w/g/wg02-bk-0.jpg` + you should have corresponding image in your external provider: `media/catalog/product/w/g/wg02-bk-0.jpg` 4. Sync your local images with external provider - 1. Upload content of `static` directory to your external media library + 1. Upload content of `static` directory to your external media library ### The useImage composable @@ -117,20 +123,21 @@ That methods returns an URL to image, without magento base url, and cache part. When you want to use this composable you need to: 1. import it in component -`import { useImage } from '~/composables';` + `import { useImage } from '~/composables';` 2. Export `getMagentoImage to a template ```javascript // component body (typically a setup() function) const { getMagentoImage } = useImage(); return { - ... // other things like computed properties, methods and so on - getMagentoImage + ... // other things like computed properties, methods and so on + getMagentoImage } ``` 3. Use the `getMagentoImage` method in template like this: ```vue - ({ + products: (context) => ({ ...context, query: customProductsQuery, // Your custom query }) @@ -92,6 +92,6 @@ In order to query `cld_data`, you need to have [Cloudinary Magento extension](ht ### Important notes -**Only** attributes presented on `ProductInterface` are accessible via GraphQL without any additional modification on the Magento side. +**Only** attributes presented on `ProductInterface` are accessible via GraphQL without any additional modification on the Magento side. To be able to get any custom attributes you must extend GraphQL schema in the Magento2. Follow [Magento 2 documentation](https://devdocs.magento.com/guides/v2.4/graphql/develop/extend-existing-schema.html) to achieve that. diff --git a/docs/guide/ssr.md b/docs/guide/ssr.md index 0d741e161..069d7d4ca 100644 --- a/docs/guide/ssr.md +++ b/docs/guide/ssr.md @@ -17,11 +17,11 @@ The cached pages are: To invalidate a tag and remove pages associated with that tag, use the [Invalidation endpoint](https://docs.vuestorefront.io/v2/performance/ssr-cache.html#invalidating-tags). -Go to the route configured in the `.env` file under the `REDIS__CACHE_INVALIDATE_KEY` key with two query parameters: -* `key` — string matching the `REDIS__CACHE_INVALIDATE_KEY` key in the `.env` file. +Go to the route configured in the `.env` file under the `VSF_REDIS_CACHE_INVALIDATE_KEY` key with two query parameters: +* `key` — string matching the `VSF_REDIS_CACHE_INVALIDATE_KEY` key in the `.env` file. * `tags` — a comma-separated list of tags for invalidation. -Assuming that you are running the application locally, the `REDIS__CACHE_INVALIDATE_URL` key is equal to `/cache-invalidate,` and the `REDIS__CACHE_INVALIDATE_KEY` key is equal to `secret_key`, and you want to invalidate the `Vhome` tag, the full URL will look like this: +Assuming that you are running the application locally, the `VSF_REDIS_CACHE_INVALIDATE_URL` key is equal to `/cache-invalidate,` and the `VSF_REDIS_CACHE_INVALIDATE_KEY` key is equal to `secret_key`, and you want to invalidate the `Vhome` tag, the full URL will look like this: ## How to cache other pages @@ -50,22 +50,21 @@ Once you have the Redis driver installed, you need to add the Redis configuratio ``` .env -REDIS__HOST=127.0.0.1 -REDIS__PORT=6379 -REDIS_PASSWORD= -REDIS__KEY_PREFIX= -REDIS__CACHE_INVALIDATE_URL=/cache-invalidate -REDIS__ENABLED=false +VSF_REDIS_HOST=127.0.0.1 +VSF_REDIS_PORT=6379 +VSF_REDIS_KEY_PREFIX= +VSF_REDIS_CACHE_INVALIDATE_URL=/cache-invalidate +VSF_REDIS_ENABLED=true ``` Then you have to update `nuxt.config.js file` and add this to the `modules` object: ```javascript ['@vue-storefront/cache/nuxt', { - enabled: process.env.REDIS__ENABLED, + enabled: process.env.VSF_REDIS_ENABLED, invalidation: { - endpoint: process.env.REDIS__CACHE_INVALIDATE_URL, - key: process.env.REDIS__CACHE_INVALIDATE_KEY, + endpoint: process.env.VSF_REDIS_CACHE_INVALIDATE_URL, + key: process.env.VSF_REDIS_CACHE_INVALIDATE_KEY, handlers: [ '@vue-storefront/cache/defaultHandler', ], @@ -75,9 +74,9 @@ Then you have to update `nuxt.config.js file` and add this to the `modules` obje { // docs: https://github.com/luin/ioredis/blob/master/API.md#new-redisport-host-options redis: { - keyPrefix: process.env.REDIS__KEY_PREFIX, - host: process.env.REDIS__HOST, - port: process.env.REDIS__PORT, + keyPrefix: process.env.VSF_REDIS_KEY_PREFIX, + host: process.env.VSF_REDIS_HOST, + port: process.env.VSF_REDIS_PORT, }, }, ], diff --git a/docs/guide/supported-features.md b/docs/guide/supported-features.md new file mode 100644 index 000000000..b02db5176 --- /dev/null +++ b/docs/guide/supported-features.md @@ -0,0 +1,97 @@ +# Supported features + +This page shows the Magento 2 features supported by this integration. If the feature you need is not supported, check out our [Roadmap](./roadmap.html) or reach out to us on [our Discord server](https://discord.vuestorefront.io/). + +## Product types + +| Feature | Support | Additional comments | +|-------------------------------|------------|---------------------| +| Simple | ✅ | +| Grouped | ✅ | +| Configurable | ✅ | +| Bundle | ✅ | +| Virtual | 🚧 Partial | Virtual products are displayed and can be added to the cart. However, you have to modify the checkout to hide the shipping step when virtual products are in the cart. +| Downloadable | 🚧 Partial | + +## CMS content + +| Feature | Support | Additional comments | +|-------------------------------|------------|---------------------| +| CMS Pages | ✅ | +| CMS Blocks | ✅ | +| CMS Widgets | 🚧 Partial | +| Page Builder | ❌ | Support is planned for version 1.1. However, we have other ready to use integrations with headless CMS platforms. + +## Category & Search Results Page + +| Feature | Support | Additional comments | +|-------------------------------|------------|---------------------| +| Quick search | ✅ | +| Grid/list mode | ✅ | +| Adding product to cart | ✅ | +| Adding product to wishlist | ✅ | +| Configurable product swatches | ❌ | +| Filtering | ✅ | +| Sorting | ✅ | +| Breadcrumb | ❌ | +| Category Landing Pages | ❌ | + +## Product page + +| Feature | Support | Additional comments | +|-------------------------------|------------|---------------------| +| Breadcrumb | ✅ | +| Pricing | ✅ | +| Special pricing | ✅ | +| Product swatches | ✅ | +| Customizable product options | ❌ | +| Image gallery | ✅ | +| Video in gallery | ❌ | +| Add to wishlist | ✅ | +| Add to compare | ❌ | +| Customer Reviews | ✅ | +| Adding a new review | ✅ | +| Product description | ✅ | +| Product short description | ✅ | +| Related products | ✅ | +| Up-sell products | ✅ | + +## Checkout process + +| Feature | Support | Additional comments | +|-------------------------------|------------|---------------------| +| Mini Cart | ✅ | +| Standalone cart page | ❌ | +| Checkout - shipping step | ✅ | +| Checkout - payment step | ✅ | +| In-Store delivery | ❌ | +| Shipping methods | 🚧 Partial | +| Payment methods | 🚧 Partial | + +## Customer account + +| Feature | Support | Additional comments | +|-------------------------------|------------|---------------------| +| Account Information | ✅ | +| Order history | ✅ | +| Order detail view | ✅ | +| Re-order | ❌ | +| Invoices | ❌ | +| Returns | ❌ | +| Order shipments | ❌ | +| Print order | ❌ | +| Downloadable products | ❌ | +| Wishlist | ✅ | +| Address book | ✅ | +| Stored payment methods | ❌ | +| Reviews | ✅ | +| Newsletter subscription | ✅ | + +## Other features + +| Feature | Support | Additional comments | +|-------------------------------|------------|---------------------| +| Internationalization | ✅ | +| Multistore | ✅ | +| Mega menu | ❌ | +| Product comparison | ❌ | diff --git a/docs/migration-guides/1.0.0-rc.7/index.md b/docs/migration-guides/1.0.0-rc.7/index.md new file mode 100644 index 000000000..13ed518dd --- /dev/null +++ b/docs/migration-guides/1.0.0-rc.7/index.md @@ -0,0 +1,108 @@ +# Vue Storefront for Magento 1.0.0-rc.7 release notes + +Vue Storefront for Magento 1.0.0.rc.7 contains backward-incompatible changes. To review these backward-incompatible changes, see + +[1.0.0-rc.7 **Backward incompatible changes reference**](./rc.7-bic.md) + +## Vue Storefront for Magento 1.0.0-rc.7 highlights + +### Refactoring of composables + +In this version, the integration packages `@vue-storefront/magento` has been marked as deprecated. All things from this package, including composables, getters, and helpers have been moved to `@vue-storefront/magento-theme` + +**All composables have been refactored and moved to the theme.** + +- SharedRefs are not used anymore. + - from now we use the Pinia store for global state management + - instead of sharing context between each composables we use the useContext hook from Nuxt Composition API + - factories have been removed, and from now each composable is a function without dependencies on the `@vue-storefront/core` package + + +**Getters have been moved to the theme package and marked as deprecated.** + +In the next releases, getters will be removed. + +**Helpers have been moved to the theme package** + +### The onSSR hook is not used anymore + +From now, each operation that should be performed on the server-side must be called inside on the `useFetch` and the `useAsync` functions that are part of **Nuxt Composition API**. + +### The i18n plugin is not used anymore + +The i18n plugin from `@vue-storefront/core` is not used anymore. Configuring i18n is the responsibility of the theme package from now. + +### Modularization + +We started the process of split whole app into modules. The first module is the category module that contains components and logic responsible for catalog category pages. In next releases we will continue refactorization and add modules for other parts of app like product, checkout, account, wishlist and so on. + +### New features + +- Breadcrumbs on Category pages [#819](https://github.com/vuestorefront/magento2/pull/819) +- Loading skeletons: [#681](https://github.com/vuestorefront/magento2/pull/681) +- Styles for default Magento Static Blocks that appear on Category Landing Pages: [#685](https://github.com/vuestorefront/magento2/pull/685) +- Added possibility to navigate to nested categories in the mobile side menu [#709](https://github.com/vuestorefront/magento2/pull/709) +- Added information about selected filters in the filters sidebar [#830](https://github.com/vuestorefront/magento2/pull/830) +- Display category title below breadcrumbs [#892](https://github.com/vuestorefront/magento2/pull/892) +- Added mega menu on desktop view [#903](https://github.com/vuestorefront/magento2/pull/903) + +### Performance improvements + +- From now, user data is loaded only on pages where it’s necessary like checkout and my account pages. In other cases, user data is not loading and thanks to that the performance on mobile is better because we decreased the time of JS long tasks. https://github.com/vuestorefront/magento2/pull/859 +- We added the storeConfig plugin and changed the approach to getting config from Magento. [#862](https://github.com/vuestorefront/magento2/pull/862) + - before we loaded the whole Magento config on page load, and we did that in layout so it was not possible to change the use different layout than the default + - after this change, we load only a few necessary fields by the Nuxt plugin. + - Thanks to that it’s possible to use other layouts like default. Moreover, this has an impact on performance because the storeConfig Magento query is not cached on the Magento side, so when we decreased the amount of data, the time of response should be faster. +- Once we updated the Storefront UI to the newest version, we were able to add support for the NuxtImage for images in the Gallery on ta Product Page [#850](https://github.com/vuestorefront/magento2/pull/850) + +### **Bugfix** + +- color swatches are visible on the product page on a mobile device so from now it’s possible to add a configurable product to the cart on mobile devices. [#926](https://github.com/vuestorefront/magento2/pull/926) +- Wishlist and cart transition works correctly from now when a user opens the wishlist sidebar or cart sidebar [#918](https://github.com/vuestorefront/magento2/pull/918) +- Once the message about the not authorized user is displayed, the cookie with a message will be removed to avoid displaying the message endlessly. [#775](https://github.com/vuestorefront/magento2/pull/775) +- From now, it’s possible to add more than one product to the cart from the Category page in list mode [#680](https://github.com/vuestorefront/magento2/pull/680) +- The “your bag is empty” phrase is centered correctly from now [#679](https://github.com/vuestorefront/magento2/pull/679) +- updated the useUser composable to assign error values for an email update action [#777](https://github.com/vuestorefront/magento2/pull/777) +- removed redundant form handling requests to avoid duplicated/multiplicated requests [#777](https://github.com/vuestorefront/magento2/pull/777) +- fixed 404-page issues and my-account redirects for non-logged users [#722](https://github.com/vuestorefront/magento2/pull/722) +- fixed price caching issue on category page [#793](https://github.com/vuestorefront/magento2/pull/793) +- fallow one digit house numbers [#824](https://github.com/vuestorefront/magento2/pull/824) +- The billing address is no longer cleared while returning to the billing step on checkout [#783](https://github.com/vuestorefront/magento2/pull/783) +- removed placeholder for a sorting mechanism in the category navbar [#782](https://github.com/vuestorefront/magento2/pull/782) +- fixed wrong direction of the draggable icon on the product page (mobile) [#927](https://github.com/vuestorefront/magento2/pull/927) +- Click on a product tab click to scroll to tab content from now [#931](https://github.com/vuestorefront/magento2/pull/931) +- Prevented content jump when an option or variant is selected [#933](https://github.com/vuestorefront/magento2/pull/933) + +### Refactors + +- Removed categoryGetters call from AppHeader.vue [#853](https://github.com/vuestorefront/magento2/pull/853) +- Removed storeConfigGetters and storeGetters from StoreSwitcher and StoresModal +- Removed categoryGetters from SearchBar.vue +- Removed category results from the Search results components [#867](https://github.com/vuestorefront/magento2/pull/867) +- Created the category module and refactored the category three components +- refactored Category page’s filters on desktop view [#815](https://github.com/vuestorefront/magento2/pull/815) +- refactored store switcher [#794](https://github.com/vuestorefront/magento2/pull/794) +- refactored cookie retrieval [#797](https://github.com/vuestorefront/magento2/pull/797) +- removed links from order's product [#778](https://github.com/vuestorefront/magento2/pull/778) +- Moved filters to sidebar on desktop view [#884](https://github.com/vuestorefront/magento2/pull/884) +- Created Grid/list components on Category page [#910](https://github.com/vuestorefront/magento2/pull/910) +- Refactored project config & env variables [#813](https://github.com/vuestorefront/magento2/pull/813) +- refactored useUiState [#595](https://github.com/vuestorefront/magento2/pull/595) +- changed homepage slider to the hero section [#928](https://github.com/vuestorefront/magento2/pull/928) +- changed products carousel on the home page to non-carousel section [#914](https://github.com/vuestorefront/magento2/pull/914) +- added skeleton loaders in category nabvar [#936](https://github.com/vuestorefront/magento2/pull/936) + +### Chore + +- Updated StorefrontUI to 0.13.0 [#781](https://github.com/vuestorefront/magento2/pull/781) +- Updated @vue-storefront packages to 2.5.6 [#740](https://github.com/vuestorefront/magento2/pull/740) +- fixed .lintstagedrc {.vue} warning [#779](https://github.com/vuestorefront/magento2/pull/779) +- lint-staged should run only once [#789](https://github.com/vuestorefront/magento2/pull/789) +- auto-assign team members to pull requests [#759](https://github.com/vuestorefront/magento2/pull/759) +- removed commitizen prepare-commit-msg git hook [#780](https://github.com/vuestorefront/magento2/pull/780) +- Merged the three .lintstagedrc regexes into one [#787](https://github.com/vuestorefront/magento2/pull/787) + +### Documentation + +- documentation about composables has been fully rewrote +- added documentation for API Client methods diff --git a/docs/migration-guides/1.0.0-rc.7/rc.7-bic.md b/docs/migration-guides/1.0.0-rc.7/rc.7-bic.md new file mode 100644 index 000000000..19c34a5f9 --- /dev/null +++ b/docs/migration-guides/1.0.0-rc.7/rc.7-bic.md @@ -0,0 +1,88 @@ +# 1.0.0-rc.7 Backward incompatible changes reference + +In this document you can see crucial breaking changes in the `1.0.0-rc.7` comparing to `1.0.0-rc.6` release. To see all changes, please take a look at [the release PR](https://github.com/vuestorefront/magento2/pull/949/files). + +## Composables (@vue-storefront/magento package) + +| File | what and how it changed | +|---------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| packages/composables/nuxt/plugin.js | Has been moved to packages/theme/modules/magento/plugin.ts | +| packages/composables/package.json | build scripts have been changed | +| packages/composables/src/composables/useAddresses/index.ts | - Marked as deprecated - use packages/theme/modules/customer/composables/useAddresses/index.ts instead, return values of the useAddresses composable have been changed | +| packages/composables/src/composables/useBilling/index.ts | - Marked as deprecated - use packages/theme/composables/useBilling/index.ts instead, return values of the useBilling composable have been changed | +| packages/composables/src/composables/useCart/index.ts | - Marked as deprecated - use packages/theme/composables/useCart/index.ts instead, return values of the useCart composable have been changed | +| packages/composables/src/composables/useCategory/index.ts | - Marked as deprecated - use packages/theme/modules/catalog/category/composables/useCategory/index.ts instead,return values of the useCategory composable have been changed | +| packages/composables/src/composables/useCategorySearch/index.ts | - Marked as deprecated - use packages/theme/modules/catalog/category/composables/useCatgegorySearch/index.ts instead | +| packages/composables/src/composables/useConfig/index.ts | - Marked as deprecated - use packages/theme/composables/useConfig/index.ts instead | +| packages/composables/src/composables/useContent/index.ts | - Marked as deprecated - use packages/theme/composables/useContent/index.ts instead, return values of the useContent composable have been changed | +| packages/composables/src/composables/useCountrySearch/index.ts | - Marked as deprecated - use packages/theme/composables/useCountry/index.ts instead, return values of the useCountrySearch composable have been changed | +| packages/composables/src/composables/useCurrency/index.ts | - Marked as deprecated - use packages/theme/composables/useCurrency/index.ts instead, return values of the useCurrency composable have been changed | +| packages/composables/src/composables/useCustomMutation/index.ts | - Marked as deprecated - use the useApi composable to send custom mutations | +| packages/composables/src/composables/useCustomQuery/index.ts | - Marked as deprecated - use the useApi composable to send custom mutations | +| packages/composables/src/composables/useExternalCheckout/index.ts | - Marked as deprecated - use packages/theme/composables/useExternalCheckout/index.ts instead | +| packages/composables/src/composables/useFacet/index.ts | - Marked as deprecated - use packages/theme/composables/useFacet/index.ts instead | +| packages/composables/src/composables/useForgotPassword/index.ts | - Marked as deprecated - use packages/theme/modules/customer/composables/useForgotPassword/index.ts instead | +| packages/composables/src/composables/useGetShippingMethods/index.ts | - Marked as deprecated - use packages/theme/composables/useGetShippingMethods/index.ts instead, return values of the useGetShippingMethods composable have been changed | +| packages/composables/src/composables/useGuestUser/index.ts | - Marked as deprecated - use packages/theme/modules/customer/composables/useGuestUser/index.ts instead, return values of the useGuestUser composable have been changed | +| packages/composables/src/composables/useMakeOrder/index.ts | - Marked as deprecated - use packages/theme/composables/useMakeOrder/index.ts instead, return values of the useMakeOrder composable have been changed | +| packages/composables/src/composables/useNewsletter/index.ts | - Marked as deprecated - use packages/theme/composables/useNewsletter/index.ts instead | +| packages/composables/src/composables/usePaymentProvider/index.ts | - Marked as deprecated - use packages/theme/composables/usePaymentProvider/index.ts instead, return values of the usePaymentProvider composable have been changed | +| packages/composables/src/composables/useProduct/index.ts | - Marked as deprecated - use packages/theme/modules/catalog/product/composables/useProduct/index.ts instead, return values of the useProduct composable have been changed | +| packages/composables/src/composables/useRelatedProducts/index.ts | - Marked as deprecated - use packages/theme/modules/catalog/product/composables/useRelatedProducts/index.ts instead, return values of the useRelatedProducts composable have been changed | +| packages/composables/src/composables/useReview/index.ts | - Marked as deprecated - use packages/theme/composables/useReview/index.ts instead, return values of the useReview composable have been changed | +| packages/composables/src/composables/useShipping/index.ts | - Marked as deprecated - use packages/theme/composables/useShipping/index.ts instead, return values of the useShipping composable have been changed | +| packages/composables/src/composables/useShippingProvider/index.ts | - Marked as deprecated - use packages/theme/composables/useShippingProvider/index.ts instead, return values of the useShippingProvider composable have been changed | +| packages/composables/src/composables/useStore/index.ts | - Marked as deprecated - use packages/theme/composables/useStore/index.ts instead, return values of the useStore composable have been changed | +| packages/composables/src/composables/useUpsellProducts/index.ts | - Marked as deprecated - use packages/theme/modules/catalog/product/composables/useUpsellProducts/index.ts instead, return values of the useUpsellProducts composable have been changed | +| packages/composables/src/composables/useUrlResolver/index.ts | - Marked as deprecated - use packages/theme/composables/useUrlResolver/index.ts instead, return values of the useUrlResolver composable have been changed | +| packages/composables/src/composables/useUser/index.ts | - Marked as deprecated - use packages/theme/modules/customer/composables/useUser/index.ts instead, return values of the useUser composable have been changed | +| packages/composables/src/composables/useUserBilling/index.ts | - Marked as deprecated | +| packages/composables/src/composables/useUserShipping/index.ts | - Marked as deprecated | +| packages/composables/src/composables/useUserOrder/index.ts | - Marked as deprecated - use packages/theme/modules/customer/composables/useUserOrder/index.ts instead, return values of the useUserOrder composable have been changed | +| packages/composables/src/composables/useWishlist/index.ts | - Marked as deprecated - use packages/theme/modules/wishlist/composables/useWishlist/index.ts instead, return values of the useWishlist composable have been changed | +| packages/composables/src/getters/_utils.ts | - marked as deprecated. Use packages/theme/getters/_utils.ts instead | +| packages/composables/src/getters/addressGetter.ts | - marked as deprecated. Use packages/theme/modules/customer/getters/addressGetter.ts instead | +| packages/composables/src/getters/cartGetters.ts | - marked as deprecated. Use packages/theme/getters/cartGetters.ts instead | +| packages/composables/src/getters/categoryGetters.ts | - marked as deprecated | +| packages/composables/src/getters/checkoutGetters.ts | - marked as deprecated. Use packages/theme/getters/checkoutGetters.ts instead | +| packages/composables/src/getters/facetGetters.ts | - marked as deprecated. Use packages/theme/getters/packages/theme/getters/facetGetters.ts instead | +| packages/composables/src/getters/forgotPasswordGetters.ts | - marked as deprecated. | +| packages/composables/src/getters/orderGetters.ts | - marked as deprecated. Use packages/theme/getters/packages/theme/getters/orderGetters.ts instead | +| packages/composables/src/getters/productGetters.ts | - marked as deprecated. Use packages/theme/modules/catalog/product/getters/productGetters.ts instead | +| packages/composables/src/getters/reviewGetters.ts | - marked as deprecated. Use packages/theme/getters/packages/theme/getters/reviewGetters.ts instead | +| packages/composables/src/getters/storeConfigGetters.ts | - marked as deprecated. Use packages/theme/getters/packages/theme/getters/storeConfigGetters.ts instead | +| packages/composables/src/getters/storeGetters.ts | - marked as deprecated. Use packages/theme/getters/packages/theme/getters/storeGetters.ts instead | +| packages/composables/src/getters/userAddressesGetters.ts | - marked as deprecated. Use packages/theme/modules/customer/getters/userAddressesGetters.ts instead | +| packages/composables/src/getters/userBillingGetters.ts | - marked as deprecated. Use packages/theme/modules/customer/getters/userBillingGetters.ts instead | +| packages/composables/src/getters/userGetters.ts | - marked as deprecated. Use packages/theme/modules/customer/getters/userGetters.ts instead | +| packages/composables/src/getters/userShippingGetters.ts | - marked as deprecated. Use packages/theme/modules/customer/getters/userShippingGetters.ts instead | +| packages/composables/src/getters/wishlistGetters.ts | - marked as deprecated. Use packages/theme/getters/packages/theme/getters/wishlistGetters.ts instead | +| packages/composables/src/helpers/buildCategoryTree.ts | - marked as deprecated | +| packages/composables/src/helpers/compareWishlist.ts | - marked as deprecated | +| packages/composables/src/helpers/findItemOnWishlist.ts | - marked as deprecated. Use packages/theme/modules/wishlist/helpers/findItemOnWishlist.ts instead | +| packages/composables/src/helpers/htmlDecoder.ts | - marked as deprecated. Use packages/theme/modules/wishlist/helpers/htmlDecoder.ts instead | +| packages/composables/src/helpers/userAddressManipulator.ts | - marked as deprecated. Use packages/theme/modules/customer/helpers/userAddressManipulator.ts instead | +| packages/composables/src/helpers/userDataGenerator.ts | - marked as deprecated. Use packages/theme/modules/customer/helpers/generateUserData.ts instead | + +## Theme + +In this document, we described the most crucial changes. We recommend checking each component/template to see all changes. + +| File | what and how it changed | +|--------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------| +| packages/theme/.env.example | Variables’ names have been changed | +| packages/theme/components/Category/CategorySidebarMenu.vue | The component has been removed | +| packages/theme/components/Header/SearchBar/SearchResults.vue | Search results for categories have been removed | +| packages/theme/components/MobileMenuSidebar.vue | The component has been removed | +| packages/theme/components/Products/BundleProductSelector.vue | The component has been removed. Use packages/theme/modules/catalog/product/components/BundleProductSelector.vue instead | +| packages/theme/components/UpsellProducts.vue | The component has been removed | +| packages/theme/config.js | This file has been deleted. Use ENV variables instead | + +## API Client + +| File | what and how it changed | +|------------------------------------------|---------------------------------------------------------------------------| +| packages/api-client/package.json | - agentkeepalive dependency has been added, npm scripts have been updated | +| packages/api-client/possible-types.js | Magento URL env variable name has been changed | +| packages/api-client/src/types/GraphQL.ts | types have been updated | +| packages/api-client/src/types/setup.ts | types have been updated | diff --git a/docs/migration-guides/index.md b/docs/migration-guides/index.md new file mode 100644 index 000000000..eda652111 --- /dev/null +++ b/docs/migration-guides/index.md @@ -0,0 +1,3 @@ +# Migration guides + +- [1.0.0-rc.7](./1.0.0-rc.7/) diff --git a/docs/package.json b/docs/package.json index a972b4494..745d1785a 100755 --- a/docs/package.json +++ b/docs/package.json @@ -7,23 +7,23 @@ "repository": "https://github.com/vuestorefront/magento2", "scripts": { "dev": "vuepress dev", - "build": "vuepress build", - "api-extract": "yarn api-ref && yarn comp-ref && yarn ref-md", + "build": "yarn api-extract && vuepress build --max-concurrency=32", + "api-extract": "rimraf api-reference && yarn api-ref && yarn theme-ref && yarn ref-md", "api-ref": "cd ../packages/api-client && api-extractor run --local", - "comp-ref": "cd ../packages/composables && api-extractor run --local", + "theme-ref": "cd ../scripts && node generateApiReference.mjs", "ref-md": "api-documenter markdown --i api-reference --o api-reference" }, "devDependencies": { - "@microsoft/api-documenter": "^7.13.7", - "@microsoft/api-extractor": "^7.18.3", - "@vue-storefront/commercetools-api": "~1.2.0", - "@vuepress/plugin-active-header-links": "^1.8.2", - "@vuepress/plugin-back-to-top": "^1.8.2", - "@vuepress/plugin-medium-zoom": "^1.8.2", - "@vuepress/plugin-search": "^1.8.2", + "@microsoft/api-documenter": "^7.17.12", + "@microsoft/api-extractor": "^7.23.1", + "@vuepress/plugin-active-header-links": "^1.9.7", + "@vuepress/plugin-back-to-top": "^1.9.7", + "@vuepress/plugin-medium-zoom": "^1.9.7", + "@vuepress/plugin-search": "^1.9.7", "handlebars": "^4.7.7", - "typescript": "^3.6.4", - "vuepress": "^1.2.0" + "rimraf": "^3.0.2", + "typescript": "^4.5.4", + "vuepress": "^1.9.7" }, "dependencies": { "sass-loader": "^8.0.2", diff --git a/docs/typedoc.json b/docs/typedoc.json deleted file mode 100644 index 3c5786882..000000000 --- a/docs/typedoc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "hideBreadcrumbs": true, - "hideInPageTOC": true, - "readme": "none", - "plugin": "typedoc-plugin-markdown", - "theme": "./typedoc-vsf-theme", - "entryPoints": ["src/index.ts", "src/api/index.ts"], - "out": "../../docs/api-client" -} diff --git a/docs/yarn.lock b/docs/yarn.lock index 374b01998..07f6037fc 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -2,24 +2,6 @@ # yarn lockfile v1 -"@apollo/client@^3.2.9": - version "3.5.7" - resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.5.7.tgz#38051c0a414ebf784319fa5131faa19df24fa9ec" - integrity sha512-HSLqTGp3sp/PVIWYLLr5v3fjQSr6Fxg6Z5RQj5Q9ALyseIVudD8GZk1jHplaUblTFMBueXGw3Z6DXObuVAr3tw== - dependencies: - "@graphql-typed-document-node/core" "^3.0.0" - "@wry/context" "^0.6.0" - "@wry/equality" "^0.5.0" - "@wry/trie" "^0.3.0" - graphql-tag "^2.12.3" - hoist-non-react-statics "^3.3.2" - optimism "^0.16.1" - prop-types "^15.7.2" - symbol-observable "^4.0.0" - ts-invariant "^0.9.4" - tslib "^2.3.0" - zen-observable-ts "^1.2.0" - "@babel/code-frame@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" @@ -941,79 +923,60 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@commercetools/sdk-auth@^3.0.1": - version "3.0.12" - resolved "https://registry.yarnpkg.com/@commercetools/sdk-auth/-/sdk-auth-3.0.12.tgz#6b6930f697f2311beeb909677df08bd5c7f523b8" - integrity sha512-t7F71oNK+A23hLGzlEYnjTtqhxDUFST8f4l9YAf7mmVCA9Qeu668pDvJ/kf5gVLMQVazEQM8Vjy4JyyeQctEkQ== +"@microsoft/api-documenter@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.17.12.tgz#2596b2e2c6f12a6ebbecf7738af2ae249290a19c" + integrity sha512-XJq58+HwLxw5bY/YPnJnmn2rG1DXHBUIXKWWwphHj9A/sNyYxf5elbvwcsx41+MSNz07pcfW8/neyK5v05MFgA== dependencies: - "@commercetools/sdk-middleware-http" "^6.0.11" - lodash.defaultsdeep "^4.6.0" - qss "2.0.3" - -"@commercetools/sdk-middleware-http@^6.0.11": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@commercetools/sdk-middleware-http/-/sdk-middleware-http-6.1.0.tgz#e4aebc0a4865dab00cd986449d7b395dc86fe124" - integrity sha512-j/k66riaQv50Y3iK0CLJglHh56id7PfxGIDyL0PjlLSkQe2TPVGFnM//CZAQ8a6fHT9adQYLxDMYqlb1nWEDZw== - -"@graphql-typed-document-node/core@^3.0.0": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.1.tgz#076d78ce99822258cf813ecc1e7fa460fa74d052" - integrity sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg== - -"@microsoft/api-documenter@^7.13.7": - version "7.14.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.14.1.tgz#e3b008c51fef4f31b9e53e3c4c8c81b87d89b9b4" - integrity sha512-IFwS3TzVxFh9LSGJuYOWiZ5V+AdYfnLE+WC/VKpeHnSsiW1goLEO+qkoqonvirJr/jQTNuC7NScIjXS2pXODMQ== - dependencies: - "@microsoft/api-extractor-model" "7.15.3" - "@microsoft/tsdoc" "0.13.2" - "@rushstack/node-core-library" "3.45.0" - "@rushstack/ts-command-line" "4.10.6" + "@microsoft/api-extractor-model" "7.17.2" + "@microsoft/tsdoc" "0.14.1" + "@rushstack/node-core-library" "3.45.4" + "@rushstack/ts-command-line" "4.10.10" colors "~1.2.1" js-yaml "~3.13.1" resolve "~1.17.0" -"@microsoft/api-extractor-model@7.15.3": - version "7.15.3" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.15.3.tgz#cf76deeeb2733d974da678f530c2dbaceb18a065" - integrity sha512-NkSjolmSI7NGvbdz0Y7kjQfdpD+j9E5CwXTxEyjDqxd10MI7GXV8DnAsQ57GFJcgHKgTjf2aUnYfMJ9w3aMicw== - dependencies: - "@microsoft/tsdoc" "0.13.2" - "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.45.0" - -"@microsoft/api-extractor@^7.18.3": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.19.4.tgz#95d43d410a1dfb28a02062c4693bcb9c52afe9eb" - integrity sha512-iehC6YA3DGJvxTUaK7HUtQmP6hAQU07+Q/OR8TG4dVR6KpqCi9UPEVk8AgCvQkiK+6FbVEFQTx0qLuYk4EeuHg== - dependencies: - "@microsoft/api-extractor-model" "7.15.3" - "@microsoft/tsdoc" "0.13.2" - "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.45.0" - "@rushstack/rig-package" "0.3.7" - "@rushstack/ts-command-line" "4.10.6" +"@microsoft/api-extractor-model@7.17.2": + version "7.17.2" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.17.2.tgz#033b39a7bac4f3eee3e5ffd406d2af61cedc727e" + integrity sha512-fYfCeBeLm7jnZligC64qHiH4/vzswFLDfyPpX+uKO36OI2kIeMHrYG0zaezmuinKvE4vg1dAz38zZeDbPvBKGg== + dependencies: + "@microsoft/tsdoc" "0.14.1" + "@microsoft/tsdoc-config" "~0.16.1" + "@rushstack/node-core-library" "3.45.4" + +"@microsoft/api-extractor@^7.23.1": + version "7.23.1" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.23.1.tgz#483e339cc73669c709ff215a76eb0e6d9a31de5b" + integrity sha512-J5cTjbMzSZPRZT4AKvFI1KmLGHVhV6bHnFcPo3Og9cN9QmknzpKg5BxvpBecEdFKNZxUpUrBkps2xOQ4Fjc6zg== + dependencies: + "@microsoft/api-extractor-model" "7.17.2" + "@microsoft/tsdoc" "0.14.1" + "@microsoft/tsdoc-config" "~0.16.1" + "@rushstack/node-core-library" "3.45.4" + "@rushstack/rig-package" "0.3.11" + "@rushstack/ts-command-line" "4.10.10" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.5.2" + typescript "~4.6.3" -"@microsoft/tsdoc-config@~0.15.2": - version "0.15.2" - resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz#eb353c93f3b62ab74bdc9ab6f4a82bcf80140f14" - integrity sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA== +"@microsoft/tsdoc-config@~0.16.1": + version "0.16.1" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.16.1.tgz#4de11976c1202854c4618f364bf499b4be33e657" + integrity sha512-2RqkwiD4uN6MLnHFljqBlZIXlt/SaUT6cuogU1w2ARw4nKuuppSmR0+s+NC+7kXBQykd9zzu0P4HtBpZT5zBpQ== dependencies: - "@microsoft/tsdoc" "0.13.2" + "@microsoft/tsdoc" "0.14.1" ajv "~6.12.6" jju "~1.4.0" resolve "~1.19.0" -"@microsoft/tsdoc@0.13.2": - version "0.13.2" - resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz#3b0efb6d3903bd49edb073696f60e90df08efb26" - integrity sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg== +"@microsoft/tsdoc@0.14.1": + version "0.14.1" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.14.1.tgz#155ef21065427901994e765da8a0ba0eaae8b8bd" + integrity sha512-6Wci+Tp3CgPt/B9B0a3J4s3yMgLNSku6w5TV6mN+61C71UqsRBv2FUibBf3tPGlNxebgPHMEUzKpb1ggE8KCKw== "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" @@ -1028,10 +991,10 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@rushstack/node-core-library@3.45.0": - version "3.45.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.45.0.tgz#8c86b39271b6d84260b1e70db87e1e265b54f620" - integrity sha512-YMuIJl19vQT1+g/OU9mLY6T5ZBT9uDlmeXExDQACpGuxTJW+LHNbk/lRX+eCApQI2eLBlaL4U68r3kZlqwbdmw== +"@rushstack/node-core-library@3.45.4": + version "3.45.4" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.45.4.tgz#a5e1246c462940d16a5acc667c1ffe460b514087" + integrity sha512-FMoEQWjK7nWAO2uFgV1eVpVhY9ZDGOdIIomi9zTej64cKJ+8/Nvu+ny0xKaUDEjw/ALftN2D2ml7L0RDpW/Z9g== dependencies: "@types/node" "12.20.24" colors "~1.2.1" @@ -1043,18 +1006,18 @@ timsort "~0.3.0" z-schema "~5.0.2" -"@rushstack/rig-package@0.3.7": - version "0.3.7" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.7.tgz#3fa564b1d129d28689dd4309502792b15e84bf81" - integrity sha512-pzMsTSeTC8IiZ6EJLr53gGMvhT4oLWH+hxD7907cHyWuIUlEXFtu/2pK25vUQT13nKp5DJCWxXyYoGRk/h6rtA== +"@rushstack/rig-package@0.3.11": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.11.tgz#92a05929822610e8b42f2ad330d9ea20afae5165" + integrity sha512-uI1/g5oQPtyrT9nStoyX/xgZSLa2b+srRFaDk3r1eqC7zA5th4/bvTGl2QfV3C9NcP+coSqmk5mFJkUfH6i3Lw== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.10.6": - version "4.10.6" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.10.6.tgz#5669e481e4339ceb4e1428183eb0937d3bc3841b" - integrity sha512-Y3GkUag39sTIlukDg9mUp8MCHrrlJ27POrBNRQGc/uF+VVgX8M7zMzHch5zP6O1QVquWgD7Engdpn2piPYaS/g== +"@rushstack/ts-command-line@4.10.10": + version "4.10.10" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.10.10.tgz#69da17b03ce57795b67ea2aabf7c976c81816078" + integrity sha512-F+MH7InPDXqX40qvvcEsnvPpmg566SBpfFqj2fcCh8RjM6AyOoWlXc8zx7giBD3ZN85NVAEjZAgrcLU0z+R2yg== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" @@ -1175,7 +1138,7 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== -"@types/node@*", "@types/node@>=6": +"@types/node@*": version "17.0.9" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.9.tgz#0b7f161afb5b1cc12518d29b2cdc7175d5490628" integrity sha512-5dNBXu/FOER+EXnyah7rn8xlNrfMOQb/qXnw4NQgLkCygKBKhdmF/CA5oXVOKZLBEahw8s2WP9LxIcN/oDDRgQ== @@ -1257,46 +1220,6 @@ anymatch "^3.0.0" source-map "^0.6.0" -"@types/zen-observable@0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d" - integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg== - -"@types/zen-observable@^0.8.0": - version "0.8.3" - resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.3.tgz#781d360c282436494b32fe7d9f7f8e64b3118aa3" - integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw== - -"@vue-storefront/commercetools-api@~1.2.0": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@vue-storefront/commercetools-api/-/commercetools-api-1.2.4.tgz#c85fb21dfc931143f1516f64aeac003a7de38a47" - integrity sha512-rHV3wXfIT85Si5po+hwrnUnP5KWtw7SbNt7akxMDWOSbkg3z+tMAhDDU9lwVOFIvsCiOdBmxty/gQFPbdFrcXw== - dependencies: - "@apollo/client" "^3.2.9" - "@commercetools/sdk-auth" "^3.0.1" - "@vue-storefront/core" "^2.3.4" - apollo-cache-inmemory "^1.6.6" - apollo-client "^2.6.10" - apollo-link "^1.2.14" - apollo-link-context "^1.0.20" - apollo-link-error "^1.1.13" - apollo-link-http "^1.5.17" - apollo-link-retry "^2.2.16" - graphql "^14.5.8" - graphql-tag "^2.10.1" - isomorphic-fetch "^2.2.1" - -"@vue-storefront/core@^2.3.4": - version "2.5.4" - resolved "https://registry.yarnpkg.com/@vue-storefront/core/-/core-2.5.4.tgz#214ec0d2bdc3d2f18abdc45991ac7389aa9e1044" - integrity sha512-J/zzReZ5D1pwKibFyLbcm1355L8+DKYgBms32QZ79AmscoFeRRRhnBFQHQ+DoygtxU2cKNzyMddTIocYdtEBeQ== - dependencies: - axios "0.21.1" - express "^4.17.1" - is-https "^3.0.2" - lodash-es "^4.17.15" - vue "^2.6.11" - "@vue/babel-helper-vue-jsx-merge-props@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz#31624a7a505fb14da1d58023725a4c5f270e6a81" @@ -1435,19 +1358,19 @@ optionalDependencies: prettier "^1.18.2 || ^2.0.0" -"@vuepress/core@1.9.6": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/core/-/core-1.9.6.tgz#9f76d82414155e75fce41176ae9fd7fd085c35e4" - integrity sha512-wZF6Ufz9MubmLgik0uYuNj97xIZ4PMp1DCJMMf2BNwH974CCsKiRmKODoYVEc260FOdnFUINEeqaPL/HscAaPA== +"@vuepress/core@1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/core/-/core-1.9.7.tgz#a23388377f84322b933fc97b6cca32a90d8f5ce2" + integrity sha512-u5eb1mfNLV8uG2UuxlvpB/FkrABxeMHqymTsixOnsOg2REziv9puEIbqaZ5BjLPvbCDvSj6rn+DwjENmBU+frQ== dependencies: "@babel/core" "^7.8.4" "@vue/babel-preset-app" "^4.1.2" - "@vuepress/markdown" "1.9.6" - "@vuepress/markdown-loader" "1.9.6" - "@vuepress/plugin-last-updated" "1.9.6" - "@vuepress/plugin-register-components" "1.9.6" - "@vuepress/shared-utils" "1.9.6" - "@vuepress/types" "1.9.6" + "@vuepress/markdown" "1.9.7" + "@vuepress/markdown-loader" "1.9.7" + "@vuepress/plugin-last-updated" "1.9.7" + "@vuepress/plugin-register-components" "1.9.7" + "@vuepress/shared-utils" "1.9.7" + "@vuepress/types" "1.9.7" autoprefixer "^9.5.1" babel-loader "^8.0.4" bundle-require "2.1.8" @@ -1482,21 +1405,21 @@ webpack-merge "^4.1.2" webpackbar "3.2.0" -"@vuepress/markdown-loader@1.9.6": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/markdown-loader/-/markdown-loader-1.9.6.tgz#dd39e4a70f5e8be94e4051b883b606d95de749c0" - integrity sha512-uPyVzYygBaCsmKPfke+u/c8a855GLJ3iykCkcuAQ5v7NAY9PNtCkND3V5PhmRUGqaN5tHNXJoF74aD0mN1FXOw== +"@vuepress/markdown-loader@1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/markdown-loader/-/markdown-loader-1.9.7.tgz#acd4fa13f1e48f153d509996ccd2895a0dcb5ee2" + integrity sha512-mxXF8FtX/QhOg/UYbe4Pr1j5tcf/aOEI502rycTJ3WF2XAtOmewjkGV4eAA6f6JmuM/fwzOBMZKDyy9/yo2I6Q== dependencies: - "@vuepress/markdown" "1.9.6" + "@vuepress/markdown" "1.9.7" loader-utils "^1.1.0" lru-cache "^5.1.1" -"@vuepress/markdown@1.9.6": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/markdown/-/markdown-1.9.6.tgz#b987288030506969aa13e84dc81382ce539dd583" - integrity sha512-UOq/Wtr5BI5h0O2Iy25O7Xe9RNE1HiBXREOKdjnCDg4lsyenzev5UOVpGCPnbynUb2/kpE8KujEKCgy4a1dWNg== +"@vuepress/markdown@1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/markdown/-/markdown-1.9.7.tgz#6310458b7e2ea08a14d31349209d0b54455e957a" + integrity sha512-DFOjYkwV6fT3xXTGdTDloeIrT1AbwJ9pwefmrp0rMgC6zOz3XUJn6qqUwcYFO5mNBWpbiFQ3JZirCtgOe+xxBA== dependencies: - "@vuepress/shared-utils" "1.9.6" + "@vuepress/shared-utils" "1.9.7" markdown-it "^8.4.1" markdown-it-anchor "^5.0.2" markdown-it-chain "^1.3.0" @@ -1504,62 +1427,77 @@ markdown-it-table-of-contents "^0.4.0" prismjs "^1.13.0" -"@vuepress/plugin-active-header-links@1.9.6", "@vuepress/plugin-active-header-links@^1.8.2": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.9.6.tgz#4204f7d7d660031c7759a01892ff2a18e75a06e9" - integrity sha512-YETxkgEabpUYB56wy0K26tAsta0+MbP0uieTdykm3HpRzwx2pceJkDPV7axLAPHfvHj9MQ6n67Hv+vR+z36krw== +"@vuepress/plugin-active-header-links@1.9.7", "@vuepress/plugin-active-header-links@^1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.9.7.tgz#11b3b148d50ebd0a9a9d9e97aa34d81ae04e7307" + integrity sha512-G1M8zuV9Og3z8WBiKkWrofG44NEXsHttc1MYreDXfeWh/NLjr9q1GPCEXtiCjrjnHZHB3cSQTKnTqAHDq35PGA== dependencies: - "@vuepress/types" "1.9.6" + "@vuepress/types" "1.9.7" lodash.debounce "^4.0.8" -"@vuepress/plugin-back-to-top@^1.8.2": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-back-to-top/-/plugin-back-to-top-1.9.6.tgz#ab724adb646de6f0fc9e61c0c25944414b8601a3" - integrity sha512-GvLyXE8aDOzttwpr9t6EOOP/hEF5Yfr858K4ksRfY9AnGGfGXnNhFgK3uCRweeWQkUKlOAFSdzrmoAHX33DP9w== +"@vuepress/plugin-back-to-top@^1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-back-to-top/-/plugin-back-to-top-1.9.7.tgz#249a76d79f1e0c8c71a2804485ad0245837e6bfd" + integrity sha512-DM1S+Q8Xn/i+zhe4zThekxb1M2abfKLklg/NKtQloklHKdNdVfk+EcxWYNmNfSii+ymDWaaG8lmH0xjVhy0iXw== dependencies: - "@vuepress/types" "1.9.6" + "@vuepress/types" "1.9.7" lodash.debounce "^4.0.8" -"@vuepress/plugin-last-updated@1.9.6": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-last-updated/-/plugin-last-updated-1.9.6.tgz#b5b1db9474169e25a1844192bd36b37e6d4c7031" - integrity sha512-tKP90ujnnrIMa/qb6ErjVfhil7nf7uWIV/T5UZzMvZNBwx25lpdXLPcBtfnCBA1rmxe7PSexCK9wQfrgP6R0VQ== +"@vuepress/plugin-last-updated@1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-last-updated/-/plugin-last-updated-1.9.7.tgz#9f2d78fe7ced618d0480bf40a3e32b40486bac6d" + integrity sha512-FiFBOl49dlFRjbLRnRAv77HDWfe+S/eCPtMQobq4/O3QWuL3Na5P4fCTTVzq1K7rWNO9EPsWNB2Jb26ndlQLKQ== dependencies: - "@vuepress/types" "1.9.6" + "@vuepress/types" "1.9.7" cross-spawn "^6.0.5" -"@vuepress/plugin-medium-zoom@^1.8.2": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-medium-zoom/-/plugin-medium-zoom-1.9.6.tgz#1e9165f2a9dcd194b12ef447f95416967b44b6a2" - integrity sha512-jAJg/iO9rttr5OyTgbiH8zjhC5CXqoTgrusK1aEP1gX7TLlXfNPuNzYvfgDQScgJye0L1qG7NyKk4nrGdChD3A== +"@vuepress/plugin-medium-zoom@^1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-medium-zoom/-/plugin-medium-zoom-1.9.7.tgz#077330aafd23e2cc8372e0041589875345edb80a" + integrity sha512-P00chXEEoFyQyDWiiSw1mUIdywS6vqM9jolM/3Gv3/TywqemWEm1MKMM7mLsjGiaXJbBQZE+U3/lHmzcaroYLQ== dependencies: - "@vuepress/types" "1.9.6" + "@vuepress/types" "1.9.7" medium-zoom "^1.0.4" -"@vuepress/plugin-nprogress@1.9.6": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-nprogress/-/plugin-nprogress-1.9.6.tgz#413c069768b7295ba64f2b59e316fd9bd6298e2c" - integrity sha512-tNBwsR5H5kTQfTM6fE/UOUxC7J2xOmed6LGVF5ZcsjfnjiLcKHqOn0EPkaLVqgVMGWkV8ZqGS9sQWAEncYDa+Q== +"@vuepress/plugin-nprogress@1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-nprogress/-/plugin-nprogress-1.9.7.tgz#76d8368fa26c190ee23c399401a71ec78ffb9744" + integrity sha512-sI148igbdRfLgyzB8PdhbF51hNyCDYXsBn8bBWiHdzcHBx974sVNFKtfwdIZcSFsNrEcg6zo8YIrQ+CO5vlUhQ== dependencies: - "@vuepress/types" "1.9.6" + "@vuepress/types" "1.9.7" nprogress "^0.2.0" -"@vuepress/plugin-register-components@1.9.6": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-register-components/-/plugin-register-components-1.9.6.tgz#033012d54bcdc66812e3ba4dd67a3f0af49a87b8" - integrity sha512-Efxb8xqinFathB5ZUMVjolY3uYXqM3lL4vNbZjwJVcDgtz13Vc9ZpHcqdEUfsYGtiwiMrwp796oTKw45RdPJMw== +"@vuepress/plugin-register-components@1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-register-components/-/plugin-register-components-1.9.7.tgz#0234f887b32c1d836fa68cdd06d7e851397fd268" + integrity sha512-l/w1nE7Dpl+LPMb8+AHSGGFYSP/t5j6H4/Wltwc2QcdzO7yqwC1YkwwhtTXvLvHOV8O7+rDg2nzvq355SFkfKA== dependencies: - "@vuepress/shared-utils" "1.9.6" - "@vuepress/types" "1.9.6" + "@vuepress/shared-utils" "1.9.7" + "@vuepress/types" "1.9.7" -"@vuepress/plugin-search@1.9.6", "@vuepress/plugin-search@^1.8.2": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-1.9.6.tgz#580d8988c619ed05a929f6bf157745867757e56f" - integrity sha512-zDhSUZAhelJEIV7DwpSbmGI0jz+zzNQdWVfGdE0xj7Ca6SMPq9ay9imZYjNBEVG9MYu0McubsvB1gpaBpc1Umg== +"@vuepress/plugin-search@1.9.7", "@vuepress/plugin-search@^1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-1.9.7.tgz#37a4714973ccac8c28837fc72a38ae0888d874bf" + integrity sha512-MLpbUVGLxaaHEwflFxvy0pF9gypFVUT3Q9Zc6maWE+0HDWAvzMxo6GBaj6mQPwjOqNQMf4QcN3hDzAZktA+DQg== dependencies: - "@vuepress/types" "1.9.6" + "@vuepress/types" "1.9.7" -"@vuepress/shared-utils@1.9.6", "@vuepress/shared-utils@^1.2.0": +"@vuepress/shared-utils@1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/shared-utils/-/shared-utils-1.9.7.tgz#f1203c7f48e9d546078f5f9b2ec5200b29da481b" + integrity sha512-lIkO/eSEspXgVHjYHa9vuhN7DuaYvkfX1+TTJDiEYXIwgwqtvkTv55C+IOdgswlt0C/OXDlJaUe1rGgJJ1+FTw== + dependencies: + chalk "^2.3.2" + escape-html "^1.0.3" + fs-extra "^7.0.1" + globby "^9.2.0" + gray-matter "^4.0.1" + hash-sum "^1.0.2" + semver "^6.0.0" + toml "^3.0.0" + upath "^1.1.0" + +"@vuepress/shared-utils@^1.2.0": version "1.9.6" resolved "https://registry.yarnpkg.com/@vuepress/shared-utils/-/shared-utils-1.9.6.tgz#2c9add7d03535205b77ad6be49b911e40de44592" integrity sha512-Bzn5q2Yjpji4ZF8zD9p1brTQFOTqNRCSOkoMDqR+oNt4L1SbreT08gi7BNjaeJTbNsr/S+SNSIcQHHgGO+5GOg== @@ -1574,15 +1512,15 @@ toml "^3.0.0" upath "^1.1.0" -"@vuepress/theme-default@1.9.6": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/theme-default/-/theme-default-1.9.6.tgz#11da7d1d0ba28660f77198992d51660992dcf213" - integrity sha512-bw4L2h5yZReQM5qbz8dqF8+VlohtEH/PS7OCBU0x4HEiCo3cr0KpWP+unfxEY+CWqHeFljywCwwQQH2ikp6luQ== +"@vuepress/theme-default@1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/theme-default/-/theme-default-1.9.7.tgz#9e928b724fdcb12715cc513fdbc27b965944c4a1" + integrity sha512-NZzCLIl+bgJIibhkqVmk/NSku57XIuXugxAN3uiJrCw6Mu6sb3xOvbk0En3k+vS2BKHxAZ6Cx7dbCiyknDQnSA== dependencies: - "@vuepress/plugin-active-header-links" "1.9.6" - "@vuepress/plugin-nprogress" "1.9.6" - "@vuepress/plugin-search" "1.9.6" - "@vuepress/types" "1.9.6" + "@vuepress/plugin-active-header-links" "1.9.7" + "@vuepress/plugin-nprogress" "1.9.7" + "@vuepress/plugin-search" "1.9.7" + "@vuepress/types" "1.9.7" docsearch.js "^2.5.2" lodash "^4.17.15" stylus "^0.54.8" @@ -1590,10 +1528,10 @@ vuepress-plugin-container "^2.0.2" vuepress-plugin-smooth-scroll "^0.0.3" -"@vuepress/types@1.9.6": - version "1.9.6" - resolved "https://registry.yarnpkg.com/@vuepress/types/-/types-1.9.6.tgz#72f27ade625a6504fa9fb14c90fe59231e89ad5f" - integrity sha512-xNhgCeH2/cCACeZyAXhZ2yTJcC1OsE8aBP6vIHme+69ZcpAs4ZkvAHADCrouqSzgz73IOhN1ZPV8jkMvTtyoNg== +"@vuepress/types@1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@vuepress/types/-/types-1.9.7.tgz#aeb772fd0f7c2a10c6ec1d3c803a2e4b1d756c24" + integrity sha512-moLQzkX3ED2o18dimLemUm7UVDKxhcrJmGt5C0Ng3xxrLPaQu7UqbROtEKB3YnMRt4P/CA91J+Ck+b9LmGabog== dependencies: "@types/markdown-it" "^10.0.0" "@types/webpack-dev-server" "^3" @@ -1744,42 +1682,6 @@ "@webassemblyjs/wast-parser" "1.9.0" "@xtuc/long" "4.2.2" -"@wry/context@^0.4.0": - version "0.4.4" - resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.4.4.tgz#e50f5fa1d6cfaabf2977d1fda5ae91717f8815f8" - integrity sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag== - dependencies: - "@types/node" ">=6" - tslib "^1.9.3" - -"@wry/context@^0.6.0": - version "0.6.1" - resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.6.1.tgz#c3c29c0ad622adb00f6a53303c4f965ee06ebeb2" - integrity sha512-LOmVnY1iTU2D8tv4Xf6MVMZZ+juIJ87Kt/plMijjN20NMAXGmH4u8bS1t0uT74cZ5gwpocYueV58YwyI8y+GKw== - dependencies: - tslib "^2.3.0" - -"@wry/equality@^0.1.2": - version "0.1.11" - resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz#35cb156e4a96695aa81a9ecc4d03787bc17f1790" - integrity sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA== - dependencies: - tslib "^1.9.3" - -"@wry/equality@^0.5.0": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.5.2.tgz#72c8a7a7d884dff30b612f4f8464eba26c080e73" - integrity sha512-oVMxbUXL48EV/C0/M7gLVsoK6qRHPS85x8zECofEZOVvxGmIPLA9o5Z27cc2PoAyZz1S2VoM2A7FLAnpfGlneA== - dependencies: - tslib "^2.3.0" - -"@wry/trie@^0.3.0": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@wry/trie/-/trie-0.3.1.tgz#2279b790f15032f8bcea7fc944d27988e5b3b139" - integrity sha512-WwB53ikYudh9pIorgxrkHKrQZcCqNM/Q/bDzZBffEaGUKGuHrRb3zZUT9Sh2qw9yogC7SsdRmQ1ER0pqvd3bfw== - dependencies: - tslib "^2.3.0" - "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -1933,103 +1835,6 @@ anymatch@^3.0.0, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" -apollo-cache-inmemory@^1.6.6: - version "1.6.6" - resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.6.6.tgz#56d1f2a463a6b9db32e9fa990af16d2a008206fd" - integrity sha512-L8pToTW/+Xru2FFAhkZ1OA9q4V4nuvfoPecBM34DecAugUZEBhI2Hmpgnzq2hTKZ60LAMrlqiASm0aqAY6F8/A== - dependencies: - apollo-cache "^1.3.5" - apollo-utilities "^1.3.4" - optimism "^0.10.0" - ts-invariant "^0.4.0" - tslib "^1.10.0" - -apollo-cache@1.3.5, apollo-cache@^1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.3.5.tgz#9dbebfc8dbe8fe7f97ba568a224bca2c5d81f461" - integrity sha512-1XoDy8kJnyWY/i/+gLTEbYLnoiVtS8y7ikBr/IfmML4Qb+CM7dEEbIUOjnY716WqmZ/UpXIxTfJsY7rMcqiCXA== - dependencies: - apollo-utilities "^1.3.4" - tslib "^1.10.0" - -apollo-client@^2.6.10: - version "2.6.10" - resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.6.10.tgz#86637047b51d940c8eaa771a4ce1b02df16bea6a" - integrity sha512-jiPlMTN6/5CjZpJOkGeUV0mb4zxx33uXWdj/xQCfAMkuNAC3HN7CvYDyMHHEzmcQ5GV12LszWoQ/VlxET24CtA== - dependencies: - "@types/zen-observable" "^0.8.0" - apollo-cache "1.3.5" - apollo-link "^1.0.0" - apollo-utilities "1.3.4" - symbol-observable "^1.0.2" - ts-invariant "^0.4.0" - tslib "^1.10.0" - zen-observable "^0.8.0" - -apollo-link-context@^1.0.20: - version "1.0.20" - resolved "https://registry.yarnpkg.com/apollo-link-context/-/apollo-link-context-1.0.20.tgz#1939ac5dc65d6dff0c855ee53521150053c24676" - integrity sha512-MLLPYvhzNb8AglNsk2NcL9AvhO/Vc9hn2ZZuegbhRHGet3oGr0YH9s30NS9+ieoM0sGT11p7oZ6oAILM/kiRBA== - dependencies: - apollo-link "^1.2.14" - tslib "^1.9.3" - -apollo-link-error@^1.1.13: - version "1.1.13" - resolved "https://registry.yarnpkg.com/apollo-link-error/-/apollo-link-error-1.1.13.tgz#c1a1bb876ffe380802c8df0506a32c33aad284cd" - integrity sha512-jAZOOahJU6bwSqb2ZyskEK1XdgUY9nkmeclCrW7Gddh1uasHVqmoYc4CKdb0/H0Y1J9lvaXKle2Wsw/Zx1AyUg== - dependencies: - apollo-link "^1.2.14" - apollo-link-http-common "^0.2.16" - tslib "^1.9.3" - -apollo-link-http-common@^0.2.16: - version "0.2.16" - resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.16.tgz#756749dafc732792c8ca0923f9a40564b7c59ecc" - integrity sha512-2tIhOIrnaF4UbQHf7kjeQA/EmSorB7+HyJIIrUjJOKBgnXwuexi8aMecRlqTIDWcyVXCeqLhUnztMa6bOH/jTg== - dependencies: - apollo-link "^1.2.14" - ts-invariant "^0.4.0" - tslib "^1.9.3" - -apollo-link-http@^1.5.17: - version "1.5.17" - resolved "https://registry.yarnpkg.com/apollo-link-http/-/apollo-link-http-1.5.17.tgz#499e9f1711bf694497f02c51af12d82de5d8d8ba" - integrity sha512-uWcqAotbwDEU/9+Dm9e1/clO7hTB2kQ/94JYcGouBVLjoKmTeJTUPQKcJGpPwUjZcSqgYicbFqQSoJIW0yrFvg== - dependencies: - apollo-link "^1.2.14" - apollo-link-http-common "^0.2.16" - tslib "^1.9.3" - -apollo-link-retry@^2.2.16: - version "2.2.16" - resolved "https://registry.yarnpkg.com/apollo-link-retry/-/apollo-link-retry-2.2.16.tgz#745ff51e60a7a68b34c8d382832856c43a9c306c" - integrity sha512-7F9+meFAz4dw5gtgtLsRFqJW6QzNOhTzt5R5Hsy+yFhkTW9LddgYO7gxN9n7RN/7Ouosh3TcpUkdHs2laC+0sA== - dependencies: - "@types/zen-observable" "0.8.0" - apollo-link "^1.2.14" - tslib "^1.9.3" - -apollo-link@^1.0.0, apollo-link@^1.2.14: - version "1.2.14" - resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz#3feda4b47f9ebba7f4160bef8b977ba725b684d9" - integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg== - dependencies: - apollo-utilities "^1.3.0" - ts-invariant "^0.4.0" - tslib "^1.9.3" - zen-observable-ts "^0.8.21" - -apollo-utilities@1.3.4, apollo-utilities@^1.3.0, apollo-utilities@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz#6129e438e8be201b6c55b0f13ce49d2c7175c9cf" - integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig== - dependencies: - "@wry/equality" "^0.1.2" - fast-json-stable-stringify "^2.0.0" - ts-invariant "^0.4.0" - tslib "^1.10.0" - aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -2176,13 +1981,6 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -axios@0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== - dependencies: - follow-redirects "^1.10.0" - babel-loader@^8.0.4: version "8.2.3" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.3.tgz#8986b40f1a64cacfcb4b8429320085ef68b1342d" @@ -3648,13 +3446,6 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@^0.1.11: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -4182,7 +3973,7 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@^1.0.0, follow-redirects@^1.10.0: +follow-redirects@^1.0.0: version "1.14.7" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== @@ -4442,20 +4233,6 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== -graphql-tag@^2.10.1, graphql-tag@^2.12.3: - version "2.12.6" - resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.6.tgz#d441a569c1d2537ef10ca3d1633b48725329b5f1" - integrity sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg== - dependencies: - tslib "^2.1.0" - -graphql@^14.5.8: - version "14.7.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.7.0.tgz#7fa79a80a69be4a31c27dda824dc04dac2035a72" - integrity sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA== - dependencies: - iterall "^1.2.2" - gray-matter@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.3.tgz#e893c064825de73ea1f5f7d88c7a9f7274288798" @@ -4627,13 +4404,6 @@ hogan.js@^3.0.2: mkdirp "0.3.0" nopt "1.0.10" -hoist-non-react-statics@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" - integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== - dependencies: - react-is "^16.7.0" - hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" @@ -4779,13 +4549,6 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" @@ -5135,11 +4898,6 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" -is-https@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-https/-/is-https-3.0.2.tgz#4d24e002e47edd3f1b07f14bc722433354ccba49" - integrity sha512-jFgAKhbNF7J+lTMJxbq5z9bf1V9f8rXn9mP5RSY2GUEW5M0nOiVhVC9dNra96hQDjGpNzskIzusUnXwngqmhAA== - is-installed-globally@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141" @@ -5241,7 +4999,7 @@ is-shared-array-buffer@^1.0.1: resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== -is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= @@ -5314,24 +5072,11 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= -isomorphic-fetch@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -iterall@^1.2.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" - integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== - javascript-stringify@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/javascript-stringify/-/javascript-stringify-1.6.0.tgz#142d111f3a6e3dae8f4a9afd77d45855b5a9cce3" @@ -5347,7 +5092,7 @@ jju@~1.4.0: resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo= -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: +js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -5551,11 +5296,6 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash-es@^4.17.15: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" - integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== - lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -5571,11 +5311,6 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= -lodash.defaultsdeep@^4.6.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6" - integrity sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA== - lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" @@ -5626,13 +5361,6 @@ loglevel@^1.6.8: resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.0.tgz#e7ec73a57e1e7b419cb6c6ac06bf050b67356114" integrity sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA== -loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - lower-case@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" @@ -6033,14 +5761,6 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" -node-fetch@^1.0.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - node-forge@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" @@ -6269,21 +5989,6 @@ opn@^5.5.0: dependencies: is-wsl "^1.1.0" -optimism@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.10.3.tgz#163268fdc741dea2fb50f300bedda80356445fd7" - integrity sha512-9A5pqGoQk49H6Vhjb9kPgAeeECfUDF6aIICbMDL23kDLStBn1MWk3YvcZ4xWF9CsSf6XEgvRLkXy4xof/56vVw== - dependencies: - "@wry/context" "^0.4.0" - -optimism@^0.16.1: - version "0.16.1" - resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.16.1.tgz#7c8efc1f3179f18307b887e18c15c5b7133f6e7d" - integrity sha512-64i+Uw3otrndfq5kaoGNoY7pvOhSsjFEN4bdEFh80MWVk/dbgJfMv7VFDeCT8LxNAlEVhQmdVEbfE7X2nWNIIg== - dependencies: - "@wry/context" "^0.6.0" - "@wry/trie" "^0.3.0" - optimize-css-assets-webpack-plugin@^5.0.1: version "5.0.8" resolved "https://registry.yarnpkg.com/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.8.tgz#cbccdcf5a6ef61d4f8cc78cf083a67446e5f402a" @@ -6931,15 +6636,6 @@ promise-inflight@^1.0.1: resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= -prop-types@^15.7.2: - version "15.8.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" - integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.13.1" - proxy-addr@~2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" @@ -7037,11 +6733,6 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== -qss@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/qss/-/qss-2.0.3.tgz#630b38b120931b52d04704f3abfb0f861604a9ec" - integrity sha512-j48ZBT5IZbSqJiSU8EX4XrN8nXiflHvmMvv2XpFc31gh7n6EpSs75bNr6+oj3FOLWyT8m09pTmqLNl34L7/uPQ== - query-string@^5.0.1: version "5.1.1" resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" @@ -7106,11 +6797,6 @@ rc@^1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-is@^16.13.1, react-is@^16.7.0: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" @@ -7381,6 +7067,13 @@ rimraf@^2.5.4, rimraf@^2.6.3: dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -7413,7 +7106,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@^2.1.2, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@^2.1.2, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -8064,16 +7757,6 @@ svgo@^1.0.0: unquote "~1.1.1" util.promisify "~1.0.0" -symbol-observable@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== - -symbol-observable@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205" - integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== - tapable@^1.0.0, tapable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" @@ -8218,30 +7901,6 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -ts-invariant@^0.4.0: - version "0.4.4" - resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86" - integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA== - dependencies: - tslib "^1.9.3" - -ts-invariant@^0.9.4: - version "0.9.4" - resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.9.4.tgz#42ac6c791aade267dd9dc65276549df5c5d71cac" - integrity sha512-63jtX/ZSwnUNi/WhXjnK8kz4cHHpYS60AnmA6ixz17l7E12a5puCWFlNpkne5Rl0J8TBPVHpGjsj4fxs8ObVLQ== - dependencies: - tslib "^2.1.0" - -tslib@^1.10.0, tslib@^1.9.3: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.1.0, tslib@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" @@ -8289,15 +7948,15 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.6.4: - version "3.9.10" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" - integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== +typescript@^4.5.4: + version "4.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4" + integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg== -typescript@~4.5.2: - version "4.5.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.4.tgz#a17d3a0263bf5c8723b9c52f43c5084edf13c2e8" - integrity sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg== +typescript@~4.6.3: + version "4.6.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" + integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" @@ -8639,7 +8298,7 @@ vue-template-es2015-compiler@^1.9.0: resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825" integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw== -vue@^2.6.10, vue@^2.6.11: +vue@^2.6.10: version "2.6.14" resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.14.tgz#e51aa5250250d569a3fbad3a8a5a687d6036e235" integrity sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ== @@ -8672,14 +8331,14 @@ vuepress-plugin-smooth-scroll@^0.0.3: dependencies: smoothscroll-polyfill "^0.4.3" -vuepress@^1.2.0: - version "1.9.6" - resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-1.9.6.tgz#77e4cf32c2adf462c222294a2f350277d08104b3" - integrity sha512-iac2E2hUai5x23t+XwNgPEXR7Gt0Q0QDtxq/ZepyIXATsGK2SNyrsdK1pIbUzzv+m3wx/cZs7lwlOA0Putb8RA== +vuepress@^1.9.7: + version "1.9.7" + resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-1.9.7.tgz#2cd6709a2228f5cef588115aaeabf820ab9ed7cc" + integrity sha512-aSXpoJBGhgjaWUsT1Zs/ZO8JdDWWsxZRlVme/E7QYpn+ZB9iunSgPMozJQNFaHzcRq4kPx5A4k9UhzLRcvtdMg== dependencies: - "@vuepress/core" "1.9.6" - "@vuepress/theme-default" "1.9.6" - "@vuepress/types" "1.9.6" + "@vuepress/core" "1.9.7" + "@vuepress/theme-default" "1.9.7" + "@vuepress/types" "1.9.7" cac "^6.5.6" envinfo "^7.2.0" opencollective-postinstall "^2.0.2" @@ -8856,11 +8515,6 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== -whatwg-fetch@>=0.10.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c" - integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA== - when@~3.6.x: version "3.6.4" resolved "https://registry.yarnpkg.com/when/-/when-3.6.4.tgz#473b517ec159e2b85005497a13983f095412e34e" @@ -9004,26 +8658,6 @@ z-schema@~5.0.2: optionalDependencies: commander "^2.7.1" -zen-observable-ts@^0.8.21: - version "0.8.21" - resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz#85d0031fbbde1eba3cd07d3ba90da241215f421d" - integrity sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg== - dependencies: - tslib "^1.9.3" - zen-observable "^0.8.0" - -zen-observable-ts@^1.2.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-1.2.3.tgz#c2f5ccebe812faf0cfcde547e6004f65b1a6d769" - integrity sha512-hc/TGiPkAWpByykMwDcem3SdUgA4We+0Qb36bItSuJC9xD0XVBZoFHYoadAomDSNf64CG8Ydj0Qb8Od8BUWz5g== - dependencies: - zen-observable "0.8.15" - -zen-observable@0.8.15, zen-observable@^0.8.0: - version "0.8.15" - resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" - integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== - zepto@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/zepto/-/zepto-1.2.0.tgz#e127bd9e66fd846be5eab48c1394882f7c0e4f98" diff --git a/internals/eslint-import/package.json b/internals/eslint-import/package.json index c50ed6a06..aa57a97e8 100644 --- a/internals/eslint-import/package.json +++ b/internals/eslint-import/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/eslint-config-import", - "version": "1.0.0-rc.6", + "version": "1.0.0-rc.7", "author": "Heitor Ramon Ribeiro ", "license": "MIT", "scripts": { diff --git a/internals/eslint-jest/package.json b/internals/eslint-jest/package.json index 418868040..05e93deb1 100644 --- a/internals/eslint-jest/package.json +++ b/internals/eslint-jest/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/eslint-config-jest", - "version": "1.0.0-rc.6", + "version": "1.0.0-rc.7", "author": "Heitor Ramon Ribeiro ", "license": "MIT", "scripts": { diff --git a/internals/eslint-typescript/package.json b/internals/eslint-typescript/package.json index d69df46b7..f07801f2f 100644 --- a/internals/eslint-typescript/package.json +++ b/internals/eslint-typescript/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/eslint-config-typescript", - "version": "1.0.0-rc.6", + "version": "1.0.0-rc.7", "author": "Heitor Ramon Ribeiro ", "license": "MIT", "scripts": { diff --git a/internals/eslint-vue/index.js b/internals/eslint-vue/index.js index 1fac39010..98bb06df1 100644 --- a/internals/eslint-vue/index.js +++ b/internals/eslint-vue/index.js @@ -1,6 +1,9 @@ +// eslint-disable-next-line unicorn/prefer-module module.exports = { extends: [ './rules/plugins', './rules/extends', + './rules/rules', + // eslint-disable-next-line unicorn/prefer-module, unicorn/no-array-callback-reference ].map(require.resolve), }; diff --git a/internals/eslint-vue/package.json b/internals/eslint-vue/package.json index 94c062619..0f465e077 100644 --- a/internals/eslint-vue/package.json +++ b/internals/eslint-vue/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/eslint-config-vue", - "version": "1.0.0-rc.6", + "version": "1.0.0-rc.7", "author": "Heitor Ramon Ribeiro ", "license": "MIT", "scripts": { @@ -29,6 +29,7 @@ "rules" ], "dependencies": { + "@vue/eslint-config-typescript": "^10.0.0", "eslint-plugin-vue": "^8.4.0" }, "main": "index.js" diff --git a/internals/eslint-vue/rules/rules.js b/internals/eslint-vue/rules/rules.js new file mode 100644 index 000000000..3d14a54d3 --- /dev/null +++ b/internals/eslint-vue/rules/rules.js @@ -0,0 +1,12 @@ +// eslint-disable-next-line unicorn/prefer-module +module.exports = { + rules: { + 'vue/block-lang': ['error', + { + script: { + lang: 'ts', + }, + }, + ], + }, +}; diff --git a/internals/eslint/package.json b/internals/eslint/package.json index a78c451b5..429bc2761 100644 --- a/internals/eslint/package.json +++ b/internals/eslint/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/eslint-config-base", - "version": "1.0.0-rc.6", + "version": "1.0.0-rc.7", "author": "Heitor Ramon Ribeiro ", "license": "MIT", "scripts": { diff --git a/package.json b/package.json index 9d88b4b02..658a6de16 100644 --- a/package.json +++ b/package.json @@ -11,14 +11,12 @@ "internals/*" ], "scripts": { - "build": "yarn build:api-client && yarn build:composables && yarn build:theme", + "build": "yarn build:api-client && yarn build:theme", "build:api-client": "cd packages/api-client && yarn build", - "build:composables": "cd packages/composables && yarn build", "build:theme": "cd packages/theme && yarn build", "contributors:add": "all-contributors add", "contributors:generate": "all-contributors generate", "dev:api-client": "cd packages/api-client && yarn dev", - "dev:composables": "cd packages/composables && yarn dev", "dev:theme": "cd packages/theme && yarn dev", "docs:install": "cd docs && yarn", "docs:dev": "cd docs && yarn dev", @@ -27,17 +25,15 @@ "lint": "eslint . --ext .ts,.vue --fix", "prepare": "[ -d '.husky' ] && (husky install && shx rm -rf .git/hooks && shx ln -s ../.husky .git/hooks) || true", "publish:api-client": "node ./scripts/publishApi.js", - "publish:composables": "node ./scripts/publishComposable.js", "start": "cd packages/theme && yarn start", - "test": "yarn test:api-client && yarn test:composables && yarn test:theme", + "test": "yarn test:api-client && yarn test:theme", "test:api-client": "cd packages/api-client && yarn test --passWithNoTests", - "test:composables": "cd packages/composables && yarn test --passWithNoTests", "test:theme": "cd packages/theme && yarn test --passWithNoTests", "update:check": "ncu && lerna run update:check --stream", "update:update": "ncu -u && lerna run update:update --stream" }, "devDependencies": { - "@babel/core": "^7.16.12", + "@babel/core": "^7.17.5", "@babel/plugin-proposal-private-methods": "^7.16.11", "@commitlint/cli": "^16.1.0", "@commitlint/config-conventional": "^16.0.0", @@ -47,22 +43,23 @@ "@graphql-codegen/typescript-operations": "^2.2.3", "@graphql-tools/utils": "^8.6.1", "@manypkg/cli": "^0.19.1", - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-node-resolve": "^13.1.3", "@types/graphql": "^14.5.0", "@types/jest": "^27.4.0", "@types/jsdom": "^16.2.14", "@types/node": "^17.0.14", "@types/webpack": "^5.28.0", + "@types/yargs": "^17.0.8", "@typescript-eslint/parser": "^5.10.2", - "@vue/eslint-config-typescript": "^10.0.0", "all-contributors-cli": "^6.20.0", "babel-eslint": "^10.1.0", "commitizen": "^4.2.4", "ejs": "^3.1.6", + "esbuild": "^0.14.23", "eslint": "8.8.0", + "execa": "^6.1.0", + "graphql": "^16.0.0", "husky": "^7.0.4", - "jest": "^27.4.7", + "jest": "^27.5.1", "jest-date-mock": "^1.0.8", "jest-localstorage-mock": "^2.4.18", "jest-silent-reporter": "^0.5.0", @@ -74,15 +71,13 @@ "majestic": "^1.8.1", "npm-check-updates": "^12.2.1", "rimraf": "^3.0.2", - "rollup": "^2.66.1", - "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.31.1", "shx": "^0.3.4", "ts-jest": "^27.1.3", "ts-node": "^10.4.0", "tslib": "^2.3.1", "typescript": "^4.5.4", - "vue-eslint-parser": "^8.2.0" + "vue-eslint-parser": "^8.2.0", + "yargs": "^17.3.1" }, "engines": { "node": ">=16.x.x", diff --git a/packages/api-client/.env.example b/packages/api-client/.env.example index 30c9fcd3f..0cf706fde 100644 --- a/packages/api-client/.env.example +++ b/packages/api-client/.env.example @@ -1 +1 @@ -MAGENTO_GRAPHQL=https://{YOUR_SITE_FRONT_URL}/graphql +VSF_MAGENTO_GRAPHQL_URL=https://{YOUR_SITE_FRONT_URL}/graphql diff --git a/packages/api-client/.lintstagedrc b/packages/api-client/.lintstagedrc deleted file mode 100644 index 9b476f414..000000000 --- a/packages/api-client/.lintstagedrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "*.{js,jsx}": [ - "eslint --fix" - ], - "*.{ts,tsx}": [ - "eslint --fix" - ], -} diff --git a/packages/api-client/README.md b/packages/api-client/README.md index ddb826077..87ba9b077 100644 --- a/packages/api-client/README.md +++ b/packages/api-client/README.md @@ -71,20 +71,16 @@ Find more information about the module [GraphQl Custom Config](https://github.co ``` 3. Checkout develop branch `git checkout develop` 4. Run `yarn` to install dependencies -5. Define a store running environment by adding a `STORE_ENV` to your running project or execute the code +5. Copy `.env.example` to `.env` ```bash - $ echo "STORE_ENV=dev" >> .env + $ cp packages/theme/.env.example packages/theme/config/.env ``` -6. Copy `config/example.json` to an environment named config and update GraphQL Endpoint - ```bash - $ cp packages/theme/config/example.json packages/theme/config/dev.json - ``` -7. Update `magentoGraphQl` with url to Magento >=2.4.2 GraphQL endpoint, and the other variable accordingly to your store configurations. +6. Update `VSF_MAGENTO_GRAPHQL_URL` with url to Magento >=2.4.2 GraphQL endpoint, and the other variable accordingly to your store configurations. ``` - "magentoGraphQl": "https://{YOUR_SITE_FRONT_URL}/graphql", + VSF_MAGENTO_GRAPHQL_URL=https://{YOUR_SITE_FRONT_URL}/graphql ``` -8. Build dependencies `yarn build:api-client && yarn build:composables` -9. Run `yarn dev:theme` to run theme. You can find other commands in `package.json` +7. Build dependencies `yarn build:api-client && yarn build:composables` +8. Run `yarn dev:theme` to run theme. You can find other commands in `package.json` - If you need HMR on Api Client/Composables run `yarn dev:api-client` or `yarn dev:composables` on a separate terminal window. ## Resources diff --git a/packages/api-client/babel.config.js b/packages/api-client/babel.config.js new file mode 100644 index 000000000..d3540f51b --- /dev/null +++ b/packages/api-client/babel.config.js @@ -0,0 +1,9 @@ +module.exports = { + presets: [ + ['@babel/preset-env', { + targets: { + node: 'current' + } + }] + ] +}; diff --git a/packages/api-client/jest.config.js b/packages/api-client/jest.config.js index 8d990f8a0..180a0a0ec 100644 --- a/packages/api-client/jest.config.js +++ b/packages/api-client/jest.config.js @@ -22,8 +22,8 @@ module.exports = { }, testEnvironment: 'jsdom', transform: { - '^.+\\.(ts)$': 'ts-jest', - '^.+\\.js$': 'babel-jest', + '^.+\\.(m)js$': 'babel-jest', + '^.+\\.ts$': 'ts-jest' }, transformIgnorePatterns: [ 'node_modules', diff --git a/packages/api-client/package.json b/packages/api-client/package.json index b7395e3ba..3956c6091 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -1,19 +1,26 @@ { "name": "@vue-storefront/magento-api", - "version": "1.0.0-rc.6", + "version": "1.0.0-rc.7", "sideEffects": false, "homepage": "https://github.com/vuestorefront/magento2", "bugs": { "url": "https://github.com/vuestorefront/magento2/issues" }, "license": "MIT", - "server": "server/index.js", - "main": "lib/index.cjs.js", - "module": "lib/index.es.js", + "main": "./lib/index.js", + "exports": { + ".": "./lib/index.js", + "./server": "./lib/index.server.js", + "./package.json": "./package.json" + }, "types": "lib/index.d.ts", "scripts": { - "build": "rimraf lib server && rollup -c", - "dev": "rimraf lib server && rollup -c -w", + "build": "yarn build:clear && yarn build:package && yarn build:server && yarn build:types", + "build:clear": "rimraf lib", + "build:package": "node ../../scripts/build --file=src/index.ts", + "build:server": "node ../../scripts/build --file=src/index.server.ts", + "build:types": "tsc --emitDeclarationOnly", + "dev": "concurrently \"yarn build:package --watch\" \"yarn build:server --watch\"", "lint": "eslint ./src --ext .ts,.vue", "lint:fix": "eslint ./src --ext .ts --fix", "partial:types": "node ./possible-types.js", @@ -25,16 +32,15 @@ }, "dependencies": { "@apollo/client": "^3.5.8", + "agentkeepalive": "^4.2.1", "dotenv": "^15.0.0", "graphql": "^16.3.0", "graphql-tag": "^2.12.6", "isomorphic-fetch": "^3.0.0" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-graphql": "^1.1.0", - "@rollup/plugin-json": "^4.1.0", "@types/isomorphic-fetch": "^0.0.35", + "concurrently": "^7.0.0", "cross-fetch": "^3.1.5", "graphql-tools": "^8.2.0", "jest-transform-graphql": "^2.1.0", @@ -43,7 +49,7 @@ "webpack": "4.46.0" }, "peerDependencies": { - "@vue-storefront/core": "~2.5.4" + "@vue-storefront/core": "~2.5.6" }, "files": [ "lib/**/*", diff --git a/packages/api-client/possible-types.js b/packages/api-client/possible-types.js index 1c7bc88c6..53590aae3 100644 --- a/packages/api-client/possible-types.js +++ b/packages/api-client/possible-types.js @@ -2,7 +2,7 @@ require('dotenv').config(); const fetch = require('cross-fetch'); const fs = require('fs'); -fetch(process.env.MAGENTO_GRAPHQL, { +fetch(process.env.VSF_MAGENTO_GRAPHQL_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ diff --git a/packages/api-client/rollup.config.js b/packages/api-client/rollup.config.js deleted file mode 100644 index 3142d2ebf..000000000 --- a/packages/api-client/rollup.config.js +++ /dev/null @@ -1,48 +0,0 @@ -/* eslint-disable import/no-extraneous-dependencies */ -import commonjs from '@rollup/plugin-commonjs'; -import graphql from '@rollup/plugin-graphql'; -import json from '@rollup/plugin-json'; -import nodeResolve from '@rollup/plugin-node-resolve'; -import typescript from 'rollup-plugin-typescript2'; -import pkg from './package.json'; -import { generateBaseConfig } from '../../rollup.base.config'; - -const extensions = ['.js', '.jsx', '.es6', '.es', '.mjs', '.ts', '.graphql']; - -const server = { - input: 'src/index.server.ts', - output: [ - { - file: pkg.server, - format: 'cjs', - sourcemap: true, - }, - ], - external: [ - '@apollo/client/utilities', - 'node:url', - ...Object.keys(pkg.dependencies || {}), - ...Object.keys(pkg.peerDependencies || {}), - ], - plugins: [ - typescript({ - rollupCommonJSResolveHack: false, - useTsconfigDeclarationDir: true, - // eslint-disable-next-line unicorn/prefer-module - tslib: require.resolve('typescript'), - }), - commonjs({ - extensions, - }), - nodeResolve({ - extensions, - }), - json(), - graphql(), - ], -}; - -export default [ - generateBaseConfig(pkg, true), - server, -]; diff --git a/packages/api-client/src/api-extractor-data.ts b/packages/api-client/src/api-extractor-data.ts index ef432ddfa..abb27e0ae 100644 --- a/packages/api-client/src/api-extractor-data.ts +++ b/packages/api-client/src/api-extractor-data.ts @@ -1,10 +1,10 @@ /** - * `api-client` for Magento 2 integration for Vue Storefront 2. + * Api Client for Magento 2 integration for Vue Storefront 2. * * @remarks - * The `@vue-storefront/magento2` library includes everything needed to fetch data from the - * Magento 2 eCommerce platform. This includes API client configuration, API endpoints, and - * GraphQL types and fragments. + * The `@vue-storefront/magento-api` library includes Apollo Client, + * GraphQL operations and Middleware endpoints that allow you to communicate + * with Magento. * * @packageDocumentation */ diff --git a/packages/api-client/src/api/addConfigurableProductsToCart/addConfigurableProductsToCart.ts b/packages/api-client/src/api/addConfigurableProductsToCart/addConfigurableProductsToCart.ts index 266e481e2..646f16c51 100644 --- a/packages/api-client/src/api/addConfigurableProductsToCart/addConfigurableProductsToCart.ts +++ b/packages/api-client/src/api/addConfigurableProductsToCart/addConfigurableProductsToCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that adds configurable products to shopping cart */ export default gql` mutation addConfigurableProductsToCart($input: AddConfigurableProductsToCartInput) { addConfigurableProductsToCart(input: $input) { diff --git a/packages/api-client/src/api/addConfigurableProductsToCart/index.ts b/packages/api-client/src/api/addConfigurableProductsToCart/index.ts index 4c8cd57f5..0bceff723 100644 --- a/packages/api-client/src/api/addConfigurableProductsToCart/index.ts +++ b/packages/api-client/src/api/addConfigurableProductsToCart/index.ts @@ -1,23 +1,27 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import addConfigurableProductsToCart from './addConfigurableProductsToCart'; +import type { Context } from '../../types/context'; import { - AddConfigurableProductsToCartMutationVariables, - AddConfigurableProductsToCartMutation, - AddConfigurableProductsToCartInput, + AddConfigurableProductsToCartInput, AddConfigurableProductsToCartMutation, AddConfigurableProductsToCartMutationVariables, } from '../../types/GraphQL'; -import { Context } from '../../types/context'; +import addConfigurableProductsToCartMutation from './addConfigurableProductsToCart'; -export default async ( +/** + * Adds a set of configurable products to a specified cart + * @param context VSF Context + * @param input ID of the cart and products to be added + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function addConfigurableProductsToCart( context: Context, input: AddConfigurableProductsToCartInput, customQuery: CustomQuery = { addConfigurableProductsToCart: 'addConfigurableProductsToCart' }, -): Promise> => { +): Promise> { const { addConfigurableProductsToCart: addConfigurableProductsToCartGQL } = context.extendQuery( customQuery, { addConfigurableProductsToCart: { - query: addConfigurableProductsToCart, + query: addConfigurableProductsToCartMutation, variables: { input }, }, }, @@ -26,4 +30,4 @@ export default async ( mutation: addConfigurableProductsToCartGQL.query, variables: addConfigurableProductsToCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/addDownloadableProductsToCart/addDownloadableProductsToCart.ts b/packages/api-client/src/api/addDownloadableProductsToCart/addDownloadableProductsToCart.ts index 4c3212b36..7131fba54 100644 --- a/packages/api-client/src/api/addDownloadableProductsToCart/addDownloadableProductsToCart.ts +++ b/packages/api-client/src/api/addDownloadableProductsToCart/addDownloadableProductsToCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that adds downloadable products to shopping cart */ export default gql` mutation addDownloadableProductsToCart($input: AddDownloadableProductsToCartInput) { addDownloadableProductsToCart(input: $input) { diff --git a/packages/api-client/src/api/addDownloadableProductsToCart/index.ts b/packages/api-client/src/api/addDownloadableProductsToCart/index.ts index 3537a814b..f70a27f9a 100644 --- a/packages/api-client/src/api/addDownloadableProductsToCart/index.ts +++ b/packages/api-client/src/api/addDownloadableProductsToCart/index.ts @@ -1,23 +1,29 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import addDownloadableProductsToCart from './addDownloadableProductsToCart'; +import type { Context } from '../../types/context'; import { AddDownloadableProductsToCartInput, AddDownloadableProductsToCartMutation, AddDownloadableProductsToCartMutationVariables, } from '../../types/GraphQL'; -import { Context } from '../../types/context'; +import addDownloadableProductsToCartMutation from './addDownloadableProductsToCart'; -export default async ( +/** + * Adds a set of downloadable products to a specified cart + * @param context VSF Context + * @param input ID of the cart and products to be added + * @param customQuery custom GraphQL query that extends the default one + */ +export default async function addDownloadableProductsToCart( context: Context, input: AddDownloadableProductsToCartInput, customQuery: CustomQuery = { addDownloadableProductsToCart: 'addDownloadableProductsToCart' }, -): Promise> => { +): Promise> { const { addDownloadableProductsToCart: addDownloadableProductsToCartGQL } = context.extendQuery( customQuery, { addDownloadableProductsToCart: { - query: addDownloadableProductsToCart, + query: addDownloadableProductsToCartMutation, variables: { input }, }, }, @@ -26,4 +32,4 @@ export default async ( mutation: addDownloadableProductsToCartGQL.query, variables: addDownloadableProductsToCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/addProductsToCart/addProductsToCart.ts b/packages/api-client/src/api/addProductsToCart/addProductsToCart.ts index 3b41eb183..00b4f46ba 100644 --- a/packages/api-client/src/api/addProductsToCart/addProductsToCart.ts +++ b/packages/api-client/src/api/addProductsToCart/addProductsToCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that adds a product to the cart */ export default gql` mutation addProductsToCart($cartId: String!, $cartItems: [CartItemInput!]!) { addProductsToCart(cartId,: $cartId, cartItems,: $cartItems) { diff --git a/packages/api-client/src/api/addProductsToCart/index.ts b/packages/api-client/src/api/addProductsToCart/index.ts index 90961cba4..6db9bce1a 100644 --- a/packages/api-client/src/api/addProductsToCart/index.ts +++ b/packages/api-client/src/api/addProductsToCart/index.ts @@ -1,26 +1,32 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import addProductsToCart from './addProductsToCart'; +import { Context } from '../../types/context'; import { AddProductsToCartMutation, CartItemInput, } from '../../types/GraphQL'; -import { Context } from '../../types/context'; +import addProductsToCartMutation from './addProductsToCart'; export type AddProductsToCartInput = { cartId: string; cartItems: CartItemInput[]; }; -export default async ( +/** + * Adds products to the specified cart + * @param context VSF Context + * @param input ID of the cart and products to be added + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function addProductsToCart( context: Context, input: AddProductsToCartInput, customQuery: CustomQuery = { addProductsToCart: 'addProductsToCart' }, -): Promise> => { +): Promise> { const { addProductsToCart: addProductsToCartGQL } = context.extendQuery( customQuery, { addProductsToCart: { - query: addProductsToCart, + query: addProductsToCartMutation, variables: { ...input }, }, }, @@ -29,4 +35,4 @@ export default async ( mutation: addProductsToCartGQL.query, variables: addProductsToCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/addVirtualProductsToCart/addVirtualProductsToCart.ts b/packages/api-client/src/api/addVirtualProductsToCart/addVirtualProductsToCart.ts index 17feb83f2..940d4a4c8 100644 --- a/packages/api-client/src/api/addVirtualProductsToCart/addVirtualProductsToCart.ts +++ b/packages/api-client/src/api/addVirtualProductsToCart/addVirtualProductsToCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that adds virtual products to shopping cart */ export default gql` mutation addVirtualProductsToCart($input: AddVirtualProductsToCartInput) { addVirtualProductsToCart(input: $input) { diff --git a/packages/api-client/src/api/addVirtualProductsToCart/index.ts b/packages/api-client/src/api/addVirtualProductsToCart/index.ts index c14642fbd..4b118def8 100644 --- a/packages/api-client/src/api/addVirtualProductsToCart/index.ts +++ b/packages/api-client/src/api/addVirtualProductsToCart/index.ts @@ -1,23 +1,29 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import addVirtualProductsToCart from './addVirtualProductsToCart'; +import type { Context } from '../../types/context'; import { AddVirtualProductsToCartInput, AddVirtualProductsToCartMutation, AddVirtualProductsToCartMutationVariables, } from '../../types/GraphQL'; -import { Context } from '../../types/context'; +import addVirtualProductsToCartMutation from './addVirtualProductsToCart'; -export default async ( +/** + * Adds a set of virtual products to a specified cart + * @param context VSF Context + * @param input ID of the cart and products to add + * @param customQuery custom GraphQL query that extends the default one + */ +export default async function addVirtualProductsToCart( context: Context, input: AddVirtualProductsToCartInput, customQuery: CustomQuery = { addVirtualProductsToCart: 'addVirtualProductsToCart' }, -): Promise> => { +): Promise> { const { addVirtualProductsToCart: addVirtualProductsToCartGQL } = context.extendQuery( customQuery, { addVirtualProductsToCart: { - query: addVirtualProductsToCart, + query: addVirtualProductsToCartMutation, variables: { input }, }, }, @@ -26,4 +32,4 @@ export default async ( mutation: addVirtualProductsToCartGQL.query, variables: addVirtualProductsToCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/applyCouponToCart/applyCouponToCart.ts b/packages/api-client/src/api/applyCouponToCart/applyCouponToCart.ts index 771ca4f9b..0a21c7939 100644 --- a/packages/api-client/src/api/applyCouponToCart/applyCouponToCart.ts +++ b/packages/api-client/src/api/applyCouponToCart/applyCouponToCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation to apply a coupon to a card */ export default gql` mutation applyCouponToCart($input: ApplyCouponToCartInput) { applyCouponToCart(input: $input) { diff --git a/packages/api-client/src/api/applyCouponToCart/index.ts b/packages/api-client/src/api/applyCouponToCart/index.ts index 42451cb23..15c6c21ee 100644 --- a/packages/api-client/src/api/applyCouponToCart/index.ts +++ b/packages/api-client/src/api/applyCouponToCart/index.ts @@ -1,24 +1,30 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import applyCouponToCart from './applyCouponToCart'; +import type { Context } from '../../types/context'; import { ApplyCouponToCartInput, ApplyCouponToCartMutation, ApplyCouponToCartMutationVariables, } from '../../types/GraphQL'; -import { Context } from '../../types/context'; +import applyCouponToCartMutation from './applyCouponToCart'; // @TODO : Add Mutation FROM CodeGEN -export default async ( +/** + * Applies a coupon to a given card + * @param context VSF context + * @param input ID of the card and coupon to apply + * @param customQuery custom GraphQL query that extends the default one + */ +export default async function applyCouponToCart( context: Context, input: ApplyCouponToCartInput, customQuery: CustomQuery = { applyCouponToCart: 'applyCouponToCart' }, -): Promise> => { +): Promise> { const { applyCouponToCart: applyCouponToCartGQL } = context.extendQuery( customQuery, { applyCouponToCart: { - query: applyCouponToCart, + query: applyCouponToCartMutation, variables: { input }, }, }, @@ -27,4 +33,4 @@ export default async ( mutation: applyCouponToCartGQL.query, variables: applyCouponToCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/availableStores/index.ts b/packages/api-client/src/api/availableStores/index.ts index 72209c00f..7c016163b 100644 --- a/packages/api-client/src/api/availableStores/index.ts +++ b/packages/api-client/src/api/availableStores/index.ts @@ -6,6 +6,9 @@ import { import availableStores from './availableStores'; import { Context } from '../../types/context'; +/** + * Returns list of available stores + */ export default async ( context: Context, customQuery: CustomQuery = { availableStores: 'availableStores' }, diff --git a/packages/api-client/src/api/cart/cart.ts b/packages/api-client/src/api/cart/cart.ts index d1df36e58..482d581f7 100644 --- a/packages/api-client/src/api/cart/cart.ts +++ b/packages/api-client/src/api/cart/cart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL query to fetch a cart */ export default gql` query cart($cartId: String!) { cart(cart_id:$cartId) { diff --git a/packages/api-client/src/api/cart/index.ts b/packages/api-client/src/api/cart/index.ts index b9b782f50..1d0e18a6b 100644 --- a/packages/api-client/src/api/cart/index.ts +++ b/packages/api-client/src/api/cart/index.ts @@ -1,19 +1,25 @@ import { ApolloQueryResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import { CartQuery, CartQueryVariables } from '../../types/GraphQL'; -import cart from './cart'; import { Context } from '../../types/context'; +import type { CartQuery, CartQueryVariables } from '../../types/GraphQL'; +import cartQuery from './cart'; -export default async ( +/** + * Fetches a cart by its ID + * @param context VSF context + * @param cartId ID of the cart to fetch + * @param customQuery custom GraphQL query that extends the default one + */ +export default async function cart( context: Context, cartId: string, customQuery: CustomQuery = { cart: 'cart' }, -): Promise> => { +): Promise> { const { cart: cartGQL } = context.extendQuery( customQuery, { cart: { - query: cart, + query: cartQuery, variables: { cartId: cartId ?? '' }, }, }, @@ -22,4 +28,4 @@ export default async ( query: cartGQL.query, variables: cartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/categoryList/categoryList.ts b/packages/api-client/src/api/categoryList/categoryList.ts index 41f2e19d8..10ec08e96 100644 --- a/packages/api-client/src/api/categoryList/categoryList.ts +++ b/packages/api-client/src/api/categoryList/categoryList.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Query that fetches the category list. */ export default gql` query categoryList { categories { diff --git a/packages/api-client/src/api/categoryList/index.ts b/packages/api-client/src/api/categoryList/index.ts index 177430023..edba70589 100644 --- a/packages/api-client/src/api/categoryList/index.ts +++ b/packages/api-client/src/api/categoryList/index.ts @@ -1,25 +1,30 @@ import { ApolloQueryResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; import { CategoryListQuery, CategoryListQueryVariables } from '../../types/GraphQL'; -import categoryList from './categoryList'; +import categoryListQuery from './categoryList'; import { Context } from '../../types/context'; -export default async ( +/** + * Fetches the category list. + * + * @param context VSF Context + * @param params + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function categoryList( context: Context, params: CategoryListQueryVariables, customQuery: CustomQuery = { categoryList: 'categoryList' }, -): Promise> => { - const { categoryList: categoryListGQL } = context.extendQuery( - customQuery, - { - categoryList: { - query: categoryList, - variables: { ...params }, - }, +): Promise> { + const { categoryList: categoryListGQL } = context.extendQuery(customQuery, { + categoryList: { + query: categoryListQuery, + variables: { ...params }, }, - ); + }); + return context.client.query({ query: categoryListGQL.query, variables: categoryListGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/categorySearch/categorySearch.ts b/packages/api-client/src/api/categorySearch/categorySearch.ts index 91d6ae9c9..e3b6558c2 100644 --- a/packages/api-client/src/api/categorySearch/categorySearch.ts +++ b/packages/api-client/src/api/categorySearch/categorySearch.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Query that searches for categories using filters. */ export default gql` query categorySearch($filters: CategoryFilterInput) { categoryList(filters: $filters) { diff --git a/packages/api-client/src/api/categorySearch/index.ts b/packages/api-client/src/api/categorySearch/index.ts index fed407222..115e1bd98 100644 --- a/packages/api-client/src/api/categorySearch/index.ts +++ b/packages/api-client/src/api/categorySearch/index.ts @@ -1,26 +1,32 @@ import { ApolloQueryResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; import { CategorySearchQuery, CategorySearchQueryVariables } from '../../types/GraphQL'; -import categorySearch from './categorySearch'; +import categorySearchQuery from './categorySearch'; import { Context } from '../../types/context'; -export default async ( +/** + * Searches for categories using received filters. + * + * @param context VSF Context + * @param filters filters used to search for categories. A filter contains at + * least one attribute, a comparison operator, and the value that is being + * searched for. + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function categorySearch( context: Context, filters: CategorySearchQueryVariables, customQuery: CustomQuery = { categorySearch: 'categorySearch' }, -): Promise> => { - const { categorySearch: categorySearchGQL } = context.extendQuery( - customQuery, - { - categorySearch: { - query: categorySearch, - variables: { ...filters }, - }, +): Promise> { + const { categorySearch: categorySearchGQL } = context.extendQuery(customQuery, { + categorySearch: { + query: categorySearchQuery, + variables: { ...filters }, }, - ); + }); return context.client.query({ query: categorySearchGQL.query, variables: categorySearchGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/changeCustomerPassword/index.ts b/packages/api-client/src/api/changeCustomerPassword/index.ts index 467a3eddb..8d3473859 100644 --- a/packages/api-client/src/api/changeCustomerPassword/index.ts +++ b/packages/api-client/src/api/changeCustomerPassword/index.ts @@ -7,6 +7,9 @@ import { } from '../../types/GraphQL'; import { Context } from '../../types/context'; +/** + * Changes password of the current customer. To override the default query, use the `changeCustomerPassword` query key. + */ export default async ( context: Context, params: { currentPassword: string; newPassword: string; }, diff --git a/packages/api-client/src/api/cmsBlocks/index.ts b/packages/api-client/src/api/cmsBlocks/index.ts index 6898b18ba..fd425ae6d 100644 --- a/packages/api-client/src/api/cmsBlocks/index.ts +++ b/packages/api-client/src/api/cmsBlocks/index.ts @@ -4,11 +4,18 @@ import { CmsBlockQuery, CmsBlockQueryVariables } from '../../types/GraphQL'; import cmsBlocks from './cmsBlocks'; import { Context } from '../../types/context'; -export default async ( +/** + * Fetch CMS Blocks from Magento Api. + * + * @param context - VSF Context + * @param identifiers - identifiers of CMS blocks + * @param [customQuery] - (optional) - custom GraphQL query that extends the default cmsBlocks query + */ +export default async function getCmsBlocks( context: Context, identifiers: string, customQuery: CustomQuery = { cmsBlocks: 'cmsBlocks' }, -): Promise> => { +): Promise> { const { cmsBlocks: cmsBlocksGQL } = context.extendQuery( customQuery, { @@ -22,4 +29,4 @@ export default async ( query: cmsBlocksGQL.query, variables: cmsBlocksGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/cmsPage/index.ts b/packages/api-client/src/api/cmsPage/index.ts index add81edd4..67dcb7ed8 100644 --- a/packages/api-client/src/api/cmsPage/index.ts +++ b/packages/api-client/src/api/cmsPage/index.ts @@ -4,11 +4,17 @@ import { CmsPageQueryVariables, CmsPageQuery } from '../../types/GraphQL'; import cmsPage from './cmsPage'; import { Context } from '../../types/context'; -export default async ( +/** + * Fetch CMS Page from Magento + * @param context - VSF Context + * @param identifier - identifier of CMS page + * @param customQuery - (optional) - custom query that extends default cmsPage GraphQL query + */ +export default async function getCmsPage( context: Context, identifier: string, customQuery: CustomQuery = { cmsPage: 'cmsPage' }, -): Promise> => { +): Promise> { try { const { cmsPage: cmsPageGQL } = context.extendQuery( customQuery, diff --git a/packages/api-client/src/api/countries/countriesList.ts b/packages/api-client/src/api/countries/countriesList.ts index 3b0ca4af2..b01000bf0 100644 --- a/packages/api-client/src/api/countries/countriesList.ts +++ b/packages/api-client/src/api/countries/countriesList.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Query that fetches the list of countries from the API */ export default gql` query countriesList { countries { diff --git a/packages/api-client/src/api/countries/index.ts b/packages/api-client/src/api/countries/index.ts index d2c34ab4d..1290fa452 100644 --- a/packages/api-client/src/api/countries/index.ts +++ b/packages/api-client/src/api/countries/index.ts @@ -1,22 +1,27 @@ import { ApolloQueryResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; import { CountriesListQuery } from '../../types/GraphQL'; -import countriesList from './countriesList'; +import countriesListQuery from './countriesList'; import { Context } from '../../types/context'; -export default async ( +/** + * Loads the list of countries + * @param context VSF Context + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function countries( context: Context, customQuery: CustomQuery = { countries: 'countries' }, -): Promise> => { +): Promise> { const { countries: countriesGQL } = context.extendQuery( customQuery, { countries: { - query: countriesList, + query: countriesListQuery, }, }, ); return context.client.query({ query: countriesGQL.query, }); -}; +} diff --git a/packages/api-client/src/api/country/index.ts b/packages/api-client/src/api/country/index.ts index 6915961df..cd48e15df 100644 --- a/packages/api-client/src/api/country/index.ts +++ b/packages/api-client/src/api/country/index.ts @@ -4,11 +4,17 @@ import { CountryInformationQuery, CountryInformationQueryVariables } from '../.. import countryInformation from './countryInformation'; import { Context } from '../../types/context'; -export default async ( +/** + * Fetches the information about a country given its ID + * @param context VSF Context + * @param id ID of the country to be fetched + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function country( context: Context, id: string, customQuery: CustomQuery = { country: 'country' }, -): Promise> => { +): Promise> { const { country: countryGQL } = context.extendQuery( customQuery, { @@ -22,4 +28,4 @@ export default async ( query: countryGQL.query, variables: countryGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/createCustomer/index.ts b/packages/api-client/src/api/createCustomer/index.ts index a3f45e4a4..456b16080 100644 --- a/packages/api-client/src/api/createCustomer/index.ts +++ b/packages/api-client/src/api/createCustomer/index.ts @@ -10,6 +10,9 @@ import { import createCustomer from './createCustomer'; import { Context } from '../../types/context'; +/** + * Registers a new customer. To override the default query, use the `createCustomer` query key. + */ export default async ( context: Context, input: CustomerCreateInput, diff --git a/packages/api-client/src/api/createCustomerAddress/createCustomerAddress.ts b/packages/api-client/src/api/createCustomerAddress/createCustomerAddress.ts index 2c0bb3ee5..63509d116 100644 --- a/packages/api-client/src/api/createCustomerAddress/createCustomerAddress.ts +++ b/packages/api-client/src/api/createCustomerAddress/createCustomerAddress.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that creates new customer address. */ export default gql` mutation createCustomerAddress($input: CustomerAddressInput!) { createCustomerAddress(input: $input) { diff --git a/packages/api-client/src/api/createCustomerAddress/index.ts b/packages/api-client/src/api/createCustomerAddress/index.ts index f3d595e73..098c12700 100644 --- a/packages/api-client/src/api/createCustomerAddress/index.ts +++ b/packages/api-client/src/api/createCustomerAddress/index.ts @@ -1,6 +1,6 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import createCustomerAddress from './createCustomerAddress'; +import createCustomerAddressMutation from './createCustomerAddress'; import { CreateCustomerAddressMutation, CreateCustomerAddressMutationVariables, @@ -8,16 +8,23 @@ import { } from '../../types/GraphQL'; import { Context } from '../../types/context'; -export default async ( +/** + * Creates a customer address. + * + * @param context VSF Context + * @param input new customer address data + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function createCustomerAddress( context: Context, input: CustomerAddressInput, customQuery: CustomQuery = { createCustomerAddress: 'createCustomerAddress' }, -): Promise> => { +): Promise> { const { createCustomerAddress: createCustomerAddressGQL } = context.extendQuery( customQuery, { createCustomerAddress: { - query: createCustomerAddress, + query: createCustomerAddressMutation, variables: { input }, }, }, @@ -27,4 +34,4 @@ export default async ( mutation: createCustomerAddressGQL.query, variables: createCustomerAddressGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/createProductReview/index.ts b/packages/api-client/src/api/createProductReview/index.ts index f227a98d4..217a0a49a 100644 --- a/packages/api-client/src/api/createProductReview/index.ts +++ b/packages/api-client/src/api/createProductReview/index.ts @@ -6,6 +6,9 @@ import createProductReview from './createProductReview'; import { Context } from '../../types/context'; import recaptchaValidator from '../../helpers/recaptcha/recaptchaValidator'; +/** + * Creates a new product review + */ export default async ( context: Context, input: CreateProductReviewInput, diff --git a/packages/api-client/src/api/currency/currency.ts b/packages/api-client/src/api/currency/currency.ts index 8ba84449c..697d58078 100644 --- a/packages/api-client/src/api/currency/currency.ts +++ b/packages/api-client/src/api/currency/currency.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Query that fetches the currency information. */ export default gql` query currency { currency{ diff --git a/packages/api-client/src/api/currency/index.ts b/packages/api-client/src/api/currency/index.ts index 68efbe0f8..a42c70d7b 100644 --- a/packages/api-client/src/api/currency/index.ts +++ b/packages/api-client/src/api/currency/index.ts @@ -1,25 +1,26 @@ import { ApolloQueryResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import { - CurrencyQuery, -} from '../../types/GraphQL'; -import currency from './currency'; +import { CurrencyQuery } from '../../types/GraphQL'; +import currencyQuery from './currency'; import { Context } from '../../types/context'; -export default async ( +/** + * Fetches the currency information. + * + * @param context VSF context + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function currency( context: Context, customQuery: CustomQuery = { currency: 'currency' }, -): Promise> => { - const { currency: currencyGQL } = context.extendQuery( - customQuery, - { - currency: { - query: currency, - }, +): Promise> { + const { currency: currencyGQL } = context.extendQuery(customQuery, { + currency: { + query: currencyQuery, }, - ); + }); return context.client.query({ query: currencyGQL.query, }); -}; +} diff --git a/packages/api-client/src/api/customer/index.ts b/packages/api-client/src/api/customer/index.ts index 09d152d54..2a72aa6c0 100644 --- a/packages/api-client/src/api/customer/index.ts +++ b/packages/api-client/src/api/customer/index.ts @@ -4,6 +4,9 @@ import { CustomerQuery } from '../../types/GraphQL'; import customer from './customer'; import { Context } from '../../types/context'; +/** + * Returns the information about the current customer. To override the default query, use the `customer` query key. + */ export default async ( context: Context, customQuery: CustomQuery = { customer: 'customer' }, diff --git a/packages/api-client/src/api/customerCart/customerCart.ts b/packages/api-client/src/api/customerCart/customerCart.ts index 7a2b7fc4f..7dac27ec3 100644 --- a/packages/api-client/src/api/customerCart/customerCart.ts +++ b/packages/api-client/src/api/customerCart/customerCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL query to get the cart of the current logged in customer */ export default gql` query customerCart { customerCart { diff --git a/packages/api-client/src/api/customerCart/index.ts b/packages/api-client/src/api/customerCart/index.ts index 293774e8b..443642722 100644 --- a/packages/api-client/src/api/customerCart/index.ts +++ b/packages/api-client/src/api/customerCart/index.ts @@ -1,18 +1,23 @@ import { ApolloQueryResult } from '@apollo/client/core'; -import { CustomQuery } from '@vue-storefront/core'; -import { CustomerCartQuery } from '../../types/GraphQL'; -import customerCart from './customerCart'; -import { Context } from '../../types/context'; +import type { CustomQuery } from '@vue-storefront/core'; +import type { Context } from '../../types/context'; +import type { CustomerCartQuery } from '../../types/GraphQL'; +import customerCartQuery from './customerCart'; -export default async ( +/** + * Fetches the cart of the current logged in user + * @param context VSF context + * @param customQuery custom GraphQL query that extends the default one + */ +export default async function customerCart( context: Context, customQuery: CustomQuery = { customerCart: 'customerCart' }, -): Promise> => { +): Promise> { const { customerCart: customerCartGQL } = context.extendQuery( customQuery, { customerCart: { - query: customerCart, + query: customerCartQuery, }, }, ); @@ -20,4 +25,4 @@ export default async ( return context.client.query({ query: customerCartGQL.query, }); -}; +} diff --git a/packages/api-client/src/api/customerOrders/index.ts b/packages/api-client/src/api/customerOrders/index.ts index eb506c695..4f8c8eec3 100644 --- a/packages/api-client/src/api/customerOrders/index.ts +++ b/packages/api-client/src/api/customerOrders/index.ts @@ -15,6 +15,9 @@ type Variables = { filter?: CustomerOrdersFilterInput; }; +/** + * Returns customer orders. To override the default query, use the `customerOrders` query key. + */ export default async ( context: Context, searchParams: GetOrdersSearchParams, diff --git a/packages/api-client/src/api/customerProductReview/index.ts b/packages/api-client/src/api/customerProductReview/index.ts index 4c5ba9622..bc21cfd39 100644 --- a/packages/api-client/src/api/customerProductReview/index.ts +++ b/packages/api-client/src/api/customerProductReview/index.ts @@ -12,6 +12,9 @@ export type CustomerProductReviewParams = { currentPage: number; }; +/** + * Returns product reviews created by the current customer + */ export default async ( context: Context, searchParams?: CustomerProductReviewParams, diff --git a/packages/api-client/src/api/deleteCustomerAddress/deleteCustomerAddress.ts b/packages/api-client/src/api/deleteCustomerAddress/deleteCustomerAddress.ts index fe8bfc4ca..c726c16fc 100644 --- a/packages/api-client/src/api/deleteCustomerAddress/deleteCustomerAddress.ts +++ b/packages/api-client/src/api/deleteCustomerAddress/deleteCustomerAddress.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that deletes a customer address. */ export default gql` mutation deleteCustomerAddress($id: Int!) { deleteCustomerAddress(id: $id) diff --git a/packages/api-client/src/api/deleteCustomerAddress/index.ts b/packages/api-client/src/api/deleteCustomerAddress/index.ts index b50aaee84..455b3ab3d 100644 --- a/packages/api-client/src/api/deleteCustomerAddress/index.ts +++ b/packages/api-client/src/api/deleteCustomerAddress/index.ts @@ -1,25 +1,33 @@ import { ExecutionResult } from 'graphql'; import { CustomQuery } from '@vue-storefront/core'; -import deleteCustomerAddress from './deleteCustomerAddress'; +import deleteCustomerAddressMutation from './deleteCustomerAddress'; import { Context } from '../../types/context'; import { DeleteCustomerAddressMutation, DeleteCustomerAddressMutationVariables } from '../../types/GraphQL'; -export default async ( +/** + * Deletes a customer address. + * + * @param context VSF Context + * @param addressId ID of the customer address to delete + * @param customQuery (optional) - custom GraphQL query that extends the default query + */ +export default async function deleteCustomerAddress( context: Context, addressId: number, customQuery: CustomQuery = { deleteCustomerAddress: 'deleteCustomerAddress' }, -): Promise> => { +): Promise> { const { deleteCustomerAddress: deleteCustomerAddressGQL } = context.extendQuery( customQuery, { deleteCustomerAddress: { - query: deleteCustomerAddress, + query: deleteCustomerAddressMutation, variables: { id: addressId }, }, }, ); + return context.client.mutate({ mutation: deleteCustomerAddressGQL.query, variables: deleteCustomerAddressGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/generateCustomerToken/index.ts b/packages/api-client/src/api/generateCustomerToken/index.ts index 917f33267..b9c9e2dce 100644 --- a/packages/api-client/src/api/generateCustomerToken/index.ts +++ b/packages/api-client/src/api/generateCustomerToken/index.ts @@ -9,6 +9,9 @@ import { } from '../../types/GraphQL'; import { Context } from '../../types/context'; +/** + * Logs in the customer based on provided username and password. To override the default query, use the `generateCustomerToken` query key. + */ export default async ( context: Context, params: { diff --git a/packages/api-client/src/api/getAvailableCustomerShippingMethods/CustomerShippingMethods.ts b/packages/api-client/src/api/getAvailableCustomerShippingMethods/CustomerShippingMethods.ts index 305411ef0..66a21caf8 100644 --- a/packages/api-client/src/api/getAvailableCustomerShippingMethods/CustomerShippingMethods.ts +++ b/packages/api-client/src/api/getAvailableCustomerShippingMethods/CustomerShippingMethods.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Query that retrieves a user's shipping methods */ export default gql` query CustomerAvailableShippingMethods { customerCart { diff --git a/packages/api-client/src/api/getAvailableCustomerShippingMethods/index.ts b/packages/api-client/src/api/getAvailableCustomerShippingMethods/index.ts index dc3cf22ae..88fb2d6f0 100644 --- a/packages/api-client/src/api/getAvailableCustomerShippingMethods/index.ts +++ b/packages/api-client/src/api/getAvailableCustomerShippingMethods/index.ts @@ -7,10 +7,15 @@ import { CustomerAvailableShippingMethodsQuery, } from '../../types/GraphQL'; -export default async ( +/** + * Retrive available shipping methods for current customer + * @param context VSF Context + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function getAvailableCustomerShippingMethods( context: Context, customQuery: CustomQuery = { shippingMethods: 'shippingMethods' }, -): Promise> => { +): Promise> { const { shippingMethods } = context.extendQuery( customQuery, { @@ -27,4 +32,4 @@ export default async ( } catch (error) { throw error.graphQLErrors?.[0].message || error.networkError?.result || error; } -}; +} diff --git a/packages/api-client/src/api/getAvailablePaymentMethods/GuestAvailablePaymentMethods.ts b/packages/api-client/src/api/getAvailablePaymentMethods/GuestAvailablePaymentMethods.ts index 8c6550fbf..f34147d52 100644 --- a/packages/api-client/src/api/getAvailablePaymentMethods/GuestAvailablePaymentMethods.ts +++ b/packages/api-client/src/api/getAvailablePaymentMethods/GuestAvailablePaymentMethods.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Query that fetches available payment methods for received cart. */ export default gql` query GuestAvailablePaymentMethods($cartId: String!) { cart(cart_id: $cartId) { diff --git a/packages/api-client/src/api/getAvailablePaymentMethods/index.ts b/packages/api-client/src/api/getAvailablePaymentMethods/index.ts index 2f513de6e..c28bec00a 100644 --- a/packages/api-client/src/api/getAvailablePaymentMethods/index.ts +++ b/packages/api-client/src/api/getAvailablePaymentMethods/index.ts @@ -2,31 +2,32 @@ import { ApolloQueryResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; import { Context } from '../../types/context'; import GuestAvailablePaymentMethods from './GuestAvailablePaymentMethods'; -import { - GuestAvailablePaymentMethodsQuery, - GuestAvailablePaymentMethodsQueryVariables, -} from '../../types/GraphQL'; +import type { GuestAvailablePaymentMethodsQuery, GuestAvailablePaymentMethodsQueryVariables } from '../../types/GraphQL'; -export default async ( +/** + * Fetches the available payment methods for the received cart. + * + * @param context VSF context + * @param params params containing the cart's ID + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function getAvailablePaymentMethods( context: Context, params: { cartId: string; }, customQuery: CustomQuery = { paymentMethods: 'paymentMethods' }, -): Promise> => { +): Promise> { const defaultVariables = { cartId: params.cartId || '', }; - const { paymentMethods } = context.extendQuery( - customQuery, - { - paymentMethods: { - query: GuestAvailablePaymentMethods, - variables: defaultVariables, - }, + const { paymentMethods } = context.extendQuery(customQuery, { + paymentMethods: { + query: GuestAvailablePaymentMethods, + variables: defaultVariables, }, - ); + }); try { return await context.client.query({ @@ -36,4 +37,4 @@ export default async ( } catch (error) { throw error.graphQLErrors?.[0].message || error.networkError?.result || error; } -}; +} diff --git a/packages/api-client/src/api/getCustomerAddresses/getCustomerAddresses.ts b/packages/api-client/src/api/getCustomerAddresses/getCustomerAddresses.ts index cd5a09468..f25fe43e2 100644 --- a/packages/api-client/src/api/getCustomerAddresses/getCustomerAddresses.ts +++ b/packages/api-client/src/api/getCustomerAddresses/getCustomerAddresses.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Query that fetches customer addresses. */ export default gql` query getCustomerAddresses { customer { diff --git a/packages/api-client/src/api/getCustomerAddresses/index.ts b/packages/api-client/src/api/getCustomerAddresses/index.ts index fa1175ba1..96542bcfd 100644 --- a/packages/api-client/src/api/getCustomerAddresses/index.ts +++ b/packages/api-client/src/api/getCustomerAddresses/index.ts @@ -4,24 +4,27 @@ import { GetCustomerAddressesQuery } from '../../types/GraphQL'; import getCustomerAddressesQuery from './getCustomerAddresses'; import { Context } from '../../types/context'; -export default async ( +/** + * Fetches customer addresses. + * + * @param context - VSF Context + * @param [customQuery] - (optional) - custom GraphQL query that extends the default query + */ +export default async function getCustomerAddresses( context: Context, customQuery: CustomQuery = { getCustomerAddresses: 'getCustomerAddresses' }, -): Promise> => { - const { getCustomerAddresses } = context.extendQuery( - customQuery, - { - getCustomerAddresses: { - query: getCustomerAddressesQuery, - }, +): Promise> { + const { getCustomerAddresses: getCustomerAddressesGQL } = context.extendQuery(customQuery, { + getCustomerAddresses: { + query: getCustomerAddressesQuery, }, - ); + }); try { return await context.client.query({ - query: getCustomerAddresses.query, + query: getCustomerAddressesGQL.query, }); } catch (error) { throw error.graphQLErrors?.[0].message || error.networkError?.result || error; } -}; +} diff --git a/packages/api-client/src/api/placeOrder/index.ts b/packages/api-client/src/api/placeOrder/index.ts index 3aa9d3a3c..1b00bb2ac 100644 --- a/packages/api-client/src/api/placeOrder/index.ts +++ b/packages/api-client/src/api/placeOrder/index.ts @@ -1,32 +1,34 @@ import { FetchResult } from '@apollo/client/core'; -import gql from 'graphql-tag'; import { CustomQuery } from '@vue-storefront/core'; -import placeOrderQuery from './placeOrder'; -import { - PlaceOrderInput, - PlaceOrderMutation, - PlaceOrderMutationVariables, -} from '../../types/GraphQL'; +import placeOrderMutation from './placeOrder'; +import { PlaceOrderInput, PlaceOrderMutation, PlaceOrderMutationVariables } from '../../types/GraphQL'; import { Context } from '../../types/context'; -export default async ( +/** + * Places an order for received cart. + * + * @param context VSF Context + * @param input the order's input, containing the cart's ID + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function placeOrder( context: Context, input: PlaceOrderInput, customQuery: CustomQuery = { placeOrder: 'placeOrder' }, -): Promise> => { - const { placeOrder } = context.extendQuery(customQuery, { +): Promise> { + const { placeOrder: placeOrderGQL } = context.extendQuery(customQuery, { placeOrder: { - query: placeOrderQuery, + query: placeOrderMutation, variables: { input }, }, }); try { return await context.client.mutate({ - mutation: placeOrder.query, - variables: placeOrder.variables, + mutation: placeOrderGQL.query, + variables: placeOrderGQL.variables, }); } catch (error) { throw error.graphQLErrors?.[0].message || error.networkError?.result || error; } -}; +} diff --git a/packages/api-client/src/api/placeOrder/placeOrder.ts b/packages/api-client/src/api/placeOrder/placeOrder.ts index eff26145c..24cc11781 100644 --- a/packages/api-client/src/api/placeOrder/placeOrder.ts +++ b/packages/api-client/src/api/placeOrder/placeOrder.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutatiion that places an order. */ export default gql` mutation placeOrder($input: PlaceOrderInput) { placeOrder(input: $input) { diff --git a/packages/api-client/src/api/productDetail/index.ts b/packages/api-client/src/api/productDetail/index.ts index c9b76206a..216820ecd 100644 --- a/packages/api-client/src/api/productDetail/index.ts +++ b/packages/api-client/src/api/productDetail/index.ts @@ -1,14 +1,14 @@ -import { ApolloQueryResult } from '@apollo/client/core'; import { CustomQuery, Logger } from '@vue-storefront/core'; -import { +import type { ApolloQueryResult } from '@apollo/client/core'; +import productDetailsQuery from './productDetailsQuery'; +import type { ProductAttributeFilterInput, ProductAttributeSortInput, ProductDetailsQuery, ProductDetailsQueryVariables, } from '../../types/GraphQL'; -import detailQuery from './productDetailsQuery'; -import { Context } from '../../types/context'; -import { GetProductSearchParams } from '../../types/API'; +import type { Context } from '../../types/context'; +import type { GetProductSearchParams } from '../../types/API'; type Variables = { pageSize: number; @@ -18,11 +18,18 @@ type Variables = { sort?: ProductAttributeSortInput; }; -export default async ( +/** + * Fetches the list of products with details using sort, filters and pagination. + * + * @param context VSF context + * @param searchParams params with sort, filters and pagination + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function productDetail( context: Context, searchParams?: GetProductSearchParams, customQuery: CustomQuery = { productDetail: 'productDetail' }, -): Promise> => { +): Promise> { const defaultParams = { pageSize: 10, currentPage: 1, @@ -41,17 +48,17 @@ export default async ( if (defaultParams.sort) variables.sort = defaultParams.sort; - const { productDetail } = context.extendQuery(customQuery, { + const { productDetail: productDetailGQL } = context.extendQuery(customQuery, { productDetail: { - query: detailQuery, + query: productDetailsQuery, variables, }, }); try { const result = await context.client.query({ - query: productDetail.query, - variables: productDetail.variables, + query: productDetailGQL.query, + variables: productDetailGQL.variables, }); if (result.data.products.items.length === 0) throw new Error('No products found'); @@ -71,4 +78,4 @@ export default async ( Logger.error(error); throw error.networkError?.result || error; } -}; +} diff --git a/packages/api-client/src/api/productDetail/productDetailsQuery.ts b/packages/api-client/src/api/productDetail/productDetailsQuery.ts index e82720016..f4e0b60bb 100644 --- a/packages/api-client/src/api/productDetail/productDetailsQuery.ts +++ b/packages/api-client/src/api/productDetail/productDetailsQuery.ts @@ -1,5 +1,9 @@ import gql from 'graphql-tag'; +/** + * GraphQL Query that fetches the list of products with details using sort, + * filters and pagination. + */ export default gql` query productDetails( $search: String = "", diff --git a/packages/api-client/src/api/productReview/index.ts b/packages/api-client/src/api/productReview/index.ts index c4302cc87..f508c0156 100644 --- a/packages/api-client/src/api/productReview/index.ts +++ b/packages/api-client/src/api/productReview/index.ts @@ -18,6 +18,9 @@ type Variables = { sort?: ProductAttributeSortInput; }; +/** + * Returns reviews of the provided product + */ export default async ( context: Context, searchParams?: GetProductSearchParams, diff --git a/packages/api-client/src/api/productReviewRatingsMetadata/index.ts b/packages/api-client/src/api/productReviewRatingsMetadata/index.ts index ebbbbd266..4f630838e 100644 --- a/packages/api-client/src/api/productReviewRatingsMetadata/index.ts +++ b/packages/api-client/src/api/productReviewRatingsMetadata/index.ts @@ -4,6 +4,9 @@ import { ProductReviewRatingsMetadataQuery } from '../../types/GraphQL'; import productReviewRatingsMetadata from './productReviewRatingsMetadata'; import { Context } from '../../types/context'; +/** + * Returns additional product reviews data + */ export default async ( context: Context, customQuery: CustomQuery = { productReviewRatingsMetadata: 'productReviewRatingsMetadata' }, diff --git a/packages/api-client/src/api/products/index.ts b/packages/api-client/src/api/products/index.ts index 245712868..6424b83d6 100644 --- a/packages/api-client/src/api/products/index.ts +++ b/packages/api-client/src/api/products/index.ts @@ -6,7 +6,7 @@ import { ProductsListQuery, ProductsListQueryVariables, } from '../../types/GraphQL'; -import productsList from './productsList'; +import productsListQuery from './productsList'; import { Context } from '../../types/context'; import { GetProductSearchParams } from '../../types/API'; @@ -18,11 +18,19 @@ type Variables = { sort?: ProductAttributeSortInput; }; -export default async ( +/** + * Fetches products using received search term and params for filter, sort and + * pagination. + * + * @param context VSF context + * @param searchParams search term and params for filter, sort and pagination + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function products( context: Context, searchParams?: GetProductSearchParams, customQuery: CustomQuery = { products: 'products' }, -): Promise> => { +): Promise> { const defaultParams = { pageSize: 10, currentPage: 1, @@ -40,22 +48,19 @@ export default async ( if (defaultParams.sort) variables.sort = defaultParams.sort; - const { products } = context.extendQuery( - customQuery, - { - products: { - query: productsList, - variables, - }, + const { products: productsGQL } = context.extendQuery(customQuery, { + products: { + query: productsListQuery, + variables, }, - ); + }); try { return await context.client.query({ - query: products.query, - variables: products.variables, + query: productsGQL.query, + variables: productsGQL.variables, }); } catch (error) { throw error.graphQLErrors?.[0].message || error.networkError?.result || error; } -}; +} diff --git a/packages/api-client/src/api/products/productsList.ts b/packages/api-client/src/api/products/productsList.ts index 30a64a07f..b84fc32fb 100644 --- a/packages/api-client/src/api/products/productsList.ts +++ b/packages/api-client/src/api/products/productsList.ts @@ -1,5 +1,9 @@ import gql from 'graphql-tag'; +/** + * GraphQL Query that fetches products using received search term and the params + * for filter, sort and pagination. + */ export default gql` query productsList($search: String = "", $filter: ProductAttributeFilterInput, $pageSize: Int = 10, $currentPage: Int = 1, $sort: ProductAttributeSortInput) { products(search: $search, filter: $filter, pageSize: $pageSize, currentPage: $currentPage, sort: $sort) { diff --git a/packages/api-client/src/api/relatedProduct/index.ts b/packages/api-client/src/api/relatedProduct/index.ts index 88c9ea1e1..054021d1c 100644 --- a/packages/api-client/src/api/relatedProduct/index.ts +++ b/packages/api-client/src/api/relatedProduct/index.ts @@ -1,14 +1,14 @@ -import { ApolloQueryResult } from '@apollo/client/core'; -import { CustomQuery } from '@vue-storefront/core'; -import { +import type { ApolloQueryResult } from '@apollo/client/core'; +import type { CustomQuery } from '@vue-storefront/core'; +import type { ProductAttributeFilterInput, ProductAttributeSortInput, RelatedProductQuery, RelatedProductQueryVariables, } from '../../types/GraphQL'; -import relatedProduct from './relatedProduct'; -import { Context } from '../../types/context'; -import { GetProductSearchParams } from '../../types/API'; +import relatedProductQuery from './relatedProduct'; +import type { Context } from '../../types/context'; +import type { GetProductSearchParams } from '../../types/API'; type Variables = { pageSize: number; @@ -18,11 +18,19 @@ type Variables = { sort?: ProductAttributeSortInput; }; -export default async ( +/** + * Searches for related products using params for sorting, filtering and + * pagination. + * + * @param context VSF context + * @param searchParams params for sorting, filtering and pagination + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function relatedProduct( context: Context, searchParams?: GetProductSearchParams, customQuery: CustomQuery = { relatedProduct: 'relatedProduct' }, -): Promise> => { +): Promise> { const defaultParams = { pageSize: 10, currentPage: 1, @@ -42,7 +50,7 @@ export default async ( const { relatedProduct: relatedProductGQL } = context.extendQuery(customQuery, { relatedProduct: { - query: relatedProduct, + query: relatedProductQuery, variables, }, }); @@ -55,4 +63,4 @@ export default async ( } catch (error) { throw error.graphQLErrors?.[0].message || error.networkError?.result || error; } -}; +} diff --git a/packages/api-client/src/api/relatedProduct/relatedProduct.ts b/packages/api-client/src/api/relatedProduct/relatedProduct.ts index 266e8a334..1b4b5c3f2 100644 --- a/packages/api-client/src/api/relatedProduct/relatedProduct.ts +++ b/packages/api-client/src/api/relatedProduct/relatedProduct.ts @@ -1,5 +1,9 @@ import gql from 'graphql-tag'; +/** + * GraphQL Query that searches for related products using params for sorting, + * filtering and pagination. + */ export default gql` query relatedProduct( $search: String = "" diff --git a/packages/api-client/src/api/removeCouponFromCart/index.ts b/packages/api-client/src/api/removeCouponFromCart/index.ts index 53d658c7e..ef40bb40b 100644 --- a/packages/api-client/src/api/removeCouponFromCart/index.ts +++ b/packages/api-client/src/api/removeCouponFromCart/index.ts @@ -1,23 +1,29 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import removeCouponFromCart from './removeCouponFromCart'; +import type { Context } from '../../types/context'; import { RemoveCouponFromCartInput, RemoveCouponFromCartMutation, RemoveCouponFromCartMutationVariables, } from '../../types/GraphQL'; -import { Context } from '../../types/context'; +import removeCouponFromCartMutation from './removeCouponFromCart'; -export default async ( +/** + * Removes a coupon from a cart + * @param context VSF context + * @param input ID of the cart and coupon to remove + * @param customQuery custom GraphQL query that extends the default one + */ +export default async function removeCouponFromCart( context: Context, input: RemoveCouponFromCartInput, customQuery: CustomQuery = { removeCouponFromCart: 'removeCouponFromCart' }, -): Promise> => { +): Promise> { const { removeCouponFromCart: removeCouponFromCartGQL } = context.extendQuery( customQuery, { removeCouponFromCart: { - query: removeCouponFromCart, + query: removeCouponFromCartMutation, variables: { input }, }, }, @@ -27,4 +33,4 @@ export default async ( mutation: removeCouponFromCartGQL.query, variables: removeCouponFromCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/removeCouponFromCart/removeCouponFromCart.ts b/packages/api-client/src/api/removeCouponFromCart/removeCouponFromCart.ts index 55e981478..0a9f4f83f 100644 --- a/packages/api-client/src/api/removeCouponFromCart/removeCouponFromCart.ts +++ b/packages/api-client/src/api/removeCouponFromCart/removeCouponFromCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL query to remove a coupon from a cart */ export default gql` mutation removeCouponFromCart($input: RemoveCouponFromCartInput) { removeCouponFromCart(input: $input) { diff --git a/packages/api-client/src/api/removeItemFromCart/index.ts b/packages/api-client/src/api/removeItemFromCart/index.ts index 24eb27787..3d43970e0 100644 --- a/packages/api-client/src/api/removeItemFromCart/index.ts +++ b/packages/api-client/src/api/removeItemFromCart/index.ts @@ -1,23 +1,29 @@ import { FetchResult } from '@apollo/client/core'; -import { CustomQuery } from '@vue-storefront/core'; -import removeItemFromCart from './removeItemFromCart'; +import type { CustomQuery } from '@vue-storefront/core'; +import type { Context } from '../../types/context'; import { RemoveItemFromCartInput, RemoveItemFromCartMutation, RemoveItemFromCartMutationVariables, } from '../../types/GraphQL'; -import { Context } from '../../types/context'; +import removeItemFromCartMutation from './removeItemFromCart'; -export default async ( +/** + * Removes an item from the given cart + * @param context VSF context + * @param input ID of the cart and item to be removed from it + * @param customQuery custom GraphQL query that extends the default one + */ +export default async function removeItemFromCart( context: Context, input: RemoveItemFromCartInput, customQuery: CustomQuery = { removeItemFromCart: 'removeItemFromCart' }, -): Promise> => { +): Promise> { const { removeItemFromCart: removeItemFromCartGQL } = context.extendQuery( customQuery, { removeItemFromCart: { - query: removeItemFromCart, + query: removeItemFromCartMutation, variables: { input }, }, }, @@ -27,4 +33,4 @@ export default async ( mutation: removeItemFromCartGQL.query, variables: removeItemFromCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/removeItemFromCart/removeItemFromCart.ts b/packages/api-client/src/api/removeItemFromCart/removeItemFromCart.ts index e7fc77e35..0876cc7a2 100644 --- a/packages/api-client/src/api/removeItemFromCart/removeItemFromCart.ts +++ b/packages/api-client/src/api/removeItemFromCart/removeItemFromCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation to remove an item from a cart */ export default gql` mutation removeItemFromCart($input: RemoveItemFromCartInput) { removeItemFromCart(input: $input) { diff --git a/packages/api-client/src/api/requestPasswordResetEmail/index.ts b/packages/api-client/src/api/requestPasswordResetEmail/index.ts index 4550c46a3..acdd60873 100644 --- a/packages/api-client/src/api/requestPasswordResetEmail/index.ts +++ b/packages/api-client/src/api/requestPasswordResetEmail/index.ts @@ -9,11 +9,17 @@ import { } from '../../types/GraphQL'; import { Context } from '../../types/context'; -export default async ( +/** + * Requests a password reset email to be sent to the user + * @param context VSF Context + * @param input Email for which to request a password reset + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function requestPasswordResetEmail( context: Context, input: RequestPasswordResetEmailMutationVariables, customQuery: CustomQuery = { requestPasswordResetEmail: 'requestPasswordResetEmail' }, -): Promise> => { +): Promise> { const { recaptchaToken, ...variables } = input; @@ -32,7 +38,7 @@ export default async ( } } - const { requestPasswordResetEmail } = context.extendQuery(customQuery, { + const { requestPasswordResetEmail: extendedMutation } = context.extendQuery(customQuery, { requestPasswordResetEmail: { query: requestPasswordResetEmailMutation, variables: { ...variables }, @@ -42,11 +48,11 @@ export default async ( Logger.debug('[VSF: Magento] requestPasswordResetEmail', JSON.stringify(input, null, 2)); const result = await context.client .mutate({ - mutation: requestPasswordResetEmail.query, - variables: requestPasswordResetEmail.variables, + mutation: extendedMutation.query, + variables: extendedMutation.variables, }); if (!result.data.requestPasswordResetEmail) throw new Error('Email was not found, or not available.'); return result; -}; +} diff --git a/packages/api-client/src/api/requestPasswordResetEmail/requestPasswordResetEmail.ts b/packages/api-client/src/api/requestPasswordResetEmail/requestPasswordResetEmail.ts index a1e454982..22fddc39a 100644 --- a/packages/api-client/src/api/requestPasswordResetEmail/requestPasswordResetEmail.ts +++ b/packages/api-client/src/api/requestPasswordResetEmail/requestPasswordResetEmail.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that requests a password reset email to be sent */ export default gql` mutation requestPasswordResetEmail($email: String!){ requestPasswordResetEmail(email: $email) diff --git a/packages/api-client/src/api/resetPassword/index.ts b/packages/api-client/src/api/resetPassword/index.ts index acc54945f..1f2b8803d 100644 --- a/packages/api-client/src/api/resetPassword/index.ts +++ b/packages/api-client/src/api/resetPassword/index.ts @@ -1,6 +1,5 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery, Logger } from '@vue-storefront/core'; -import gql from 'graphql-tag'; import { GraphQLError } from 'graphql'; import resetPasswordMutation from './resetPassword'; import { @@ -10,11 +9,17 @@ import { import { Context } from '../../types/context'; import recaptchaValidator from '../../helpers/recaptcha/recaptchaValidator'; -export default async ( +/** + * Resets a user's password + * @param context VSF Context + * @param input Params used to reset a user's password + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function resetPassword( context: Context, input: ResetPasswordMutationVariables, customQuery: CustomQuery = { resetPassword: 'resetPassword' }, -): Promise> => { +): Promise> { const { recaptchaToken, ...variables } = input; @@ -33,7 +38,7 @@ export default async ( } } - const { resetPassword } = context.extendQuery(customQuery, { + const { resetPassword: extendedResetPasswordMutation } = context.extendQuery(customQuery, { resetPassword: { query: resetPasswordMutation, variables: { ...variables }, @@ -43,11 +48,11 @@ export default async ( Logger.debug('[VSF: Magento] requestPasswordResetEmail', JSON.stringify(input, null, 2)); const result = await context.client .mutate({ - mutation: resetPassword.query, - variables: resetPassword.variables, + mutation: extendedResetPasswordMutation.query, + variables: extendedResetPasswordMutation.variables, }); if (!result.data.resetPassword) throw new Error('It was not possible to change the user password.'); return result; -}; +} diff --git a/packages/api-client/src/api/resetPassword/resetPassword.ts b/packages/api-client/src/api/resetPassword/resetPassword.ts index 9ae5bfa28..c09964c2c 100644 --- a/packages/api-client/src/api/resetPassword/resetPassword.ts +++ b/packages/api-client/src/api/resetPassword/resetPassword.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that resets a users's password */ export default gql` mutation resetPassword($email: String!, $newPassword: String!, $resetPasswordToken: String!){ resetPassword(email: $email, newPassword: $newPassword, resetPasswordToken: $resetPasswordToken) diff --git a/packages/api-client/src/api/revokeCustomerToken/index.ts b/packages/api-client/src/api/revokeCustomerToken/index.ts index 58c9aeab2..e3f26ebe7 100644 --- a/packages/api-client/src/api/revokeCustomerToken/index.ts +++ b/packages/api-client/src/api/revokeCustomerToken/index.ts @@ -4,6 +4,9 @@ import revokeCustomerToken from './revokeCustomerToken'; import { Context } from '../../types/context'; import { RevokeCustomerTokenMutation } from '../../types/GraphQL'; +/** + * Logs out the current customer. To override the default query, use the `revokeCustomerToken` query key. + */ export default async ( context: Context, customQuery: CustomQuery = { revokeCustomerToken: 'revokeCustomerToken' }, diff --git a/packages/api-client/src/api/setGuestEmailOnCart/index.ts b/packages/api-client/src/api/setGuestEmailOnCart/index.ts index e9fca9eb8..4d63036ed 100644 --- a/packages/api-client/src/api/setGuestEmailOnCart/index.ts +++ b/packages/api-client/src/api/setGuestEmailOnCart/index.ts @@ -1,21 +1,27 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import setGuestEmailOnCart from './setGuestEmailOnCart'; +import setGuestEmailOnCartMutation from './setGuestEmailOnCart'; import { SetGuestEmailOnCartInput, SetGuestEmailOnCartMutation, SetGuestEmailOnCartMutationVariables, } from '../../types/GraphQL'; import { Context } from '../../types/context'; -export default async ( +/** + * Set the guest user email on the cart + * @param context VSF Context + * @param input Variables to set guest email + * @param [customQuery] (optional) - Custom query that will extend default one + */ +export default async function setGuestEmailOnCart( context: Context, input: SetGuestEmailOnCartInput, customQuery: CustomQuery = { setGuestEmailOnCart: 'setGuestEmailOnCart' }, -): Promise> => { +): Promise> { const { setGuestEmailOnCart: setGuestEmailOnCartGQL } = context.extendQuery( customQuery, { setGuestEmailOnCart: { - query: setGuestEmailOnCart, + query: setGuestEmailOnCartMutation, variables: { input }, }, }, @@ -25,4 +31,4 @@ export default async ( mutation: setGuestEmailOnCartGQL.query, variables: setGuestEmailOnCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/setGuestEmailOnCart/setGuestEmailOnCart.ts b/packages/api-client/src/api/setGuestEmailOnCart/setGuestEmailOnCart.ts index 286409522..cab8312b5 100644 --- a/packages/api-client/src/api/setGuestEmailOnCart/setGuestEmailOnCart.ts +++ b/packages/api-client/src/api/setGuestEmailOnCart/setGuestEmailOnCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that sets the guest user email on a cart */ export default gql` mutation setGuestEmailOnCart($input: SetGuestEmailOnCartInput) { setGuestEmailOnCart(input: $input) { diff --git a/packages/api-client/src/api/setPaymentMethodOnCart/index.ts b/packages/api-client/src/api/setPaymentMethodOnCart/index.ts index 9f1ad945d..68d6a4910 100644 --- a/packages/api-client/src/api/setPaymentMethodOnCart/index.ts +++ b/packages/api-client/src/api/setPaymentMethodOnCart/index.ts @@ -1,34 +1,34 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import setPaymentMethodOnCart from './setPaymentMethodOnCart'; -import { - SetPaymentMethodOnCartInput, - SetPaymentMethodOnCartMutation, - SetPaymentMethodOnCartMutationVariables, -} from '../../types/GraphQL'; +import setPaymentMethodOnCartMutation from './setPaymentMethodOnCart'; +import type { SetPaymentMethodOnCartInput, SetPaymentMethodOnCartMutation, SetPaymentMethodOnCartMutationVariables } from '../../types/GraphQL'; import { Context } from '../../types/context'; export interface SetPaymentMethodOnCartInputs extends SetPaymentMethodOnCartInput { [k: string]: any; } -export default async ( +/** + * Sets received payment method on cart. + * + * @param context VSF context + * @param input params containing the cart's ID and the payment method + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function setPaymentMethodOnCart( context: Context, input: SetPaymentMethodOnCartInputs, customQuery: CustomQuery = { setPaymentMethodOnCart: 'setPaymentMethodOnCart' }, -): Promise> => { - const { setPaymentMethodOnCart: setPaymentMethodOnCartGQL } = context.extendQuery( - customQuery, - { - setPaymentMethodOnCart: { - query: setPaymentMethodOnCart, - variables: { input }, - }, +): Promise> { + const { setPaymentMethodOnCart: setPaymentMethodOnCartGQL } = context.extendQuery(customQuery, { + setPaymentMethodOnCart: { + query: setPaymentMethodOnCartMutation, + variables: { input }, }, - ); + }); return context.client.mutate({ mutation: setPaymentMethodOnCartGQL.query, variables: setPaymentMethodOnCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/setPaymentMethodOnCart/setPaymentMethodOnCart.ts b/packages/api-client/src/api/setPaymentMethodOnCart/setPaymentMethodOnCart.ts index f0c2571b6..b13e601d7 100644 --- a/packages/api-client/src/api/setPaymentMethodOnCart/setPaymentMethodOnCart.ts +++ b/packages/api-client/src/api/setPaymentMethodOnCart/setPaymentMethodOnCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that sets received payment method on cart. */ export default gql` mutation setPaymentMethodOnCart($input: SetPaymentMethodOnCartInput) { setPaymentMethodOnCart(input: $input) { diff --git a/packages/api-client/src/api/setShippingAddressesOnCart/index.ts b/packages/api-client/src/api/setShippingAddressesOnCart/index.ts index 600f0c3c3..0eb86b4f3 100644 --- a/packages/api-client/src/api/setShippingAddressesOnCart/index.ts +++ b/packages/api-client/src/api/setShippingAddressesOnCart/index.ts @@ -1,30 +1,34 @@ -import { FetchResult } from '@apollo/client/core'; -import { CustomQuery } from '@vue-storefront/core'; -import setShippingAddressesOnCart from './setShippingAddressesOnCart'; -import { +import type { FetchResult } from '@apollo/client/core'; +import type { CustomQuery } from '@vue-storefront/core'; +import setShippingAddressesOnCartQuery from './setShippingAddressesOnCart'; +import type { SetShippingAddressesOnCartInput, SetShippingAddressesOnCartMutation, SetShippingAddressesOnCartMutationVariables, } from '../../types/GraphQL'; -import { Context } from '../../types/context'; +import type { Context } from '../../types/context'; -export default async ( +/** + * Sets a shipping address on received cart. + * + * @param context VSF context + * @param input params with cart ID and shipping address. + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function setShippingAddressesOnCart( context: Context, input: SetShippingAddressesOnCartInput, customQuery: CustomQuery = { setShippingAddressesOnCart: 'setShippingAddressesOnCart' }, -): Promise> => { - const { setShippingAddressesOnCart: setShippingAddressesOnCartGQL } = context.extendQuery( - customQuery, - { - setShippingAddressesOnCart: { - query: setShippingAddressesOnCart, - variables: { input }, - }, +): Promise> { + const { setShippingAddressesOnCart: setShippingAddressesOnCartGQL } = context.extendQuery(customQuery, { + setShippingAddressesOnCart: { + query: setShippingAddressesOnCartQuery, + variables: { input }, }, - ); + }); return context.client.mutate({ mutation: setShippingAddressesOnCartGQL.query, variables: setShippingAddressesOnCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/setShippingAddressesOnCart/setShippingAddressesOnCart.ts b/packages/api-client/src/api/setShippingAddressesOnCart/setShippingAddressesOnCart.ts index f8d08b4c3..07688c113 100644 --- a/packages/api-client/src/api/setShippingAddressesOnCart/setShippingAddressesOnCart.ts +++ b/packages/api-client/src/api/setShippingAddressesOnCart/setShippingAddressesOnCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that sets a shipping address on received cart. */ export default gql` mutation setShippingAddressesOnCart($input: SetShippingAddressesOnCartInput) { setShippingAddressesOnCart(input: $input) { diff --git a/packages/api-client/src/api/setShippingMethodsOnCart/index.ts b/packages/api-client/src/api/setShippingMethodsOnCart/index.ts index 7132bfeea..1c2b2f6e8 100644 --- a/packages/api-client/src/api/setShippingMethodsOnCart/index.ts +++ b/packages/api-client/src/api/setShippingMethodsOnCart/index.ts @@ -1,30 +1,30 @@ -import { FetchResult } from '@apollo/client/core'; -import { CustomQuery } from '@vue-storefront/core'; -import setShippingMethodsOnCart from './setShippingMethodsOnCart'; -import { - SetShippingMethodsOnCartInput, - SetShippingMethodsOnCartMutation, - SetShippingMethodsOnCartMutationVariables, -} from '../../types/GraphQL'; -import { Context } from '../../types/context'; +import type { FetchResult } from '@apollo/client/core'; +import type { CustomQuery } from '@vue-storefront/core'; +import setShippingMethodsOnCartMutation from './setShippingMethodsOnCart'; +import type { SetShippingMethodsOnCartInput, SetShippingMethodsOnCartMutation, SetShippingMethodsOnCartMutationVariables } from '../../types/GraphQL'; +import type { Context } from '../../types/context'; -export default async ( +/** + * Sets a shipping method on received cart. + * + * @param context VSF context + * @param input params with cart ID and shipping method. + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function setShippingMethodsOnCart( context: Context, input: SetShippingMethodsOnCartInput, customQuery: CustomQuery = { setShippingMethodsOnCart: 'setShippingMethodsOnCart' }, -): Promise> => { - const { setShippingMethodsOnCart: setShippingMethodsOnCartGQL } = context.extendQuery( - customQuery, - { - setShippingMethodsOnCart: { - query: setShippingMethodsOnCart, - variables: { input }, - }, +): Promise> { + const { setShippingMethodsOnCart: setShippingMethodsOnCartGQL } = context.extendQuery(customQuery, { + setShippingMethodsOnCart: { + query: setShippingMethodsOnCartMutation, + variables: { input }, }, - ); + }); return context.client.mutate({ mutation: setShippingMethodsOnCartGQL.query, variables: setShippingMethodsOnCartGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/setShippingMethodsOnCart/setShippingMethodsOnCart.ts b/packages/api-client/src/api/setShippingMethodsOnCart/setShippingMethodsOnCart.ts index ffd61ae18..b5ece0c82 100644 --- a/packages/api-client/src/api/setShippingMethodsOnCart/setShippingMethodsOnCart.ts +++ b/packages/api-client/src/api/setShippingMethodsOnCart/setShippingMethodsOnCart.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that sets a shipping method on received cart. */ export default gql` mutation setShippingMethodsOnCart($input: SetShippingMethodsOnCartInput) { setShippingMethodsOnCart(input: $input) { diff --git a/packages/api-client/src/api/storeConfig/index.ts b/packages/api-client/src/api/storeConfig/index.ts index 594ef550d..3546fef5c 100644 --- a/packages/api-client/src/api/storeConfig/index.ts +++ b/packages/api-client/src/api/storeConfig/index.ts @@ -1,18 +1,23 @@ import { ApolloQueryResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; import { StoreConfigQuery } from '../../types/GraphQL'; -import storeConfig from './storeConfig'; +import storeConfigMutation from './storeConfig'; import { Context } from '../../types/context'; -export default async ( +/** + * Fetches the store configuration from the API + * @param context VSF Context + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function storeConfig( context: Context, customQuery: CustomQuery = { storeConfig: 'storeConfig' }, -): Promise> => { +): Promise> { const { storeConfig: storeConfigGQL } = context.extendQuery( customQuery, { storeConfig: { - query: storeConfig, + query: storeConfigMutation, }, }, ); @@ -20,4 +25,4 @@ export default async ( return context.client.query({ query: storeConfigGQL.query, }); -}; +} diff --git a/packages/api-client/src/api/storeConfig/storeConfig.ts b/packages/api-client/src/api/storeConfig/storeConfig.ts index f1c5e03b4..ebb65180c 100644 --- a/packages/api-client/src/api/storeConfig/storeConfig.ts +++ b/packages/api-client/src/api/storeConfig/storeConfig.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Query that fetches store configuration from the API */ export default gql` query storeConfig { storeConfig { diff --git a/packages/api-client/src/api/subscribeEmailToNewsletter/index.ts b/packages/api-client/src/api/subscribeEmailToNewsletter/index.ts index 43b68c5b7..c9a7b8d64 100644 --- a/packages/api-client/src/api/subscribeEmailToNewsletter/index.ts +++ b/packages/api-client/src/api/subscribeEmailToNewsletter/index.ts @@ -1,30 +1,31 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import subscribeEmailToNewsletter from './subscribeEmailToNewsletter'; -import { - SubscribeEmailToNewsletterMutation, SubscribeEmailToNewsletterMutationVariables, -} from '../../types/GraphQL'; +import subscribeEmailToNewsletterMutation from './subscribeEmailToNewsletter'; +import type { SubscribeEmailToNewsletterMutation, SubscribeEmailToNewsletterMutationVariables } from '../../types/GraphQL'; import { Context } from '../../types/context'; -export default async ( +/** + * Subscribes an email in the newsletter. + * @param context VSF context + * @param input params with the email to subscribe + * @param [customQuery] (optional) - custom GraphQL query that extends the default query + */ +export default async function subscribeEmailToNewsletter( context: Context, { email }: SubscribeEmailToNewsletterMutationVariables, customQuery: CustomQuery = { subscribeEmailToNewsletter: 'subscribeEmailToNewsletter' }, -): Promise> => { - const { subscribeEmailToNewsletter: subscribeEmailToNewsletterGQL } = context.extendQuery( - customQuery, - { - subscribeEmailToNewsletter: { - query: subscribeEmailToNewsletter, - variables: { - email, - }, +): Promise> { + const { subscribeEmailToNewsletter: subscribeEmailToNewsletterGQL } = context.extendQuery(customQuery, { + subscribeEmailToNewsletter: { + query: subscribeEmailToNewsletterMutation, + variables: { + email, }, }, - ); + }); return context.client.mutate({ mutation: subscribeEmailToNewsletterGQL.query, variables: subscribeEmailToNewsletterGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/subscribeEmailToNewsletter/subscribeEmailToNewsletter.ts b/packages/api-client/src/api/subscribeEmailToNewsletter/subscribeEmailToNewsletter.ts index 9a0b02c4b..367d552bf 100644 --- a/packages/api-client/src/api/subscribeEmailToNewsletter/subscribeEmailToNewsletter.ts +++ b/packages/api-client/src/api/subscribeEmailToNewsletter/subscribeEmailToNewsletter.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that subscribes an email in the newsletter. */ export default gql` mutation subscribeEmailToNewsletter($email: String!){ subscribeEmailToNewsletter(email: $email) { diff --git a/packages/api-client/src/api/updateCartItems/index.ts b/packages/api-client/src/api/updateCartItems/index.ts index 366ebb6f4..866a83e54 100644 --- a/packages/api-client/src/api/updateCartItems/index.ts +++ b/packages/api-client/src/api/updateCartItems/index.ts @@ -1,23 +1,29 @@ import { FetchResult } from '@apollo/client/core'; -import { CustomQuery } from '@vue-storefront/core'; -import updateCartItems from './updateCartItems'; +import type { CustomQuery } from '@vue-storefront/core'; +import type { Context } from '../../types/context'; import { UpdateCartItemsInput, UpdateCartItemsMutation, UpdateCartItemsMutationVariables, } from '../../types/GraphQL'; -import { Context } from '../../types/context'; +import updateCartItemsMutation from './updateCartItems'; -export default async ( +/** + * Updates the contents of the given cart + * @param context VSF context + * @param input ID of the cart and the items to update it + * @param customQuery custom GraphQL query that extends the default one + */ +export default async function updateCartItems( context: Context, input: UpdateCartItemsInput, customQuery: CustomQuery = { updateCartItems: 'updateCartItems' }, -): Promise> => { +): Promise> { const { updateCartItems: updateCartItemsGQL } = context.extendQuery( customQuery, { updateCartItems: { - query: updateCartItems, + query: updateCartItemsMutation, variables: { input }, }, }, @@ -27,4 +33,4 @@ export default async ( mutation: updateCartItemsGQL.query, variables: updateCartItemsGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/updateCartItems/updateCartItems.ts b/packages/api-client/src/api/updateCartItems/updateCartItems.ts index 4da4a741e..af5082ae9 100644 --- a/packages/api-client/src/api/updateCartItems/updateCartItems.ts +++ b/packages/api-client/src/api/updateCartItems/updateCartItems.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation to update cart items */ export default gql` mutation updateCartItems($input: UpdateCartItemsInput) { updateCartItems(input: $input) { diff --git a/packages/api-client/src/api/updateCustomer/index.ts b/packages/api-client/src/api/updateCustomer/index.ts index 3f117dca4..2f1162fda 100644 --- a/packages/api-client/src/api/updateCustomer/index.ts +++ b/packages/api-client/src/api/updateCustomer/index.ts @@ -8,6 +8,9 @@ import { } from '../../types/GraphQL'; import { Context } from '../../types/context'; +/** + * Updates the data of the current customer. To override the default query, use the `updateCustomer` query key. + */ export default async ( context: Context, input: CustomerUpdateInput, diff --git a/packages/api-client/src/api/updateCustomerAddress/index.ts b/packages/api-client/src/api/updateCustomerAddress/index.ts index 8516c89a5..256fc54c8 100644 --- a/packages/api-client/src/api/updateCustomerAddress/index.ts +++ b/packages/api-client/src/api/updateCustomerAddress/index.ts @@ -1,6 +1,6 @@ import { FetchResult } from '@apollo/client/core'; import { CustomQuery } from '@vue-storefront/core'; -import updateCustomerAddress from './updateCustomerAddress'; +import updateCustomerAddressMutation from './updateCustomerAddress'; import { CustomerAddressInput, UpdateCustomerAddressMutation, @@ -8,29 +8,33 @@ import { } from '../../types/GraphQL'; import { Context } from '../../types/context'; -export default async ( +/** + * Updates a customer address. + * + * @param context VSF Context + * @param params object with address identifier and the updated data + * @param [customQuery] (optional) custom GraphQL query that extends the default query + */ +export default async function updateCustomerAddress( context: Context, params: { addressId: number; input: CustomerAddressInput; }, customQuery: CustomQuery = { updateCustomerAddress: 'updateCustomerAddress' }, -): Promise> => { - const { updateCustomerAddress: updateCustomerAddressGQL } = context.extendQuery( - customQuery, - { - updateCustomerAddress: { - query: updateCustomerAddress, - variables: { - id: params.addressId, - input: params.input, - }, +): Promise> { + const { updateCustomerAddress: updateCustomerAddressGQL } = context.extendQuery(customQuery, { + updateCustomerAddress: { + query: updateCustomerAddressMutation, + variables: { + id: params.addressId, + input: params.input, }, }, - ); + }); return context.client.mutate({ mutation: updateCustomerAddressGQL.query, variables: updateCustomerAddressGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/updateCustomerAddress/updateCustomerAddress.ts b/packages/api-client/src/api/updateCustomerAddress/updateCustomerAddress.ts index 249fca615..a495d44dc 100644 --- a/packages/api-client/src/api/updateCustomerAddress/updateCustomerAddress.ts +++ b/packages/api-client/src/api/updateCustomerAddress/updateCustomerAddress.ts @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; +/** GraphQL Mutation that updates a customer address. */ export default gql` mutation updateCustomerAddress($id: Int!, $input: CustomerAddressInput) { updateCustomerAddress(id: $id, input: $input) { diff --git a/packages/api-client/src/api/upsellProduct/index.ts b/packages/api-client/src/api/upsellProduct/index.ts index 9f40a81ab..09da6ee02 100644 --- a/packages/api-client/src/api/upsellProduct/index.ts +++ b/packages/api-client/src/api/upsellProduct/index.ts @@ -1,13 +1,14 @@ -import gql from 'graphql-tag'; -import { ApolloQueryResult } from '@apollo/client/core'; -import { CustomQuery } from '@vue-storefront/core'; -import { +import type { ApolloQueryResult } from '@apollo/client/core'; +import type { CustomQuery } from '@vue-storefront/core'; +import upsellProducts from './upsellProducts'; +import type { Context } from '../../types/context'; +import type { GetProductSearchParams } from '../../types/API'; +import type { ProductAttributeFilterInput, - ProductAttributeSortInput, UpsellProductsQuery, UpsellProductsQueryVariables, + ProductAttributeSortInput, + UpsellProductsQuery, + UpsellProductsQueryVariables, } from '../../types/GraphQL'; -import upsellProducts from './upsellProducts'; -import { Context } from '../../types/context'; -import { GetProductSearchParams } from '../../types/API'; type Variables = { pageSize: number; @@ -17,6 +18,9 @@ type Variables = { sort?: ProductAttributeSortInput; }; +/** + * Returns upsell products matching the provided parameters. To override the default query, use the `upsellProducts` query key. + */ export default async ( context: Context, searchParams?: GetProductSearchParams, diff --git a/packages/api-client/src/api/urlResolver/index.ts b/packages/api-client/src/api/urlResolver/index.ts index d68e9f14f..6a0d26779 100644 --- a/packages/api-client/src/api/urlResolver/index.ts +++ b/packages/api-client/src/api/urlResolver/index.ts @@ -1,26 +1,30 @@ -import { ApolloQueryResult } from '@apollo/client/core'; -import { CustomQuery } from '@vue-storefront/core'; -import { UrlResolverQuery, UrlResolverQueryVariables } from '../../types/GraphQL'; -import urlResolver from './urlResolver'; -import { Context } from '../../types/context'; +import type { ApolloQueryResult } from '@apollo/client/core'; +import type { CustomQuery } from '@vue-storefront/core'; +import type { UrlResolverQuery, UrlResolverQueryVariables } from '../../types/GraphQL'; +import urlResolverQuery from './urlResolver'; +import type { Context } from '../../types/context'; -export default async ( +/** + * Fetches the resolver for received URL. + * + * @param context VSF Context + * @param url the URL to be resolved + * @param [customQuery] (optional) - custom GraphQL query that extends the default one + */ +export default async function urlResolver( context: Context, url: string, customQuery: CustomQuery = { urlResolver: 'urlResolver' }, -): Promise> => { - const { urlResolver: urlResolverGQL } = context.extendQuery( - customQuery, - { - urlResolver: { - query: urlResolver, - variables: { url }, - }, +): Promise> { + const { urlResolver: urlResolverGQL } = context.extendQuery(customQuery, { + urlResolver: { + query: urlResolverQuery, + variables: { url }, }, - ); + }); return context.client.query({ query: urlResolverGQL.query, variables: urlResolverGQL.variables, }); -}; +} diff --git a/packages/api-client/src/api/urlResolver/urlResolver.ts b/packages/api-client/src/api/urlResolver/urlResolver.ts index 1d4c3b2fb..9f1de1715 100644 --- a/packages/api-client/src/api/urlResolver/urlResolver.ts +++ b/packages/api-client/src/api/urlResolver/urlResolver.ts @@ -1,11 +1,12 @@ import gql from 'graphql-tag'; +/** GraphQL Query that fetches the resolver for received URL. */ export default gql` query urlResolver($url: String!) { - urlResolver(url:$url) { - id, - redirectCode, - relative_url, + urlResolver(url: $url) { + id + redirectCode + relative_url type entity_uid } diff --git a/packages/api-client/src/helpers/apiClient/defaultSettings.ts b/packages/api-client/src/helpers/apiClient/defaultSettings.ts index e0bccc073..c2133a6e2 100644 --- a/packages/api-client/src/helpers/apiClient/defaultSettings.ts +++ b/packages/api-client/src/helpers/apiClient/defaultSettings.ts @@ -23,6 +23,9 @@ export const defaultSettings: ClientConfig = { setLocale: () => {}, getCountry: () => '', setCountry: () => {}, + setMessage: () => {}, + // @ts-ignore + getMessage: () => ({}), }, externalCheckout: { enable: false, diff --git a/packages/api-client/src/helpers/magentoLink/graphQl.ts b/packages/api-client/src/helpers/magentoLink/graphQl.ts index ce2b1e245..1a21e7e5d 100644 --- a/packages/api-client/src/helpers/magentoLink/graphQl.ts +++ b/packages/api-client/src/helpers/magentoLink/graphQl.ts @@ -11,11 +11,15 @@ import { Logger } from '@vue-storefront/core'; import { onError } from '@apollo/client/link/error'; import { RetryLink } from '@apollo/client/link/retry'; import { setContext } from '@apollo/client/link/context'; +import AgentKeepAlive from 'agentkeepalive'; import { handleRetry } from './linkHandlers'; import { Config } from '../../types/setup'; import possibleTypes from '../../types/possibleTypes.json'; import standardURL from '../url/standardURL'; +const { HttpsAgent } = AgentKeepAlive; +const agent = new HttpsAgent(); + const createErrorHandler = () => onError(({ graphQLErrors, networkError, @@ -60,6 +64,9 @@ export const apolloLinkFactory = (settings: Config, handlers?: { uri: settings.api, // @ts-ignore fetch: (url, options) => fetch(standardURL(url), options), + fetchOptions: { + agent, + }, ...settings.customApolloHttpLinkOptions, }); diff --git a/packages/api-client/src/types/GraphQL.ts b/packages/api-client/src/types/GraphQL.ts index c4b78fc00..91f401bf7 100644 --- a/packages/api-client/src/types/GraphQL.ts +++ b/packages/api-client/src/types/GraphQL.ts @@ -660,13 +660,13 @@ export interface Cart { /** The entered gift message for the cart */ gift_message?: Maybe; /** The unique ID for a `Cart` object */ - id: Scalars['ID']; - is_virtual: Scalars['Boolean']; + id?: Maybe; + is_virtual: Maybe; items?: Maybe>>; prices?: Maybe; selected_payment_method?: Maybe; - shipping_addresses: Array>; - total_quantity: Scalars['Float']; + shipping_addresses?: Maybe>>; + total_quantity?: Maybe; } export interface CartAddressCountry { diff --git a/packages/api-client/src/types/setup.ts b/packages/api-client/src/types/setup.ts index ac480ecc0..cebc7b295 100644 --- a/packages/api-client/src/types/setup.ts +++ b/packages/api-client/src/types/setup.ts @@ -38,16 +38,25 @@ export type Store = { export type ConfigState = { getCartId(): string; setCartId(id?: string | null): void; + removeCartId(): void; getCustomerToken(): string; setCustomerToken(token?: string | null): void; + removeCustomerToken(): void; getStore(): string; setStore(id?: string | null): void; + removeStore(): void; getCurrency(): string; setCurrency(id?: string | null): void; + removeCurrency(): void; getLocale(): string; setLocale(id?: string | null): void; + removeLocale(): void; getCountry(): string; setCountry(id?: string | null): void; + removeCountry(): void; + getMessage(): T; + setMessage(id?: T | null): void; + removeMessage(): void; }; export interface ClientConfig { @@ -84,6 +93,7 @@ export interface Config extends ClientConfig { storage: Storage; customOptions?: ApolloClientOptions; customApolloHttpLinkOptions?: HttpOptions; + magentoApiEndpoint: string; overrides: MagentoApiMethods; recaptcha: RecaptchaConfig; } diff --git a/packages/api-client/tsconfig.json b/packages/api-client/tsconfig.json index 2a7588488..7a4f18ffa 100644 --- a/packages/api-client/tsconfig.json +++ b/packages/api-client/tsconfig.json @@ -1,15 +1,17 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src"], - "exclude": ["node_modules", "lib"], + "extends": "../../tsconfig.json", "compilerOptions": { - "lib": ["ESNext"], - "resolveJsonModule": true, + "outDir": "./lib", "rootDir": "./src", - "declaration": true, - "declarationDir": "./lib", - "declarationMap": true, - "sourceMap": true + "baseUrl": "./", + "lib": [] }, - "files": ["types/shims-graphql.d.ts"] + "include": [ + "src/**/*" + ], + "exclude": [ + "__tests__", + "lib", + "node_modules" + ] } diff --git a/packages/composables/.lintstagedrc b/packages/composables/.lintstagedrc deleted file mode 100644 index 9b476f414..000000000 --- a/packages/composables/.lintstagedrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "*.{js,jsx}": [ - "eslint --fix" - ], - "*.{ts,tsx}": [ - "eslint --fix" - ], -} diff --git a/packages/composables/README.md b/packages/composables/README.md index 2b211aa20..8c0ad9648 100644 --- a/packages/composables/README.md +++ b/packages/composables/README.md @@ -71,20 +71,16 @@ Find more information about the module [GraphQl Custom Config](https://github.co ``` 3. Checkout develop branch `git checkout develop` 4. Run `yarn` to install dependencies -5. Define a store running environment by adding a `STORE_ENV` to your running project or execute the code +5. Copy `.env.example` to `.env` ```bash - $ echo "STORE_ENV=dev" >> .env + $ cp packages/theme/.env.example packages/theme/.env ``` -6. Copy `config/example.json` to an environment named config and update GraphQL Endpoint - ```bash - $ cp packages/theme/config/example.json packages/theme/config/dev.json - ``` -7. Update `magentoGraphQl` with url to Magento >=2.4.2 GraphQL endpoint, and the other variable accordingly to your store configurations. +6. Update `VSF_MAGENTO_GRAPHQL_URL` with url to Magento >=2.4.2 GraphQL endpoint, and the other variable accordingly to your store configurations. ``` - "magentoGraphQl": "https://{YOUR_SITE_FRONT_URL}/graphql", + VSF_MAGENTO_GRAPHQL_URL=https://{YOUR_SITE_FRONT_URL}/graphql ``` -8. Build dependencies `yarn build:api-client && yarn build:composables` -9. Run `yarn dev:theme` to run theme. You can find other commands in `package.json` +7. Build dependencies `yarn build:api-client && yarn build:composables` +8. Run `yarn dev:theme` to run theme. You can find other commands in `package.json` - If you need HMR on Api Client/Composables run `yarn dev:api-client` or `yarn dev:composables` on a separate terminal window. ## Resources diff --git a/packages/composables/babel.config.js b/packages/composables/babel.config.js new file mode 100644 index 000000000..d3540f51b --- /dev/null +++ b/packages/composables/babel.config.js @@ -0,0 +1,9 @@ +module.exports = { + presets: [ + ['@babel/preset-env', { + targets: { + node: 'current' + } + }] + ] +}; diff --git a/packages/composables/jest.config.js b/packages/composables/jest.config.js index 6d23ed571..65abac5c8 100644 --- a/packages/composables/jest.config.js +++ b/packages/composables/jest.config.js @@ -21,8 +21,8 @@ module.exports = { }, testEnvironment: 'jsdom', transform: { - '^.+\\.(ts)$': 'ts-jest', - '^.+\\.js$': 'babel-jest', + '^.+\\.(m)js$': 'babel-jest', + '^.+\\.ts$': 'ts-jest' }, transformIgnorePatterns: [ 'node_modules', diff --git a/packages/composables/nuxt/plugin.js b/packages/composables/nuxt/plugin.js index 00a24f3f1..d3b40aa7f 100644 --- a/packages/composables/nuxt/plugin.js +++ b/packages/composables/nuxt/plugin.js @@ -1,10 +1,11 @@ -import { integrationPlugin } from '@vue-storefront/core' +import { integrationPlugin } from '@vue-storefront/magento-theme/helpers/integrationPlugin' import { mapConfigToSetupObject } from '@vue-storefront/magento/nuxt/helpers'; import defaultConfig from '@vue-storefront/magento/nuxt/defaultConfig'; import cookie from '@vue-storefront/magento/nuxt/cookie'; const moduleOptions = JSON.parse('<%= JSON.stringify(options) %>'); +// TODO should be moved to THEME and expose consistent cookie management API export default integrationPlugin(({ app, res, req, integration }) => { const cartCookieName = moduleOptions.cookies?.cartCookieName || defaultConfig.cookies.cartCookieName; const customerCookieName = moduleOptions.cookies?.customerCookieName || defaultConfig.cookies.customerCookieName; diff --git a/packages/composables/package.json b/packages/composables/package.json index 7f14c33c3..525729113 100644 --- a/packages/composables/package.json +++ b/packages/composables/package.json @@ -1,19 +1,25 @@ { "name": "@vue-storefront/magento", - "version": "1.0.0-rc.6", + "version": "1.0.0-rc.7", "license": "MIT", "homepage": "https://github.com/vuestorefront/magento2", "bugs": { "url": "https://github.com/vuestorefront/magento2/issues" }, "sideEffects": false, - "main": "lib/index.cjs.js", - "module": "lib/index.es.js", - "tsModule": "src/index.ts", + "main": "./lib/index.js", + "exports": { + ".": "./lib/index.js", + "./nuxt": "./nuxt/index.js", + "./package.json": "./package.json" + }, "types": "lib/index.d.ts", "scripts": { - "build": "rimraf lib && rollup -c", - "dev": "rimraf lib && rollup -c -w", + "build": "yarn build:clear && yarn build:package && yarn build:types", + "build:clear": "rimraf lib", + "build:package": "node ../../scripts/build --file=src/index.ts", + "build:types": "tsc --emitDeclarationOnly", + "dev": "yarn build:package --watch", "lint:fix": "eslint ./src --ext .ts,.vue --fix", "precommit": "lint-staged", "prepublish": "yarn build", @@ -22,8 +28,8 @@ "update:update": "ncu -u" }, "dependencies": { - "@vue-storefront/core": "~2.5.4", - "@vue-storefront/magento-api": "^1.0.0-rc.6", + "@vue-storefront/core": "~2.5.6", + "@vue-storefront/magento-api": "^1.0.0-rc.7", "@vue/composition-api": "^1.4.1", "cookie-universal": "^2.1.5", "vue": "^2.6.14", diff --git a/packages/composables/rollup.config.js b/packages/composables/rollup.config.js deleted file mode 100644 index 10dc02f5e..000000000 --- a/packages/composables/rollup.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import pkg from './package.json'; -import { generateBaseConfig } from '../../rollup.base.config'; - -export default generateBaseConfig(pkg); diff --git a/packages/composables/src/composables/useAddresses/index.ts b/packages/composables/src/composables/useAddresses/index.ts index f060077a9..5f697fad8 100644 --- a/packages/composables/src/composables/useAddresses/index.ts +++ b/packages/composables/src/composables/useAddresses/index.ts @@ -1,4 +1,7 @@ /* eslint-disable no-param-reassign, consistent-return */ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, @@ -30,7 +33,7 @@ CustomQueryParams, SaveAddressInput, UpdateAddressInput, RemoveAddressInput> = { - load: async (context: Context, params?: CustomQueryParams) => { + load: async (context: Context) => { Logger.debug('[Magento] load user addresses'); const { data } = await context.$magento.api.getCustomerAddresses(); diff --git a/packages/composables/src/composables/useBilling/index.ts b/packages/composables/src/composables/useBilling/index.ts index bffdbc76e..969206577 100644 --- a/packages/composables/src/composables/useBilling/index.ts +++ b/packages/composables/src/composables/useBilling/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, diff --git a/packages/composables/src/composables/useCart/index.ts b/packages/composables/src/composables/useCart/index.ts index 414ff787d..34466777f 100644 --- a/packages/composables/src/composables/useCart/index.ts +++ b/packages/composables/src/composables/useCart/index.ts @@ -1,5 +1,6 @@ -/* istanbul ignore file */ -/* eslint-disable no-param-reassign */ +/** + * @deprecated since version 1.0.0 + */ import { ComposableFunctionArgs, Context, diff --git a/packages/composables/src/composables/useCategory/index.ts b/packages/composables/src/composables/useCategory/index.ts index d5f33bee2..7df449a7b 100644 --- a/packages/composables/src/composables/useCategory/index.ts +++ b/packages/composables/src/composables/useCategory/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { useCategoryFactory, Context, diff --git a/packages/composables/src/composables/useCategorySearch/index.ts b/packages/composables/src/composables/useCategorySearch/index.ts index f023ff9b8..29c6eae27 100644 --- a/packages/composables/src/composables/useCategorySearch/index.ts +++ b/packages/composables/src/composables/useCategorySearch/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, } from '@vue-storefront/core'; diff --git a/packages/composables/src/composables/useConfig/index.ts b/packages/composables/src/composables/useConfig/index.ts index 8e8af7a1b..6772402be 100644 --- a/packages/composables/src/composables/useConfig/index.ts +++ b/packages/composables/src/composables/useConfig/index.ts @@ -1,4 +1,7 @@ -import {Context, Logger} from '@vue-storefront/core'; +/** + * @deprecated since version 1.0.0 + */ +import { Context, Logger } from '@vue-storefront/core'; import { StoreConfig } from '@vue-storefront/magento-api'; import { useConfigFactory, UseConfigFactoryParams } from '../../factories/useConfigFactory'; import { UseConfig } from '../../types/composables'; diff --git a/packages/composables/src/composables/useContent/index.ts b/packages/composables/src/composables/useContent/index.ts index 2de6bb29c..e1fe69146 100644 --- a/packages/composables/src/composables/useContent/index.ts +++ b/packages/composables/src/composables/useContent/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger } from '@vue-storefront/core'; import { Page, CmsBlock } from '@vue-storefront/magento-api'; import { useContentFactory, UseContentFactoryParams } from '../../factories/useContentFactory'; diff --git a/packages/composables/src/composables/useCountrySearch/index.ts b/packages/composables/src/composables/useCountrySearch/index.ts index 46b3f99d7..deca96596 100644 --- a/packages/composables/src/composables/useCountrySearch/index.ts +++ b/packages/composables/src/composables/useCountrySearch/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, } from '@vue-storefront/core'; diff --git a/packages/composables/src/composables/useCurrency/index.ts b/packages/composables/src/composables/useCurrency/index.ts index f117b04fe..008da2dbd 100644 --- a/packages/composables/src/composables/useCurrency/index.ts +++ b/packages/composables/src/composables/useCurrency/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context } from '@vue-storefront/core'; import { Currency } from '@vue-storefront/magento-api'; import { useCurrencyFactory, UseCurrencyFactoryParams } from '../../factories/useCurrencyFactory'; diff --git a/packages/composables/src/composables/useCustomMutation/index.ts b/packages/composables/src/composables/useCustomMutation/index.ts index 174a9f773..6e8d24632 100644 --- a/packages/composables/src/composables/useCustomMutation/index.ts +++ b/packages/composables/src/composables/useCustomMutation/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger } from '@vue-storefront/core'; import { FetchPolicy } from '../../types'; import { useCustomMutationFactory } from '../../factories/useMutationQueryFactory'; diff --git a/packages/composables/src/composables/useCustomQuery/index.ts b/packages/composables/src/composables/useCustomQuery/index.ts index f0cd387e9..fd14f404f 100644 --- a/packages/composables/src/composables/useCustomQuery/index.ts +++ b/packages/composables/src/composables/useCustomQuery/index.ts @@ -1,3 +1,7 @@ +/** + * @deprecated Will be removed in 1.1.0 release + * @use @vue-storefront/magento-theme/composables/useApi instead + */ import { Context, Logger } from '@vue-storefront/core'; import { useCustomQueryFactory, diff --git a/packages/composables/src/composables/useExternalCheckout/index.ts b/packages/composables/src/composables/useExternalCheckout/index.ts index f96c4b6b8..b42f4ca86 100644 --- a/packages/composables/src/composables/useExternalCheckout/index.ts +++ b/packages/composables/src/composables/useExternalCheckout/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger } from '@vue-storefront/core'; import { useExternalCheckoutFactory, UseExternalCheckoutFactoryParams } from '../../factories/useExternalCheckoutFactory'; import useCart from '../useCart'; diff --git a/packages/composables/src/composables/useFacet/_utils.ts b/packages/composables/src/composables/useFacet/_utils.ts index 83a4441e4..9d8297f2a 100644 --- a/packages/composables/src/composables/useFacet/_utils.ts +++ b/packages/composables/src/composables/useFacet/_utils.ts @@ -1,3 +1,5 @@ +// @depracated - moved to theme + import { SearchData } from '../../types'; const buildBreadcrumbsList = (rootCat, bc) => { diff --git a/packages/composables/src/composables/useFacet/index.ts b/packages/composables/src/composables/useFacet/index.ts index ea6fb2581..3d4a5ff30 100644 --- a/packages/composables/src/composables/useFacet/index.ts +++ b/packages/composables/src/composables/useFacet/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { ComposableFunctionArgs, Context, @@ -58,6 +61,9 @@ const constructSortObject = (sortData: string) => { return baseData.length > 0 ? Object.fromEntries([baseData]) : {}; }; +/** + * @deprecated since version 1.0.0 + */ const factoryParams = { // eslint-disable-next-line @typescript-eslint/no-unused-vars search: async (context: Context, params: ComposableFunctionArgs>) => { diff --git a/packages/composables/src/composables/useForgotPassword/index.ts b/packages/composables/src/composables/useForgotPassword/index.ts index 8dba9e13c..24133c018 100644 --- a/packages/composables/src/composables/useForgotPassword/index.ts +++ b/packages/composables/src/composables/useForgotPassword/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, useForgotPasswordFactory, diff --git a/packages/composables/src/composables/useGetShippingMethods/index.ts b/packages/composables/src/composables/useGetShippingMethods/index.ts index c77087d2e..288df08bb 100644 --- a/packages/composables/src/composables/useGetShippingMethods/index.ts +++ b/packages/composables/src/composables/useGetShippingMethods/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, } from '@vue-storefront/core'; diff --git a/packages/composables/src/composables/useGuestUser/index.ts b/packages/composables/src/composables/useGuestUser/index.ts index 7074561fd..8c4054926 100644 --- a/packages/composables/src/composables/useGuestUser/index.ts +++ b/packages/composables/src/composables/useGuestUser/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { SetGuestEmailOnCartInput } from '@vue-storefront/magento-api'; import { Logger } from '@vue-storefront/core'; import { useGuestUserFactory, UseGuestUserFactoryParams } from '../../factories/useGuestUserFactory'; diff --git a/packages/composables/src/composables/useMakeOrder/index.ts b/packages/composables/src/composables/useMakeOrder/index.ts index 41179c28c..08089256b 100644 --- a/packages/composables/src/composables/useMakeOrder/index.ts +++ b/packages/composables/src/composables/useMakeOrder/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, UseMakeOrder, useMakeOrderFactory, UseMakeOrderFactoryParams, } from '@vue-storefront/core'; diff --git a/packages/composables/src/composables/useNewsletter/index.ts b/packages/composables/src/composables/useNewsletter/index.ts index 434aae0ee..10edf4d0b 100644 --- a/packages/composables/src/composables/useNewsletter/index.ts +++ b/packages/composables/src/composables/useNewsletter/index.ts @@ -1,4 +1,6 @@ -/* istanbul ignore file */ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, } from '@vue-storefront/core'; diff --git a/packages/composables/src/composables/usePaymentProvider/index.ts b/packages/composables/src/composables/usePaymentProvider/index.ts index 255ab316b..281712780 100644 --- a/packages/composables/src/composables/usePaymentProvider/index.ts +++ b/packages/composables/src/composables/usePaymentProvider/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, diff --git a/packages/composables/src/composables/useProduct/index.ts b/packages/composables/src/composables/useProduct/index.ts index 81854b4bc..c1b20659a 100644 --- a/packages/composables/src/composables/useProduct/index.ts +++ b/packages/composables/src/composables/useProduct/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { ComposableFunctionArgs, Context, diff --git a/packages/composables/src/composables/useRelatedProducts/index.ts b/packages/composables/src/composables/useRelatedProducts/index.ts index c14c1124d..89e02efb1 100644 --- a/packages/composables/src/composables/useRelatedProducts/index.ts +++ b/packages/composables/src/composables/useRelatedProducts/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { ComposableFunctionArgs, Context, diff --git a/packages/composables/src/composables/useReview/index.ts b/packages/composables/src/composables/useReview/index.ts index 2ee3abe5d..ee2b930c3 100644 --- a/packages/composables/src/composables/useReview/index.ts +++ b/packages/composables/src/composables/useReview/index.ts @@ -1,4 +1,6 @@ -/* istanbul ignore file */ +/** + * @deprecated since version 1.0.0 + */ import { ComposableFunctionArgs, Context, diff --git a/packages/composables/src/composables/useShipping/index.ts b/packages/composables/src/composables/useShipping/index.ts index dbbc1ba92..33bb092cc 100644 --- a/packages/composables/src/composables/useShipping/index.ts +++ b/packages/composables/src/composables/useShipping/index.ts @@ -1,3 +1,7 @@ +/** + * @deprecated since version 1.0.0 + */ + import { Context, Logger, diff --git a/packages/composables/src/composables/useShippingProvider/index.ts b/packages/composables/src/composables/useShippingProvider/index.ts index 7f360d356..f961c5b6a 100644 --- a/packages/composables/src/composables/useShippingProvider/index.ts +++ b/packages/composables/src/composables/useShippingProvider/index.ts @@ -1,3 +1,7 @@ +/** + * @deprecated since version 1.0.0 + */ + import { Context, Logger, diff --git a/packages/composables/src/composables/useStore/index.ts b/packages/composables/src/composables/useStore/index.ts index 34b8a99b9..cf2e38511 100644 --- a/packages/composables/src/composables/useStore/index.ts +++ b/packages/composables/src/composables/useStore/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context } from '@vue-storefront/core'; import { AvailableStores, StoreConfig } from '@vue-storefront/magento-api'; import { useStoreFactory, UseStoreFactoryParams } from '../../factories/useStoreFactory'; diff --git a/packages/composables/src/composables/useUpsellProducts/index.ts b/packages/composables/src/composables/useUpsellProducts/index.ts index 20abe500a..81d5a812d 100644 --- a/packages/composables/src/composables/useUpsellProducts/index.ts +++ b/packages/composables/src/composables/useUpsellProducts/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { ComposableFunctionArgs, Context, diff --git a/packages/composables/src/composables/useUrlResolver/index.ts b/packages/composables/src/composables/useUrlResolver/index.ts index afd01bbe9..eb1f7d658 100644 --- a/packages/composables/src/composables/useUrlResolver/index.ts +++ b/packages/composables/src/composables/useUrlResolver/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger } from '@vue-storefront/core'; import { Route } from '@vue-storefront/magento-api'; import { useUrlResolverFactory, UseUrlResolverFactoryParams } from '../../factories/useUrlResolverFactory'; diff --git a/packages/composables/src/composables/useUser/index.ts b/packages/composables/src/composables/useUser/index.ts index c105e7f7b..1542fbfb6 100644 --- a/packages/composables/src/composables/useUser/index.ts +++ b/packages/composables/src/composables/useUser/index.ts @@ -1,11 +1,14 @@ -/* istanbul ignore file */ +/** + * @deprecated since version 1.0.0 + */ import { - Context, Logger, + Context, + CustomQuery, + Logger, useUserFactory, UseUserFactoryParams as UserUserFactoryParamsBase, } from '@vue-storefront/core'; import { CustomerCreateInput, UpdateCustomerEmailMutationVariables } from '@vue-storefront/magento-api'; -import { CustomQuery } from '@vue-storefront/core/lib/src/types'; import useCart from '../useCart'; import { generateUserData } from '../../helpers/userDataGenerator'; @@ -174,6 +177,7 @@ CustomerCreateInput return factoryParams.load(context); }, + changePassword: async (context: Context, params) => { Logger.debug('[Magento] changing user password'); const { data, errors } = await context.$magento.api.changeCustomerPassword(params); diff --git a/packages/composables/src/composables/useUserBilling/index.ts b/packages/composables/src/composables/useUserBilling/index.ts index ed316d010..d2b9dbb33 100644 --- a/packages/composables/src/composables/useUserBilling/index.ts +++ b/packages/composables/src/composables/useUserBilling/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, diff --git a/packages/composables/src/composables/useUserOrder/index.ts b/packages/composables/src/composables/useUserOrder/index.ts index ac641d67b..24099be8d 100644 --- a/packages/composables/src/composables/useUserOrder/index.ts +++ b/packages/composables/src/composables/useUserOrder/index.ts @@ -1,4 +1,6 @@ -/* istanbul ignore file */ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, diff --git a/packages/composables/src/composables/useUserShipping/index.ts b/packages/composables/src/composables/useUserShipping/index.ts index 69d81b707..de231d6c1 100644 --- a/packages/composables/src/composables/useUserShipping/index.ts +++ b/packages/composables/src/composables/useUserShipping/index.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, diff --git a/packages/composables/src/composables/useWishlist/index.ts b/packages/composables/src/composables/useWishlist/index.ts index f657abb7a..a238636aa 100644 --- a/packages/composables/src/composables/useWishlist/index.ts +++ b/packages/composables/src/composables/useWishlist/index.ts @@ -1,5 +1,6 @@ -/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/require-await */ -/* istanbul ignore file */ +/** + * @deprecated since version 1.0.0 + */ import { Context, Logger, @@ -8,6 +9,9 @@ import useUser from '../useUser'; import { findItemOnWishlist } from '../../helpers/findItemOnWishlist'; import { useWishlistFactory, UseWishlistFactoryParams } from '../../factories/useWishlistFactory'; +/** + * @deprecated since version 1.0.0 + */ // @ts-ignore const factoryParams: UseWishlistFactoryParams = { provide() { diff --git a/packages/composables/src/factories/useAddressesFactory.ts b/packages/composables/src/factories/useAddressesFactory.ts index 47a18b20d..0ef63c9f1 100644 --- a/packages/composables/src/factories/useAddressesFactory.ts +++ b/packages/composables/src/factories/useAddressesFactory.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { configureFactoryParams, Context, @@ -5,9 +8,10 @@ import { FactoryParams, Logger, sharedRef, + ComposableFunctionArgs, + PlatformApi, } from '@vue-storefront/core'; import { computed, Ref } from '@vue/composition-api'; -import { ComposableFunctionArgs, PlatformApi } from '@vue-storefront/core/lib/src/types'; import { CustomQueryParams, UseAddresses, UseAddressesErrors } from '../types/composables'; export interface UseAddressesParams) => Promise; } +/** + * @deprecated since version 1.0.0 + */ export const useAddressesFactory = extends FactoryParams { load: (context: Context, params: ComposableFunctionArgs<{ realCart?: boolean; }>) => Promise; diff --git a/packages/composables/src/factories/useCategorySearchFactory.ts b/packages/composables/src/factories/useCategorySearchFactory.ts index 46d8494ab..6d57e185a 100644 --- a/packages/composables/src/factories/useCategorySearchFactory.ts +++ b/packages/composables/src/factories/useCategorySearchFactory.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { computed } from '@vue/composition-api'; import { configureFactoryParams, @@ -5,8 +8,9 @@ import { FactoryParams, Logger, sharedRef, + ComposableFunctionArgs, + PlatformApi, } from '@vue-storefront/core'; -import { ComposableFunctionArgs, PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseCategorySearch, UseCategorySearchErrors } from '../types/composables'; export interface UseCategorySearchFactory extends FactoryParams { diff --git a/packages/composables/src/factories/useConfigFactory.ts b/packages/composables/src/factories/useConfigFactory.ts index 727ccb060..cb6b81b50 100644 --- a/packages/composables/src/factories/useConfigFactory.ts +++ b/packages/composables/src/factories/useConfigFactory.ts @@ -1,11 +1,16 @@ +/** + * @deprecated since version 1.0.0 + */ import { computed } from '@vue/composition-api'; import { Context, sharedRef, Logger, - configureFactoryParams, FactoryParams, ComposableFunctionArgs, + configureFactoryParams, + FactoryParams, + ComposableFunctionArgs, + PlatformApi, } from '@vue-storefront/core'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseConfig } from '../types/composables'; export interface UseConfigFactoryParams extends FactoryParams{ diff --git a/packages/composables/src/factories/useContentFactory.ts b/packages/composables/src/factories/useContentFactory.ts index d8a3069bc..771bee30d 100644 --- a/packages/composables/src/factories/useContentFactory.ts +++ b/packages/composables/src/factories/useContentFactory.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { computed, Ref } from '@vue/composition-api'; import { ComposableFunctionArgs, @@ -6,8 +9,8 @@ import { FactoryParams, Logger, sharedRef, + PlatformApi, } from '@vue-storefront/core'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseContentErrors, UseContent } from '../types/composables'; export interface UseContentFactoryParams extends FactoryParams{ diff --git a/packages/composables/src/factories/useCountrySearchFactory.ts b/packages/composables/src/factories/useCountrySearchFactory.ts index 957c0b191..b51aed631 100644 --- a/packages/composables/src/factories/useCountrySearchFactory.ts +++ b/packages/composables/src/factories/useCountrySearchFactory.ts @@ -1,11 +1,16 @@ +/** + * @deprecated since version 1.0.0 + */ import { computed } from '@vue/composition-api'; import { Context, sharedRef, Logger, - configureFactoryParams, FactoryParams, ComposableFunctionArgs, + configureFactoryParams, + FactoryParams, + ComposableFunctionArgs, + PlatformApi, } from '@vue-storefront/core'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseCountrySearch, UseCountrySearchErrors } from '../types/composables'; export interface UseCountryFactoryParams extends FactoryParams{ diff --git a/packages/composables/src/factories/useCurrencyFactory.ts b/packages/composables/src/factories/useCurrencyFactory.ts index 17e00874a..294b4ea5b 100644 --- a/packages/composables/src/factories/useCurrencyFactory.ts +++ b/packages/composables/src/factories/useCurrencyFactory.ts @@ -1,12 +1,16 @@ +/** + * @deprecated since version 1.0.0 + */ import { computed } from '@vue/composition-api'; import { Context, sharedRef, Logger, configureFactoryParams, - FactoryParams, ComposableFunctionArgs, + FactoryParams, + ComposableFunctionArgs, + PlatformApi, } from '@vue-storefront/core'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseCurrency } from '../types/composables'; export interface UseCurrencyFactoryParams extends FactoryParams { diff --git a/packages/composables/src/factories/useCustomQueryFactory.ts b/packages/composables/src/factories/useCustomQueryFactory.ts index e08337e3a..9ea5b52f2 100644 --- a/packages/composables/src/factories/useCustomQueryFactory.ts +++ b/packages/composables/src/factories/useCustomQueryFactory.ts @@ -1,12 +1,16 @@ +/** + * @deprecated Will be removed in 1.1.0 release + * @use @vue-storefront/magento-theme/composables/useApi instead + */ import { configureFactoryParams, Context, FactoryParams, Logger, sharedRef, + PlatformApi, } from '@vue-storefront/core'; import { computed } from '@vue/composition-api'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { FetchPolicy } from '../types'; import { UseCustomQuery } from '../types/composables'; diff --git a/packages/composables/src/factories/useExternalCheckoutFactory.ts b/packages/composables/src/factories/useExternalCheckoutFactory.ts index e1c753daa..fd8be7198 100644 --- a/packages/composables/src/factories/useExternalCheckoutFactory.ts +++ b/packages/composables/src/factories/useExternalCheckoutFactory.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { ComposableFunctionArgs, configureFactoryParams, @@ -5,9 +8,9 @@ import { FactoryParams, Logger, sharedRef, + PlatformApi, } from '@vue-storefront/core'; import { computed } from '@vue/composition-api'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseExternalCheckout } from '../types/composables'; export interface UseExternalCheckoutFactoryParams extends FactoryParams { diff --git a/packages/composables/src/factories/useForgotPasswordFactory.ts b/packages/composables/src/factories/useForgotPasswordFactory.ts index ae2c50954..d8414b60f 100644 --- a/packages/composables/src/factories/useForgotPasswordFactory.ts +++ b/packages/composables/src/factories/useForgotPasswordFactory.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Ref, computed } from '@vue/composition-api'; import { ComposableFunctionArgs, diff --git a/packages/composables/src/factories/useGetShippingMethodsFactory.ts b/packages/composables/src/factories/useGetShippingMethodsFactory.ts index d5e034797..b76ec4fb2 100644 --- a/packages/composables/src/factories/useGetShippingMethodsFactory.ts +++ b/packages/composables/src/factories/useGetShippingMethodsFactory.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { computed, Ref } from '@vue/composition-api'; import { ComposableFunctionArgs, @@ -6,8 +9,8 @@ import { FactoryParams, Logger, sharedRef, + PlatformApi, } from '@vue-storefront/core'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseGetShippingMethods, UseGetShippingMethodsErrors } from '../types/composables'; export interface UseGetShippingMethodsFactory extends FactoryParams { diff --git a/packages/composables/src/factories/useGuestUserFactory.ts b/packages/composables/src/factories/useGuestUserFactory.ts index 549ac9015..89dab407a 100644 --- a/packages/composables/src/factories/useGuestUserFactory.ts +++ b/packages/composables/src/factories/useGuestUserFactory.ts @@ -1,12 +1,16 @@ +/** + * @deprecated since version 1.0.0 + */ import { Ref, computed } from '@vue/composition-api'; import { Context, configureFactoryParams, FactoryParams, Logger, - sharedRef, ComposableFunctionArgs, + sharedRef, + ComposableFunctionArgs, + PlatformApi, } from '@vue-storefront/core'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseGuestUser, UseGuestUserErrors } from '../types/composables'; export interface UseGuestUserFactoryParams extends FactoryParams { diff --git a/packages/composables/src/factories/usePaymentProviderFactory.ts b/packages/composables/src/factories/usePaymentProviderFactory.ts index 1668d99fe..ac6fda02b 100644 --- a/packages/composables/src/factories/usePaymentProviderFactory.ts +++ b/packages/composables/src/factories/usePaymentProviderFactory.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Ref, computed } from '@vue/composition-api'; import { ComposableFunctionArgs, @@ -6,8 +9,8 @@ import { FactoryParams, Logger, sharedRef, + PlatformApi, } from '@vue-storefront/core'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UsePaymentProvider, UsePaymentProviderErrors } from '../types/composables'; export interface UsePaymentProviderParams extends FactoryParams { diff --git a/packages/composables/src/factories/useRelatedProductsFactory.ts b/packages/composables/src/factories/useRelatedProductsFactory.ts index 80132e72e..54e5bf676 100644 --- a/packages/composables/src/factories/useRelatedProductsFactory.ts +++ b/packages/composables/src/factories/useRelatedProductsFactory.ts @@ -1,13 +1,17 @@ +/** + * @deprecated since version 1.0.0 + */ import { computed, Ref } from '@vue/composition-api'; import { - configureFactoryParams, Context, - CustomQuery, + configureFactoryParams, + Context, FactoryParams, Logger, ProductsSearchParams, sharedRef, + ComposableFunctionArgs, + PlatformApi, } from '@vue-storefront/core'; -import { ComposableFunctionArgs, PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseRelatedProducts, UseRelatedProductsErrors } from '../types/composables'; export interface UseRelatedProductsFactoryParams< diff --git a/packages/composables/src/factories/useReviewFactory.ts b/packages/composables/src/factories/useReviewFactory.ts index ea2d4b5d1..bf4896af5 100644 --- a/packages/composables/src/factories/useReviewFactory.ts +++ b/packages/composables/src/factories/useReviewFactory.ts @@ -1,14 +1,16 @@ +/** + * @deprecated since version 1.0.0 + */ import { Ref, computed } from '@vue/composition-api'; import { ComposableFunctionArgs, configureFactoryParams, Context, - CustomQuery, FactoryParams, Logger, sharedRef, + PlatformApi, } from '@vue-storefront/core'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseReview, UseReviewErrors } from '../types/composables'; export interface UseReviewFactoryParams extends FactoryParams { diff --git a/packages/composables/src/factories/useUpsellProductsFactory.ts b/packages/composables/src/factories/useUpsellProductsFactory.ts index 98f64902c..d73818778 100644 --- a/packages/composables/src/factories/useUpsellProductsFactory.ts +++ b/packages/composables/src/factories/useUpsellProductsFactory.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { computed, Ref } from '@vue/composition-api'; import { configureFactoryParams, @@ -5,9 +8,11 @@ import { Logger, Context, ProductsSearchParams, - sharedRef, UseProductFactoryParams, + sharedRef, + UseProductFactoryParams, + ComposableFunctionArgs, + PlatformApi, } from '@vue-storefront/core'; -import { ComposableFunctionArgs, PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseUpsellProducts, UseUpsellProductsErrors } from '../types/composables'; export interface UseUpsellProductsFactoryParams< diff --git a/packages/composables/src/factories/useUrlResolverFactory.ts b/packages/composables/src/factories/useUrlResolverFactory.ts index aa014c012..853733c6c 100644 --- a/packages/composables/src/factories/useUrlResolverFactory.ts +++ b/packages/composables/src/factories/useUrlResolverFactory.ts @@ -1,12 +1,16 @@ +/** + * @deprecated since version 1.0.0 + */ import { configureFactoryParams, Context, FactoryParams, Logger, sharedRef, + ComposableFunctionArgs, + PlatformApi, } from '@vue-storefront/core'; import { computed } from '@vue/composition-api'; -import { ComposableFunctionArgs, PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseUrlResolver } from '../types/composables'; export interface UseUrlResolverFactoryParams extends FactoryParams { diff --git a/packages/composables/src/factories/useWishlistFactory.ts b/packages/composables/src/factories/useWishlistFactory.ts index 8fe11a60f..2bf155c17 100644 --- a/packages/composables/src/factories/useWishlistFactory.ts +++ b/packages/composables/src/factories/useWishlistFactory.ts @@ -1,7 +1,7 @@ -import { - Ref, - computed, -} from '@vue/composition-api'; +/** + * @deprecated since version 1.0.0 + */ +import { Ref } from '@vue/composition-api'; import { configureFactoryParams, Context, @@ -9,8 +9,9 @@ import { FactoryParams, Logger, sharedRef, + ComposableFunctionArgs, + PlatformApi, } from '@vue-storefront/core'; -import { ComposableFunctionArgs, PlatformApi } from '@vue-storefront/core/lib/src/types'; import { UseWishlist, UseWishlistErrors } from '../types/composables'; export interface UseWishlistFactoryParams boolean; } +/** + * @deprecated since version 1.0.0 + */ export const useWishlistFactory = ( factoryParams: UseWishlistFactoryParams, ) => { diff --git a/packages/composables/src/getVueContext.ts b/packages/composables/src/getVueContext.ts deleted file mode 100644 index b789510be..000000000 --- a/packages/composables/src/getVueContext.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-disable no-param-reassign */ -import { EffectScope } from '@vue/composition-api'; -import { NuxtAppOptions } from '@nuxt/types/app'; -import { getContextProperty } from './helpers/getContextProperty'; - -export const extendScopeContext = (scope: EffectScope, app: NuxtAppOptions) => { - // @ts-ignore - if (scope.vm) { - // @ts-ignore - scope.vm.interceptors = getContextProperty(app, 'interceptors'); - // @ts-ignore - scope.vm.i18n = getContextProperty(app, 'i18n'); - // @ts-ignore - scope.vm.routing = getContextProperty(app, 'routing'); - // @ts-ignore - scope.vm.magento = getContextProperty(app, 'magento'); - } -}; diff --git a/packages/composables/src/getters/_utils.ts b/packages/composables/src/getters/_utils.ts index f7b31bb3c..2ac3c9851 100644 --- a/packages/composables/src/getters/_utils.ts +++ b/packages/composables/src/getters/_utils.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { AgnosticAttribute } from '@vue-storefront/core'; import { Product } from '@vue-storefront/magento-api'; @@ -17,8 +20,11 @@ export const getVariantByAttributes = (products: Product[], attributes: any): Pr return null; } + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument const configurationKeys = Object.keys(attributes); + // @ts-ignore return products[0].configurable_children.find((product) => configurationKeys + // @ts-ignore .every((attrName) => product[attrName] && product[attrName] === attributes[attrName])) || products[0].configurable_children[0]; }; diff --git a/packages/composables/src/getters/addressGetter.ts b/packages/composables/src/getters/addressGetter.ts index a0bd18293..7422ceb51 100644 --- a/packages/composables/src/getters/addressGetter.ts +++ b/packages/composables/src/getters/addressGetter.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Countries, Country } from '@vue-storefront/magento-api'; import { AddressGetter } from '../types'; diff --git a/packages/composables/src/getters/cartGetters.ts b/packages/composables/src/getters/cartGetters.ts index 5432d8b59..7aede9417 100644 --- a/packages/composables/src/getters/cartGetters.ts +++ b/packages/composables/src/getters/cartGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { CartGetters as CartGettersBase, AgnosticPrice, @@ -13,6 +16,7 @@ import { Product, SelectedShippingMethod, ConfigurableCartItem, ProductInterface, } from '@vue-storefront/magento-api'; + import productGetters from './productGetters'; import { AgnosticPaymentMethod } from '../types'; @@ -133,7 +137,7 @@ export const getTotalItems = (cart: Cart): number => { return cart.total_quantity; }; -export const getConfiguredVariant = (product: ConfigurableCartItem): ProductInterface | {} => product?.configured_variant || {}; +export const getConfiguredVariant = (product: ConfigurableCartItem): ProductInterface | null => product?.configured_variant || null; // eslint-disable-next-line import/no-named-as-default-member export const getFormattedPrice = (price: number) => productGetters.getFormattedPrice(price); @@ -145,7 +149,7 @@ export const getCoupons = (cart: Cart): AgnosticCoupon[] => (Array.isArray(cart? code: c.code, } as AgnosticCoupon)) : []); -export const getDiscounts = (cart: Cart): AgnosticDiscount[] => (Array.isArray(cart?.prices.discounts) ? cart.prices.discounts.map((d) => ({ +export const getDiscounts = (cart: Cart): AgnosticDiscount[] => (Array.isArray(cart?.prices?.discounts) ? cart.prices.discounts.map((d) => ({ id: d.label, name: d.label, description: '', @@ -176,6 +180,7 @@ export interface CartGetters extends CartGettersBase { getSelectedShippingMethod(cart: Cart): SelectedShippingMethod | null; productHasSpecialPrice(product: CartItem): boolean; getStockStatus(product: CartItem): string; + getConfiguredVariant(product: ConfigurableCartItem): ProductInterface | null; } const cartGetters: CartGetters = { diff --git a/packages/composables/src/getters/categoryGetters.ts b/packages/composables/src/getters/categoryGetters.ts index 5a90b2c5c..4298c4c6e 100644 --- a/packages/composables/src/getters/categoryGetters.ts +++ b/packages/composables/src/getters/categoryGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { CategoryGetters, AgnosticCategoryTree, AgnosticBreadcrumb } from '@vue-storefront/core'; import { Category } from '@vue-storefront/magento-api'; import { buildCategoryTree } from '../helpers/buildCategoryTree'; diff --git a/packages/composables/src/getters/checkoutGetters.ts b/packages/composables/src/getters/checkoutGetters.ts index bd6ba115f..b3945143c 100644 --- a/packages/composables/src/getters/checkoutGetters.ts +++ b/packages/composables/src/getters/checkoutGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { ShippingMethod } from '@vue-storefront/magento-api'; import productGetters from './productGetters'; diff --git a/packages/composables/src/getters/facetGetters.ts b/packages/composables/src/getters/facetGetters.ts index 95ce57217..59192e0df 100644 --- a/packages/composables/src/getters/facetGetters.ts +++ b/packages/composables/src/getters/facetGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { FacetsGetters, AgnosticCategoryTree, diff --git a/packages/composables/src/getters/forgotPasswordGetters.ts b/packages/composables/src/getters/forgotPasswordGetters.ts index bbf9a2081..60e9376a3 100644 --- a/packages/composables/src/getters/forgotPasswordGetters.ts +++ b/packages/composables/src/getters/forgotPasswordGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { ForgotPasswordGetters } from '@vue-storefront/core'; // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/packages/composables/src/getters/index.ts b/packages/composables/src/getters/index.ts index dc38dba8b..ad8e2e5a1 100644 --- a/packages/composables/src/getters/index.ts +++ b/packages/composables/src/getters/index.ts @@ -1,4 +1,6 @@ -/* istanbul ignore file */ +/** + * @deprecated since version 1.0.0 + */ export { default as addressGetter } from './addressGetter'; export { default as cartGetters } from './cartGetters'; export { default as categoryGetters } from './categoryGetters'; diff --git a/packages/composables/src/getters/orderGetters.ts b/packages/composables/src/getters/orderGetters.ts index c4fe7d502..6512be9ec 100644 --- a/packages/composables/src/getters/orderGetters.ts +++ b/packages/composables/src/getters/orderGetters.ts @@ -1,5 +1,6 @@ -/* istanbul ignore file */ - +/** + * @deprecated since version 1.0.0 + */ import { AgnosticPagination } from '@vue-storefront/core'; export const getDate = (order: any): string => new Date(order?.created_at).toLocaleDateString() || ''; diff --git a/packages/composables/src/getters/productGetters.ts b/packages/composables/src/getters/productGetters.ts index abd2d7af7..630016e1f 100644 --- a/packages/composables/src/getters/productGetters.ts +++ b/packages/composables/src/getters/productGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { AgnosticAttribute, AgnosticBreadcrumb, diff --git a/packages/composables/src/getters/reviewGetters.ts b/packages/composables/src/getters/reviewGetters.ts index ec2cae0f0..2bf2ca85c 100644 --- a/packages/composables/src/getters/reviewGetters.ts +++ b/packages/composables/src/getters/reviewGetters.ts @@ -1,4 +1,6 @@ -/* istanbul ignore file */ +/** + * @deprecated since version 1.0.0 + */ import { ReviewGetters, AgnosticRateCount } from '@vue-storefront/core'; import { ProductReview, diff --git a/packages/composables/src/getters/storeConfigGetters.ts b/packages/composables/src/getters/storeConfigGetters.ts index 4f9a5bdea..85c24792a 100644 --- a/packages/composables/src/getters/storeConfigGetters.ts +++ b/packages/composables/src/getters/storeConfigGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { StoreConfig } from '@vue-storefront/magento-api'; const getCode = (config: StoreConfig) => config.store_code; diff --git a/packages/composables/src/getters/storeGetters.ts b/packages/composables/src/getters/storeGetters.ts index ed5c1f52d..279c3999b 100644 --- a/packages/composables/src/getters/storeGetters.ts +++ b/packages/composables/src/getters/storeGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { AvailableStores, StoreConfig } from '@vue-storefront/magento-api'; // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/packages/composables/src/getters/userAddressesGetters.ts b/packages/composables/src/getters/userAddressesGetters.ts index 3b9ebd1d3..110344e71 100644 --- a/packages/composables/src/getters/userAddressesGetters.ts +++ b/packages/composables/src/getters/userAddressesGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { UserAddressesGetters as BaseGetters } from '../types/getters'; import { transformUserGetter } from '../helpers/userAddressManipulator'; diff --git a/packages/composables/src/getters/userBillingGetters.ts b/packages/composables/src/getters/userBillingGetters.ts index 3ba53e7ec..21bfdbb0c 100644 --- a/packages/composables/src/getters/userBillingGetters.ts +++ b/packages/composables/src/getters/userBillingGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { UserBillingGetters as BaseGetters } from '@vue-storefront/core'; interface UserBillingGetters extends BaseGetters{ diff --git a/packages/composables/src/getters/userGetters.ts b/packages/composables/src/getters/userGetters.ts index 3193fcb7b..2c4c52f96 100644 --- a/packages/composables/src/getters/userGetters.ts +++ b/packages/composables/src/getters/userGetters.ts @@ -1,4 +1,6 @@ -/* istanbul ignore file */ +/** + * @deprecated since version 1.0.0 + */ import { UserGetters as BaseUserGetters } from '@vue-storefront/core'; import { Customer } from '@vue-storefront/magento-api'; diff --git a/packages/composables/src/getters/userShippingGetters.ts b/packages/composables/src/getters/userShippingGetters.ts index 8e6b76cb5..b1c7c3798 100644 --- a/packages/composables/src/getters/userShippingGetters.ts +++ b/packages/composables/src/getters/userShippingGetters.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { Logger, UserShippingGetters } from '@vue-storefront/core'; const userShippingGetters: UserShippingGetters = { diff --git a/packages/composables/src/getters/wishlistGetters.ts b/packages/composables/src/getters/wishlistGetters.ts index a856a1dba..97763ad9a 100644 --- a/packages/composables/src/getters/wishlistGetters.ts +++ b/packages/composables/src/getters/wishlistGetters.ts @@ -1,4 +1,6 @@ -/* istanbul ignore file */ +/** + * @deprecated since version 1.0.0 + */ import { WishlistGetters as BaseWishlistGetters, AgnosticPrice, diff --git a/packages/composables/src/helpers/buildCategoryTree.ts b/packages/composables/src/helpers/buildCategoryTree.ts index cba4842fd..272b5556a 100644 --- a/packages/composables/src/helpers/buildCategoryTree.ts +++ b/packages/composables/src/helpers/buildCategoryTree.ts @@ -1,4 +1,6 @@ -import { Category } from '@vue-storefront/magento-api'; +/** + * @deprecated since version 1.0.0 + */ import { AgnosticCategoryTree } from '@vue-storefront/core'; import { htmlDecode } from './htmlDecoder'; diff --git a/packages/composables/src/helpers/compareWishlist.ts b/packages/composables/src/helpers/compareWishlist.ts index 6d7febe63..fedb79c66 100644 --- a/packages/composables/src/helpers/compareWishlist.ts +++ b/packages/composables/src/helpers/compareWishlist.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ export const compareWishlistProduct = ( productA, productB, diff --git a/packages/composables/src/helpers/findItemOnWishlist.ts b/packages/composables/src/helpers/findItemOnWishlist.ts index 8170d7088..a1b037688 100644 --- a/packages/composables/src/helpers/findItemOnWishlist.ts +++ b/packages/composables/src/helpers/findItemOnWishlist.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { compareWishlistProduct } from './compareWishlist'; export const findItemOnWishlist = (currentWishlist, product) => { diff --git a/packages/composables/src/helpers/getContextProperty.ts b/packages/composables/src/helpers/getContextProperty.ts deleted file mode 100644 index 9a898d2ba..000000000 --- a/packages/composables/src/helpers/getContextProperty.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const getContextProperty = (object: Record, name: string) => ( - object?.[`$${name}`] - || object?.[name]) as RETURN_TYPE; diff --git a/packages/composables/src/helpers/htmlDecoder.ts b/packages/composables/src/helpers/htmlDecoder.ts index 577dec84b..2e23e5247 100644 --- a/packages/composables/src/helpers/htmlDecoder.ts +++ b/packages/composables/src/helpers/htmlDecoder.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ export function htmlDecode(input) { const formatName = () => { try { diff --git a/packages/composables/src/helpers/userAddressManipulator.ts b/packages/composables/src/helpers/userAddressManipulator.ts index ebc2a9669..1219dad16 100644 --- a/packages/composables/src/helpers/userAddressManipulator.ts +++ b/packages/composables/src/helpers/userAddressManipulator.ts @@ -1,3 +1,6 @@ +/** + * @deprecated since version 1.0.0 + */ import { CustomerAddressInput } from '@vue-storefront/magento-api'; export const transformUserCreateAddressInput = (addressInputParams): CustomerAddressInput => { diff --git a/packages/composables/src/helpers/userDataGenerator.ts b/packages/composables/src/helpers/userDataGenerator.ts index 5d9830de1..d9446bd41 100644 --- a/packages/composables/src/helpers/userDataGenerator.ts +++ b/packages/composables/src/helpers/userDataGenerator.ts @@ -1,5 +1,9 @@ import { CustomerUpdateParameters } from '@vue-storefront/magento-api'; +/** + * @deprecated + * @use packages/theme/helpers/customer/userDataGenerator.ts + */ export const generateUserData = (userData): CustomerUpdateParameters => { const baseData = { email: userData.email, diff --git a/packages/composables/src/index.ts b/packages/composables/src/index.ts index 374dd5067..26126739d 100644 --- a/packages/composables/src/index.ts +++ b/packages/composables/src/index.ts @@ -4,7 +4,6 @@ import { track } from '@vue-storefront/core'; track('VSFMagento'); export * from './getters'; -export * from './getVueContext'; export { default as useAddresses } from './composables/useAddresses'; export { default as useBilling } from './composables/useBilling'; @@ -39,3 +38,12 @@ export { default as useUserOrder } from './composables/useUserOrder'; export { default as useUserShipping } from './composables/useUserShipping'; export { default as useWishlist } from './composables/useWishlist'; export * from './dataTypes'; +export * from './types'; +export * from './types/getters'; +export * from './helpers/userAddressManipulator'; +export * from './helpers/htmlDecoder'; +export { + Countries, Discount, + SelectedShippingMethod, ConfigurableCartItem, ProductInterface, ProductReviewRatingMetadata, + ProductReviews, WishlistQuery, +} from '@vue-storefront/magento-api'; diff --git a/packages/composables/src/types/composables.ts b/packages/composables/src/types/composables.ts index 6fe22188b..17e5d2b9d 100644 --- a/packages/composables/src/types/composables.ts +++ b/packages/composables/src/types/composables.ts @@ -3,9 +3,9 @@ import { ComposableFunctionArgs, ComputedProperty, CustomQuery, + PlatformApi, } from '@vue-storefront/core'; import { ComputedRef, Ref } from '@vue/composition-api'; -import { PlatformApi } from '@vue-storefront/core/lib/src/types'; import { FetchPolicy } from './index'; export type CustomQueryParams = { customQuery?: CustomQuery; [k: string]: any }; diff --git a/packages/composables/tsconfig.json b/packages/composables/tsconfig.json index 2ce4272ae..343ba1c69 100644 --- a/packages/composables/tsconfig.json +++ b/packages/composables/tsconfig.json @@ -1,18 +1,20 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src"], - "exclude": ["node_modules", "lib"], + "extends": "../../tsconfig.json", "compilerOptions": { - "lib": ["DOM", "ESNext"], - "resolveJsonModule": true, + "outDir": "./lib", "rootDir": "./src", - "declaration": true, - "declarationDir": "./lib", - "sourceMap": true, - "importHelpers": true, - "allowJs": true, - "allowSyntheticDefaultImports": true, - "declarationMap": true, + "baseUrl": "./", + "lib": [ + "DOM" + ] }, + "include": [ + "src/**/*" + ], + "exclude": [ + "__tests__", + "lib", + "node_modules" + ], "files": ["types/shims-graphql.d.ts"] } diff --git a/packages/theme/.env.example b/packages/theme/.env.example index 5ef8ad12b..49567a852 100644 --- a/packages/theme/.env.example +++ b/packages/theme/.env.example @@ -1,27 +1,29 @@ -STORE_ENV=dev -STORE_URL=http://localhost:3000 -NUXT_APP_ENV=development -NUXT_APP_PORT=3000 -MAGENTO_GRAPHQL=https://{YOUR_SITE_FRONT_URL}/graphql -MAGENTO_EXTERNAL_CHECKOUT=false -MAGENTO_EXTERNAL_CHECKOUT_URL=https://{YOUR_SITE_FRONT_URL} -MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH=/vue/cart/sync -MAGENTO_BASE_URL={YOUR_SITE_FRONT_URL} -IMAGE_PROVIDER={YOUR_IMAGE_PROVIDER} -IMAGE_PROVIDER_BASE_URL={YOUR_IMAGE_PROVIDER_BASE_URL} -MAGENTO_BASE_URL={YOUR_SITE_FRONT_URL} -IMAGE_PROVIDER={YOUR_IMAGE_PROVIDER} -IMAGE_PROVIDER_BASE_URL={YOUR_IMAGE_PROVIDER_BASE_URL} -REDIS__HOST=127.0.0.1 -REDIS__PORT=6379 -REDIS_PASSWORD= -REDIS__KEY_PREFIX= -REDIS__CACHE_INVALIDATE_URL=/cache-invalidate -REDIS__ENABLED=false -RECAPTCHA_ENABLED=true -RECAPTCHA_HIDE_BADGE=false -RECAPTCHA_VERSION=3 -RECAPTCHA_SITE_KEY= -RECAPTCHA_SECRET_KEY= -RECAPTCHA_SIZE=invisible -RECAPTCHA_MIN_SCORE=0.5 +VSF_NUXT_APP_ENV=development +VSF_NUXT_APP_PORT=3000 + +VSF_STORE_URL=http://localhost:3000 + +VSF_MAGENTO_BASE_URL={YOUR_SITE_FRONT_URL} +VSF_MAGENTO_GRAPHQL_URL=https://{YOUR_SITE_FRONT_URL}/graphql + +VSF_MAGENTO_EXTERNAL_CHECKOUT_ENABLED=false +VSF_MAGENTO_EXTERNAL_CHECKOUT_URL=https://{YOUR_SITE_FRONT_URL} +VSF_MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH=/vue/cart/sync + +VSF_IMAGE_PROVIDER=cloudinary +VSF_IMAGE_PROVIDER_BASE_URL=https://res-4.cloudinary.com/{YOUR_ID}/image/upload/ +VSF_IMAGE_PROVIDER_DOMAIN=https://res-4.cloudinary.com + +VSF_REDIS_ENABLED=false +VSF_REDIS_HOST=127.0.0.1 +VSF_REDIS_PORT=6379 +VSF_REDIS_KEY_PREFIX= +VSF_REDIS_CACHE_INVALIDATE_URL=/cache-invalidate + +VSF_RECAPTCHA_ENABLED=false +VSF_RECAPTCHA_SITE_KEY= +VSF_RECAPTCHA_SECRET_KEY= +VSF_RECAPTCHA_HIDE_BADGE= +VSF_RECAPTCHA_SIZE=invisible +VSF_RECAPTCHA_MIN_SCORE=0.5 +VSF_RECAPTCHA_VERSION=3 diff --git a/packages/theme/.gitignore b/packages/theme/.gitignore index 0751876ef..a9a70a5cb 100644 --- a/packages/theme/.gitignore +++ b/packages/theme/.gitignore @@ -93,6 +93,5 @@ sw.* *.swp version -.env -!config/example.json -config/*.json +.env.* +!.env.example diff --git a/packages/theme/.lintstagedrc b/packages/theme/.lintstagedrc deleted file mode 100644 index ceb502920..000000000 --- a/packages/theme/.lintstagedrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "*.{js,jsx}": [ - "eslint --fix" - ], - "*.{ts,tsx}": [ - "eslint --fix" - ], - "*.{vue}": [ - "eslint --fix" - ], -} diff --git a/packages/theme/components/AppFooter.vue b/packages/theme/components/AppFooter.vue index 159499209..1a0b3043b 100644 --- a/packages/theme/components/AppFooter.vue +++ b/packages/theme/components/AppFooter.vue @@ -72,7 +72,7 @@ import { SfFooter, SfList, SfImage, SfMenuItem, } from '@storefront-ui/vue'; -import { addBasePath } from '@vue-storefront/core'; +import { addBasePath } from '~/helpers/addBasePath'; export default { components: { diff --git a/packages/theme/components/AppHeader.vue b/packages/theme/components/AppHeader.vue index caf482052..0c279e337 100644 --- a/packages/theme/components/AppHeader.vue +++ b/packages/theme/components/AppHeader.vue @@ -2,23 +2,14 @@
-