├── .husky
├── .gitignore
├── commit-msg
├── prepare-commit-msg
└── pre-commit
├── packages
├── theme
│ ├── lang
│ │ ├── .gitkeep
│ │ ├── en.js
│ │ └── de.js
│ ├── jest.config.js
│ ├── .eslintignore
│ ├── static
│ │ ├── icon.png
│ │ ├── favicon.ico
│ │ ├── homepage
│ │ │ ├── apple.png
│ │ │ ├── bannerA.webp
│ │ │ ├── bannerB.webp
│ │ │ ├── bannerC.webp
│ │ │ ├── bannerD.png
│ │ │ ├── bannerE.webp
│ │ │ ├── bannerF.webp
│ │ │ ├── bannerG.webp
│ │ │ ├── bannerH.webp
│ │ │ ├── google.png
│ │ │ ├── imageAd.webp
│ │ │ ├── imageAm.webp
│ │ │ ├── imageBd.webp
│ │ │ ├── imageBm.webp
│ │ │ ├── imageCd.webp
│ │ │ ├── imageCm.webp
│ │ │ ├── imageDd.webp
│ │ │ ├── imageDm.webp
│ │ │ ├── productA.webp
│ │ │ ├── productB.webp
│ │ │ ├── productC.webp
│ │ │ └── newsletter.webp
│ │ ├── icons
│ │ │ ├── langs
│ │ │ │ ├── de.webp
│ │ │ │ └── en.webp
│ │ │ ├── facebook.svg
│ │ │ ├── logo.svg
│ │ │ └── youtube.svg
│ │ ├── thankyou
│ │ │ ├── bannerD.png
│ │ │ └── bannerM.png
│ │ ├── productpage
│ │ │ ├── productA.jpg
│ │ │ ├── productB.jpg
│ │ │ └── productM.jpg
│ │ └── error
│ │ │ └── error.svg
│ ├── .lintstagedrc
│ ├── tests
│ │ └── e2e
│ │ │ ├── pages
│ │ │ ├── components
│ │ │ │ ├── cart-sidebar.ts
│ │ │ │ └── header.ts
│ │ │ ├── utils
│ │ │ │ └── element.ts
│ │ │ ├── category.ts
│ │ │ ├── product.ts
│ │ │ ├── home.ts
│ │ │ ├── base.ts
│ │ │ ├── factory.ts
│ │ │ └── checkout.ts
│ │ │ ├── types
│ │ │ ├── address.ts
│ │ │ └── customer.ts
│ │ │ ├── support
│ │ │ ├── index.d.ts
│ │ │ ├── commands.js
│ │ │ └── index.js
│ │ │ ├── fixtures
│ │ │ └── test-data
│ │ │ │ └── e2e-place-order.json
│ │ │ ├── cypress.json
│ │ │ ├── plugins
│ │ │ └── index.js
│ │ │ └── integration
│ │ │ └── e2e-place-order.spec.ts
│ ├── middleware.config.js
│ ├── app
│ │ └── router.scrollBehavior.js
│ ├── .editorconfig
│ ├── themeConfig.js
│ ├── tsconfig.json
│ ├── package.json
│ ├── .gitignore
│ ├── README.md
│ └── nuxt.config.js
├── api-client
│ ├── src
│ │ ├── index.ts
│ │ ├── index.server.ts
│ │ └── types.ts
│ ├── .eslintignore
│ ├── .gitignore
│ ├── jest.config.js
│ ├── babel.config.js
│ ├── .lintstagedrc
│ ├── tsconfig.json
│ ├── api-extractor.json
│ ├── package.json
│ └── README.md
└── composables
│ ├── .eslintignore
│ ├── src
│ ├── useContent
│ │ └── index.ts
│ ├── getters
│ │ ├── categoryGetters.ts
│ │ ├── forgotPasswordGetters.ts
│ │ ├── storeGetters.ts
│ │ ├── userGetters.ts
│ │ ├── reviewGetters.ts
│ │ ├── orderGetters.ts
│ │ ├── wishlistGetters.ts
│ │ ├── facetGetters.ts
│ │ ├── cartGetters.ts
│ │ ├── userBillingGetters.ts
│ │ ├── userShippingGetters.ts
│ │ └── productGetters.ts
│ ├── useFacet
│ │ └── index.ts
│ ├── useMakeOrder
│ │ └── index.ts
│ ├── useStore
│ │ └── index.ts
│ ├── useUserOrder
│ │ └── index.ts
│ ├── useProduct
│ │ └── index.ts
│ ├── types.ts
│ ├── useForgotPassword
│ │ └── index.ts
│ ├── useShippingProvider
│ │ └── index.ts
│ ├── useBilling
│ │ └── index.ts
│ ├── useShipping
│ │ └── index.ts
│ ├── useReview
│ │ └── index.ts
│ ├── useCategory
│ │ └── index.ts
│ ├── useWishlist
│ │ └── index.ts
│ ├── useUserBilling
│ │ └── index.ts
│ ├── useUserShipping
│ │ └── index.ts
│ ├── index.ts
│ ├── useUser
│ │ └── index.ts
│ └── useCart
│ │ └── index.ts
│ ├── jest.config.js
│ ├── nuxt
│ ├── README.MD
│ ├── index.js
│ └── plugin.js
│ ├── babel.config.js
│ ├── .lintstagedrc
│ ├── api-extractor.json
│ ├── tsconfig.json
│ ├── package.json
│ └── README.md
├── docs
├── guide
│ ├── configuration.md
│ ├── about.md
│ └── getting-started.md
├── .vuepress
│ ├── public
│ │ └── favicon.png
│ ├── styles
│ │ ├── index.styl
│ │ └── palette.styl
│ ├── enhanceApp.js
│ └── config.js
├── index.md
└── package.json
├── .gitattributes
├── .ncurc.json
├── commitlint.config.js
├── lerna.json
├── .prettierrc
├── .czrc
├── .eslintignore
├── .github
├── ISSUE_TEMPLATE
│ ├── config.yml
│ ├── 4.question.yml
│ ├── 2.documentation-issue.yml
│ ├── 3.feature-request.yml
│ └── 1.bug-report.yml
├── workflows
│ ├── assing-pr-to-author.yml
│ ├── conventional-pr-name.yml
│ ├── publish.yml
│ ├── test.yml
│ └── docs-deployment.yaml
├── CONTRIBUTING.md
└── PULL_REQUEST_TEMPLATE.md
├── .vuestorefrontcloud
└── docker
│ └── docs
│ ├── build-docker.sh
│ └── Dockerfile
├── .all-contributorsrc
├── scripts
├── publishComposable.js
├── publishApi.js
├── build.js
└── lib
│ └── publishNpm.js
├── jest.base.config.js
├── .gitignore
├── LICENSE
├── api-extractor.base.json
├── CONTRIBUTING.md
├── package.json
├── README.md
├── .eslintrc.json
├── CODE_OF_CONDUCT.md
└── tsconfig.json
/.husky/.gitignore:
--------------------------------------------------------------------------------
1 | _
2 |
--------------------------------------------------------------------------------
/packages/theme/lang/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/guide/configuration.md:
--------------------------------------------------------------------------------
1 | # Configuration
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js text eol=lf
2 | *.ts text eol=lf
--------------------------------------------------------------------------------
/packages/api-client/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './types';
2 |
--------------------------------------------------------------------------------
/packages/api-client/.eslintignore:
--------------------------------------------------------------------------------
1 | lib
2 | node_modules
3 | server
--------------------------------------------------------------------------------
/.ncurc.json:
--------------------------------------------------------------------------------
1 | {
2 | "reject": [
3 | "typescript"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/composables/.eslintignore:
--------------------------------------------------------------------------------
1 | lib
2 | node_modules
3 | nuxt/plugin.js
--------------------------------------------------------------------------------
/packages/api-client/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | coverage
3 | lib
4 | server
5 |
--------------------------------------------------------------------------------
/packages/composables/src/useContent/index.ts:
--------------------------------------------------------------------------------
1 | export function useContent(): any {}
2 |
--------------------------------------------------------------------------------
/commitlint.config.js:
--------------------------------------------------------------------------------
1 | module.exports = { extends: ['@commitlint/config-conventional'] };
2 |
--------------------------------------------------------------------------------
/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | npx commitlint --edit
5 |
--------------------------------------------------------------------------------
/packages/theme/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | modulePathIgnorePatterns: ['tests/e2e/']
3 | };
4 |
--------------------------------------------------------------------------------
/lerna.json:
--------------------------------------------------------------------------------
1 | {
2 | "useWorkspaces": true,
3 | "npmClient": "yarn",
4 | "version": "independent"
5 | }
6 |
--------------------------------------------------------------------------------
/packages/theme/.eslintignore:
--------------------------------------------------------------------------------
1 | _theme
2 | .nuxt
3 | node_modules
4 | middleware.config.js
5 | nuxt.config.js
6 |
--------------------------------------------------------------------------------
/.husky/prepare-commit-msg:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | exec < /dev/tty && git cz --hook || true
5 |
--------------------------------------------------------------------------------
/packages/api-client/jest.config.js:
--------------------------------------------------------------------------------
1 | const baseConfig = require('./../../jest.base.config');
2 |
3 | module.exports = baseConfig;
4 |
--------------------------------------------------------------------------------
/packages/composables/jest.config.js:
--------------------------------------------------------------------------------
1 | const baseConfig = require('./../../jest.base.config');
2 |
3 | module.exports = baseConfig;
4 |
--------------------------------------------------------------------------------
/packages/theme/static/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/icon.png
--------------------------------------------------------------------------------
/docs/.vuepress/public/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/docs/.vuepress/public/favicon.png
--------------------------------------------------------------------------------
/packages/composables/nuxt/README.MD:
--------------------------------------------------------------------------------
1 | # Example config
2 | ```js
3 | export const config = {
4 | // Put expected config example here
5 | };
6 | ```
--------------------------------------------------------------------------------
/packages/theme/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/favicon.ico
--------------------------------------------------------------------------------
/packages/theme/static/homepage/apple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/apple.png
--------------------------------------------------------------------------------
/packages/theme/static/homepage/bannerA.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/bannerA.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/bannerB.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/bannerB.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/bannerC.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/bannerC.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/bannerD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/bannerD.png
--------------------------------------------------------------------------------
/packages/theme/static/homepage/bannerE.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/bannerE.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/bannerF.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/bannerF.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/bannerG.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/bannerG.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/bannerH.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/bannerH.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/google.png
--------------------------------------------------------------------------------
/packages/theme/static/homepage/imageAd.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/imageAd.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/imageAm.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/imageAm.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/imageBd.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/imageBd.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/imageBm.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/imageBm.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/imageCd.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/imageCd.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/imageCm.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/imageCm.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/imageDd.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/imageDd.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/imageDm.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/imageDm.webp
--------------------------------------------------------------------------------
/packages/theme/static/icons/langs/de.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/icons/langs/de.webp
--------------------------------------------------------------------------------
/packages/theme/static/icons/langs/en.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/icons/langs/en.webp
--------------------------------------------------------------------------------
/packages/theme/static/thankyou/bannerD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/thankyou/bannerD.png
--------------------------------------------------------------------------------
/packages/theme/static/thankyou/bannerM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/thankyou/bannerM.png
--------------------------------------------------------------------------------
/packages/theme/static/homepage/productA.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/productA.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/productB.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/productB.webp
--------------------------------------------------------------------------------
/packages/theme/static/homepage/productC.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/productC.webp
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "endOfLine": "lf",
3 | "semi": true,
4 | "singleQuote": true,
5 | "arrowParens": "always",
6 | "tabWidth": 2,
7 | "bracketSpacing": true
8 | }
9 |
--------------------------------------------------------------------------------
/packages/theme/static/homepage/newsletter.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/homepage/newsletter.webp
--------------------------------------------------------------------------------
/packages/theme/static/productpage/productA.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/productpage/productA.jpg
--------------------------------------------------------------------------------
/packages/theme/static/productpage/productB.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/productpage/productB.jpg
--------------------------------------------------------------------------------
/packages/theme/static/productpage/productM.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spider-yamet/ecommerce-integration-boilerplate/HEAD/packages/theme/static/productpage/productM.jpg
--------------------------------------------------------------------------------
/.czrc:
--------------------------------------------------------------------------------
1 | {
2 | "path": "cz-conventional-changelog",
3 | "disableScopeLowerCase": false,
4 | "disableSubjectLowerCase": false,
5 | "maxHeaderWidth": 100,
6 | "maxLineWidth": 100
7 | }
8 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | # add "--parallel" once this bug is fixed https://github.com/okonet/lint-staged/issues/988
5 | npx lerna run precommit
6 |
--------------------------------------------------------------------------------
/docs/.vuepress/styles/index.styl:
--------------------------------------------------------------------------------
1 | /**
2 | * Custom Styles here.
3 | *
4 | * ref:https://v1.vuepress.vuejs.org/config/#index-styl
5 | */
6 |
7 | .home .hero img
8 | max-width 450px!important
9 |
--------------------------------------------------------------------------------
/packages/api-client/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | ['@babel/preset-env', {
4 | targets: {
5 | node: 'current'
6 | }
7 | }]
8 | ]
9 | };
10 |
--------------------------------------------------------------------------------
/packages/composables/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | ['@babel/preset-env', {
4 | targets: {
5 | node: 'current'
6 | }
7 | }]
8 | ]
9 | };
10 |
--------------------------------------------------------------------------------
/packages/theme/.lintstagedrc:
--------------------------------------------------------------------------------
1 | {
2 | "*.{js,jsx}": [
3 | "eslint --fix"
4 | ],
5 | "*.{ts,tsx}": [
6 | "eslint --fix"
7 | ],
8 | "*.vue": [
9 | "eslint --fix"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/packages/api-client/.lintstagedrc:
--------------------------------------------------------------------------------
1 | {
2 | "*.{js,jsx}": [
3 | "eslint --fix"
4 | ],
5 | "*.{ts,tsx}": [
6 | "eslint --fix"
7 | ],
8 | "*.vue": [
9 | "eslint --fix"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/packages/composables/.lintstagedrc:
--------------------------------------------------------------------------------
1 | {
2 | "*.{js,jsx}": [
3 | "eslint --fix"
4 | ],
5 | "*.{ts,tsx}": [
6 | "eslint --fix"
7 | ],
8 | "*.vue": [
9 | "eslint --fix"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/pages/components/cart-sidebar.ts:
--------------------------------------------------------------------------------
1 | class Cart {
2 | get goToCheckoutButton(): Cypress.Chainable {
3 | return cy.contains('Go to checkout');
4 | }
5 | }
6 |
7 | export default new Cart();
8 |
--------------------------------------------------------------------------------
/packages/theme/middleware.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | integrations: {
3 | __replace_me__: {
4 | location: '@vue-storefront/__replace_me__-api/server',
5 | configuration: {}
6 | }
7 | }
8 | };
9 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/pages/utils/element.ts:
--------------------------------------------------------------------------------
1 | export function el(selector: string, children?: string) {
2 | return children ? cy.get(`[data-e2e="${selector}"] ${children}`) : cy.get(`[data-e2e="${selector}"]`);
3 | }
4 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | **/node_modules/**/*
2 | **/lib/*
3 | **/tests/*
4 | packages/composables/nuxt/plugin.js
5 | packages/theme/_theme
6 | packages/theme/.nuxt
7 | packages/theme/middleware.config.js
8 | packages/theme/nuxt.config.js
9 |
--------------------------------------------------------------------------------
/packages/theme/app/router.scrollBehavior.js:
--------------------------------------------------------------------------------
1 | export default function scrollBehavior(_to, _from, savedPosition) {
2 | if (savedPosition) {
3 | return savedPosition;
4 | } else {
5 | return { x: 0, y: 0 };
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Discord Chat
4 | url: https://discord.vuestorefront.io/
5 | about: Ask questions and discuss with other Vue Storefront users in real time.
6 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/types/address.ts:
--------------------------------------------------------------------------------
1 | export type Address = {
2 | streetName: string;
3 | apartment: string;
4 | city: string;
5 | state: string;
6 | country: string;
7 | zipcode: string;
8 | phone: string;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/composables/nuxt/index.js:
--------------------------------------------------------------------------------
1 | import path from 'path';
2 |
3 | export default function integrationModule(moduleOptions) {
4 | this.addPlugin({
5 | src: path.resolve(__dirname, './plugin.js'),
6 | options: moduleOptions
7 | });
8 | }
9 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/types/customer.ts:
--------------------------------------------------------------------------------
1 | import { Address } from './address';
2 |
3 | export type Customer = {
4 | firstName?: string;
5 | lastName?: string;
6 | address?: {
7 | shipping: Address,
8 | billing: Address
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/pages/category.ts:
--------------------------------------------------------------------------------
1 | import { el } from './utils/element';
2 |
3 | class Category {
4 | get products(): Cypress.Chainable {
5 | return el('category-product-card', 'a');
6 | }
7 | }
8 |
9 | export default new Category();
10 |
--------------------------------------------------------------------------------
/docs/.vuepress/styles/palette.styl:
--------------------------------------------------------------------------------
1 | /**
2 | * Custom palette here.
3 | *
4 | * ref:https://v1.vuepress.vuejs.org/zh/config/#palette-styl
5 | */
6 |
7 | $accentColor = #3eaf7c
8 | $textColor = #2c3e50
9 | $borderColor = #eaecef
10 | $codeBgColor = #282c34
11 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/support/index.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable spaced-comment */
2 | ///
3 | ///
4 |
5 | declare namespace Cypress {
6 | interface Chainable {
7 | fixtures?: any;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/theme/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/pages/product.ts:
--------------------------------------------------------------------------------
1 | import Base from './base';
2 | import { el } from './utils/element';
3 |
4 | class Product extends Base {
5 | get addToCartButton(): Cypress.Chainable {
6 | return el('product_add-to-cart');
7 | }
8 | }
9 |
10 | export default new Product();
11 |
--------------------------------------------------------------------------------
/.vuestorefrontcloud/docker/docs/build-docker.sh:
--------------------------------------------------------------------------------
1 | TAG=`git rev-parse HEAD`
2 | docker build --progress plain -t registry.storefrontcloud.io/docs-storefrontcloud-io/v2-__replace_me__:${TAG:0:8} -f Dockerfile ../../../
3 | # docker push registry.storefrontcloud.io/docs-storefrontcloud-io/v2-__replace_me__:${TAG:0:8}
4 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/pages/home.ts:
--------------------------------------------------------------------------------
1 | import Base from './base';
2 | import Header from './components/header';
3 |
4 | class Home extends Base {
5 | get header() {
6 | return Header;
7 | }
8 |
9 | visit(): Cypress.Chainable {
10 | return cy.visit('/');
11 | }
12 | }
13 |
14 | export default new Home();
15 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/pages/base.ts:
--------------------------------------------------------------------------------
1 | import Header from './components/header';
2 |
3 | export default class Base {
4 | get path(): string {
5 | return '/';
6 | }
7 |
8 | get header() {
9 | return Header;
10 | }
11 |
12 | visit(): Cypress.Chainable {
13 | return cy.visit(this.path);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/composables/nuxt/plugin.js:
--------------------------------------------------------------------------------
1 | import { integrationPlugin } from '@vue-storefront/core';
2 |
3 | const moduleOptions = <%= serialize(options) %>;
4 |
5 | export default integrationPlugin(({ integration }) => {
6 | integration.configure('__replace_me__', {
7 | ...moduleOptions
8 | // other options
9 | });
10 | });
11 |
--------------------------------------------------------------------------------
/packages/api-client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./lib",
5 | "rootDir": "./src",
6 | "baseUrl": "./",
7 | "lib": []
8 | },
9 | "include": [
10 | "src/**/*"
11 | ],
12 | "exclude": [
13 | "__tests__",
14 | "lib",
15 | "node_modules"
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/.all-contributorsrc:
--------------------------------------------------------------------------------
1 | {
2 | "projectName": "__replace_me__",
3 | "projectOwner": "vuestorefront",
4 | "repoType": "github",
5 | "repoHost": "https://github.com",
6 | "files": [
7 | "README.md"
8 | ],
9 | "imageSize": 80,
10 | "commit": false,
11 | "commitConvention": "angular",
12 | "contributors": [],
13 | "contributorsPerLine": 5
14 | }
15 |
--------------------------------------------------------------------------------
/packages/api-client/api-extractor.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../api-extractor.base.json",
3 | "mainEntryPointFilePath": "./lib/index.d.ts",
4 | "dtsRollup": {
5 | "untrimmedFilePath": "./lib/.d.ts"
6 | },
7 | "docModel": {
8 | "apiJsonFilePath": "/docs/api-client/.api.json"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/docs/guide/about.md:
--------------------------------------------------------------------------------
1 | # About
2 |
3 | ## Resources
4 |
5 | - [Vue Storefront Documentation](https://docs.vuestorefront.io/v2/)
6 | - [Community Chat](https://discord.vuestorefront.io)
7 |
8 | ## Support
9 |
10 | If you have any questions about this integration we will be happy to answer them on `__replace_me__` channel on [our Discord](discord.vuestorefront.io).
11 |
--------------------------------------------------------------------------------
/packages/composables/api-extractor.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../api-extractor.base.json",
3 | "mainEntryPointFilePath": "./lib/index.d.ts",
4 | "dtsRollup": {
5 | "untrimmedFilePath": "./lib/.d.ts"
6 | },
7 | "docModel": {
8 | "apiJsonFilePath": "/docs/composables/.api.json"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/scripts/publishComposable.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable unicorn/prefer-module */
2 | const path = require('path');
3 | const { publishPackages } = require('./lib/publishNpm');
4 |
5 | const myArgs = process.argv.slice(2);
6 | const labels = myArgs[0];
7 |
8 | publishPackages(path.join(process.cwd(), 'packages', 'composables'), labels)
9 | .then(console.log)
10 | .catch((e) => {
11 | console.error(e);
12 | });
13 |
--------------------------------------------------------------------------------
/packages/composables/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./lib",
5 | "resolveJsonModule": true,
6 | "rootDir": "./src",
7 | "baseUrl": "./",
8 | "lib": [
9 | "DOM"
10 | ]
11 | },
12 | "include": [
13 | "src/**/*"
14 | ],
15 | "exclude": [
16 | "__tests__",
17 | "lib",
18 | "node_modules"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/scripts/publishApi.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable unicorn/no-process-exit, unicorn/prefer-module */
2 | const path = require('path');
3 | const { publishPackages } = require('./lib/publishNpm');
4 |
5 | const myArgs = process.argv.slice(2);
6 | const labels = myArgs[0];
7 |
8 | publishPackages(path.join(process.cwd(), 'packages', 'api-client'), labels)
9 | .then(console.log)
10 | .catch((e) => {
11 | console.error(e);
12 | });
13 |
--------------------------------------------------------------------------------
/docs/guide/getting-started.md:
--------------------------------------------------------------------------------
1 | # Getting Started
2 |
3 | ## How to start if you want to try out the integration
4 |
5 | ```
6 | yarn global add @vue-storefront/cli
7 | ```
8 | ```
9 | vsf init && cd && yarn && yarn dev
10 | ```
11 |
12 | ## How to start if you want to contribute?
13 |
14 | Want to contribute? Ping us on `__replace_me__` channel on [our Discord](https://discord.vuestorefront.io)!
15 |
16 |
--------------------------------------------------------------------------------
/jest.base.config.js:
--------------------------------------------------------------------------------
1 | // For a detailed explanation regarding each configuration property, visit:
2 | // https://jestjs.io/docs/en/configuration.html
3 |
4 | module.exports = {
5 | transform: {
6 | '^.+\\.(m)js$': 'babel-jest',
7 | '^.+\\.ts$': 'ts-jest'
8 | },
9 | coverageDirectory: './coverage/',
10 | collectCoverageFrom: [
11 | 'src/**/*.ts'
12 | ],
13 | testMatch: ['/**/__tests__/**/*spec.[jt]s?(x)']
14 | };
15 |
--------------------------------------------------------------------------------
/docs/.vuepress/enhanceApp.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Client app enhancement file.
3 | *
4 | * https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements
5 | */
6 |
7 | export default ({
8 | Vue, // the version of Vue being used in the VuePress app
9 | options, // the options for the root Vue instance
10 | router, // the router instance for the app
11 | siteData // site metadata
12 | }) => {
13 | // ...apply enhancements for the site.
14 | }
15 |
--------------------------------------------------------------------------------
/packages/api-client/src/index.server.ts:
--------------------------------------------------------------------------------
1 | import { apiClientFactory } from '@vue-storefront/core';
2 | import type { Setttings, Endpoints } from './types';
3 |
4 | function onCreate(settings: Setttings) {
5 | return {
6 | config: settings,
7 | client: {}
8 | };
9 | }
10 |
11 | const { createApiClient } = apiClientFactory({
12 | onCreate,
13 | api: {
14 |
15 | }
16 | });
17 |
18 | export {
19 | createApiClient
20 | };
21 |
--------------------------------------------------------------------------------
/.github/workflows/assing-pr-to-author.yml:
--------------------------------------------------------------------------------
1 | name: PR to Author
2 | on:
3 | pull_request:
4 | types: [opened, ready_for_review, edited, synchronize]
5 |
6 | jobs:
7 | assignAuthor:
8 | name: Assing
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: samspills/assign-pr-to-author@v1.0
12 | if: github.event_name == 'pull_request' && github.event.action == 'opened'
13 | with:
14 | repo-token: '${{ secrets.GITHUB_TOKEN }}'
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Dependency directories
2 | node_modules
3 |
4 | # Logs
5 | npm-debug.log*
6 | yarn-debug.log*
7 | yarn-error.log*
8 | lerna-debug.log*
9 |
10 | # NPM config
11 | .npmrc
12 |
13 | # Yarn Integrity file
14 | .yarn-integrity
15 |
16 | # Rollup generate output
17 | lib
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # Editor directories and files
23 | .idea
24 | .vscode
25 |
26 | # OS generated files
27 | .DS_STORE
28 |
29 | !scripts/lib
30 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Vue Storefront 2 integration with __replace_me__
4 |
5 | This project is a __replace_me__ integration for Vue Storefront 2.
6 |
7 | This integration is currently a **Beta** and not ready for production usage. You can help us to make the integration production-ready faster by reporting bugs and contributing to the code at the [repository issues page](https://github.com/vuestorefront/__replace_me__/issues).
8 |
--------------------------------------------------------------------------------
/packages/theme/themeConfig.js:
--------------------------------------------------------------------------------
1 | export default {
2 | home: {
3 | bannerA: {
4 | link: '/',
5 | image: {
6 | mobile: '/homepage/bannerB.webp',
7 | desktop: '/homepage/bannerF.webp'
8 | }
9 | },
10 | bannerB: {
11 | link: '/',
12 | image: '/homepage/bannerE.webp'
13 | },
14 | bannerC: {
15 | link: '/',
16 | image: '/homepage/bannerC.webp'
17 | },
18 | bannerD: {
19 | link: '/',
20 | image: '/homepage/bannerG.webp'
21 | }
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/categoryGetters.ts:
--------------------------------------------------------------------------------
1 | import { CategoryGetters, AgnosticCategoryTree } from '@vue-storefront/core';
2 | import type { Category } from '@vue-storefront/__replace_me__-api';
3 |
4 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
5 | function getTree(category: Category): AgnosticCategoryTree {
6 | return {
7 | label: '',
8 | slug: '',
9 | items: [],
10 | isCurrent: false
11 | };
12 | }
13 |
14 | export const categoryGetters: CategoryGetters = {
15 | getTree
16 | };
17 |
--------------------------------------------------------------------------------
/packages/composables/src/useFacet/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useFacetFactory,
4 | FacetSearchResult
5 | } from '@vue-storefront/core';
6 | import type {
7 | UseFacetSearchParams as SearchParams
8 | } from '../types';
9 |
10 | const factoryParams = {
11 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
12 | search: async (context: Context, params: FacetSearchResult) => {
13 | console.log('Mocked: useFacet.search');
14 | return {};
15 | }
16 | };
17 |
18 | export const useFacet = useFacetFactory(factoryParams);
19 |
--------------------------------------------------------------------------------
/packages/composables/src/useMakeOrder/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useMakeOrderFactory,
4 | UseMakeOrderFactoryParams
5 | } from '@vue-storefront/core';
6 | import type { Order } from '@vue-storefront/__replace_me__-api';
7 |
8 | const factoryParams: UseMakeOrderFactoryParams = {
9 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
10 | make: async (context: Context, { customQuery }) => {
11 | console.log('Mocked: useMakeOrder.make');
12 | return {};
13 | }
14 | };
15 |
16 | export const useMakeOrder = useMakeOrderFactory(factoryParams);
17 |
--------------------------------------------------------------------------------
/.vuestorefrontcloud/docker/docs/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:14 AS build
2 |
3 | WORKDIR /var/www
4 |
5 | COPY . .
6 |
7 | RUN yarn install --network-concurrency 1
8 | RUN cd packages/api-client && yarn build && yarn cache clean --all
9 | RUN cd packages/composables && yarn build && yarn cache clean --all
10 |
11 | RUN cd docs \
12 | && npm install \
13 | && sed -i "s/base: '\/',/base: '\/__replace_me__\/',/g" ./.vuepress/config.js \
14 | && cat ./.vuepress/config.js \
15 | && npm run build
16 |
17 | FROM nginx
18 |
19 | COPY --from=build /var/www/docs/.vuepress/dist /usr/share/nginx/html/__replace_me__
20 |
--------------------------------------------------------------------------------
/packages/composables/src/useStore/index.ts:
--------------------------------------------------------------------------------
1 | import { Store } from '@vue-storefront/__replace_me__-api';
2 | import { Context, useStoreFactory } from '@vue-storefront/core';
3 |
4 | export const useStore = useStoreFactory({
5 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
6 | load(context: Context, params) {
7 | console.log('Mocked: useStore.load');
8 |
9 | return Promise.resolve({});
10 | },
11 |
12 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
13 | change(context: Context, params) {
14 | console.log('Mocked: useStore.change');
15 |
16 | return Promise.resolve({});
17 | }
18 | });
19 |
--------------------------------------------------------------------------------
/.github/workflows/conventional-pr-name.yml:
--------------------------------------------------------------------------------
1 | name: Commitlint PR Title
2 |
3 | on:
4 | pull_request:
5 | types: ['opened', 'edited', 'reopened', 'synchronize']
6 |
7 | jobs:
8 | lint:
9 | name: Validate PR Title (conventional-commit)
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: Checkout code
13 | uses: actions/checkout@v2
14 |
15 | - name: Setup node
16 | uses: actions/setup-node@v2
17 | with:
18 | node-version: '14'
19 | cache: 'yarn'
20 |
21 | - name: Install dependencies
22 | run: yarn install --frozen-lockfile
23 |
24 | - uses: JulienKode/pull-request-name-linter-action@v0.1.2
25 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/forgotPasswordGetters.ts:
--------------------------------------------------------------------------------
1 | import { ForgotPasswordGetters } from '@vue-storefront/core';
2 | import type { PasswordResetResult } from '@vue-storefront/__replace_me__-api';
3 |
4 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
5 | function getResetPasswordToken(result: PasswordResetResult): string {
6 | return '';
7 | }
8 |
9 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
10 | function isPasswordChanged(result: PasswordResetResult): boolean {
11 | return true;
12 | }
13 |
14 | export const forgotPasswordGetters: ForgotPasswordGetters = {
15 | getResetPasswordToken,
16 | isPasswordChanged
17 | };
18 |
--------------------------------------------------------------------------------
/packages/composables/src/useUserOrder/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useUserOrderFactory,
4 | UseUserOrderFactoryParams
5 | } from '@vue-storefront/core';
6 | import type { Order } from '@vue-storefront/__replace_me__-api';
7 | import type {
8 | useUserOrderSearchParams as SearchParams
9 | } from '../types';
10 |
11 | const params: UseUserOrderFactoryParams = {
12 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
13 | searchOrders: async (context: Context, params) => {
14 | console.log('Mocked: searchOrders');
15 | return {};
16 | }
17 | };
18 |
19 | export const useUserOrder = useUserOrderFactory(params);
20 |
--------------------------------------------------------------------------------
/packages/composables/src/useProduct/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useProductFactory,
4 | UseProductFactoryParams
5 | } from '@vue-storefront/core';
6 | import type { Product } from '@vue-storefront/__replace_me__-api';
7 | import type {
8 | UseProductSearchParams as SearchParams
9 | } from '../types';
10 |
11 | const params: UseProductFactoryParams = {
12 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
13 | productsSearch: async (context: Context, params) => {
14 | console.log('Mocked: useProduct.productsSearch');
15 |
16 | return {};
17 | }
18 | };
19 |
20 | export const useProduct = useProductFactory(params);
21 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/storeGetters.ts:
--------------------------------------------------------------------------------
1 | import { Store } from '@vue-storefront/__replace_me__-api';
2 | import { AgnosticStore, UseStoreGetters } from '@vue-storefront/core';
3 | import { UseStoreFilterParams } from '../types';
4 |
5 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
6 | function getItems(stores: Store, criteria: UseStoreFilterParams = {}): AgnosticStore[] {
7 | return [];
8 | }
9 |
10 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
11 | function getSelected(stores: Store): AgnosticStore | undefined {
12 | return null;
13 | }
14 |
15 | export const storeGetters: UseStoreGetters = {
16 | getItems,
17 | getSelected
18 | };
19 |
--------------------------------------------------------------------------------
/packages/composables/src/types.ts:
--------------------------------------------------------------------------------
1 | import {
2 | ProductsSearchParams
3 | } from '@vue-storefront/core';
4 |
5 | export type TODO = any;
6 |
7 | export type UseBillingAddParams = TODO;
8 |
9 | export type UseCategorySearchParams = TODO;
10 |
11 | export type UseFacetSearchParams = TODO;
12 |
13 | export type UseProductSearchParams = ProductsSearchParams;
14 |
15 | export type UseReviewSearchParams = TODO;
16 |
17 | export type UseReviewAddParams = TODO;
18 |
19 | export type UseShippingAddParams = TODO;
20 |
21 | export type UseStoreFilterParams = TODO;
22 |
23 | export type UseUserUpdateParams = TODO;
24 |
25 | export type UseUserRegisterParams = TODO;
26 |
27 | export type useUserOrderSearchParams = TODO;
28 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/pages/factory.ts:
--------------------------------------------------------------------------------
1 | import Category from './category';
2 | import { Billing, Payment, Shipping, ThankYou } from './checkout';
3 | import Cart from './components/cart-sidebar';
4 | import Home from './home';
5 | import Product from './product';
6 |
7 | const page = {
8 | get cart() {
9 | return Cart;
10 | },
11 | get category() {
12 | return Category;
13 | },
14 | get checkout() {
15 | return {
16 | shipping: new Shipping(),
17 | billing: new Billing(),
18 | payment: new Payment(),
19 | thankyou: new ThankYou()
20 | };
21 | },
22 | get home() {
23 | return Home;
24 | },
25 | get product() {
26 | return Product;
27 | }
28 | };
29 |
30 | export default page;
31 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/pages/components/header.ts:
--------------------------------------------------------------------------------
1 | import { el } from '../utils/element';
2 |
3 | class Header {
4 | get cart(): Cypress.Chainable {
5 | return el('header-icons').children().eq(2);
6 | }
7 |
8 | get categories(): Cypress.Chainable {
9 | return cy.get('[data-e2e*="app-header"]');
10 | }
11 |
12 | get category() {
13 | return {
14 | women: () => el('app-header-url_women'),
15 | men: () => el('app-header-url_men')
16 | };
17 | }
18 |
19 | openCart(): Cypress.Chainable {
20 | const click = $el => $el.click();
21 | return this.cart.pipe(click).should(() => {
22 | expect(Cypress.$('[data-e2e="sidebar-cart"]')).to.exist;
23 | });
24 | }
25 | }
26 |
27 | export default new Header();
28 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/fixtures/test-data/e2e-place-order.json:
--------------------------------------------------------------------------------
1 | {
2 | "customer": {
3 | "firstName": "John",
4 | "lastName": "Doe",
5 | "address": {
6 | "shipping": {
7 | "streetName": "1 VueStorefront Rd.",
8 | "apartment": "23",
9 | "city": "Los Angeles",
10 | "state": "California",
11 | "country": "United States",
12 | "zipcode": "45678",
13 | "phone": "123456789"
14 | },
15 | "billing": {
16 | "streetName": "1 VueStorefront Rd.",
17 | "apartment": "23",
18 | "city": "Los Angeles",
19 | "state": "California",
20 | "country": "United States",
21 | "zipcode": "45678",
22 | "phone": "123456789"
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/cypress.json:
--------------------------------------------------------------------------------
1 | {
2 | "baseUrl": "http://localhost:3000",
3 | "fixturesFolder": "tests/e2e/fixtures",
4 | "integrationFolder": "tests/e2e/integration",
5 | "pluginsFile": "tests/e2e/plugins/index.js",
6 | "supportFile": "tests/e2e/support/index.js",
7 | "viewportHeight": 1080,
8 | "viewportWidth": 1920,
9 | "pageLoadTimeout": 180000,
10 | "screenshotOnRunFailure": true,
11 | "screenshotsFolder": "tests/e2e/report/assets/screenshots",
12 | "video": false,
13 | "reporter": "../../../node_modules/mochawesome",
14 | "reporterOptions": {
15 | "reportDir": "tests/e2e/report",
16 | "reportFilename": "report",
17 | "overwrite": false,
18 | "html": false
19 | },
20 | "retries": {
21 | "runMode": 2,
22 | "openMode": 0
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/composables/src/useForgotPassword/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useForgotPasswordFactory,
4 | UseForgotPasswordFactoryParams
5 | } from '@vue-storefront/core';
6 |
7 | const factoryParams: UseForgotPasswordFactoryParams = {
8 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
9 | resetPassword: async (context: Context, { email, customQuery }) => {
10 | console.log('Mocked: resetPassword');
11 | return {};
12 | },
13 |
14 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
15 | setNewPassword: async (context: Context, { tokenValue, newPassword, customQuery }) => {
16 | console.log('Mocked: setNewPassword');
17 | return {};
18 | }
19 | };
20 |
21 | export const useForgotPassword = useForgotPasswordFactory(factoryParams);
22 |
--------------------------------------------------------------------------------
/scripts/build.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | const path = require('path');
3 | const esbuild = require('esbuild');
4 | const yargs = require('yargs/yargs');
5 | const { hideBin } = require('yargs/helpers');
6 | const argv = yargs(hideBin(process.argv)).argv;
7 |
8 | function cwdResolve(name) {
9 | return path.resolve(process.cwd(), name);
10 | }
11 |
12 | const pkg = require(cwdResolve('package.json'));
13 |
14 | esbuild.build({
15 | entryPoints: [
16 | cwdResolve(argv.file)
17 | ],
18 | outdir: 'lib',
19 | format: 'cjs',
20 | bundle: true,
21 | minify: true,
22 | sourcemap: true,
23 | platform: 'node',
24 | target: 'node16',
25 | watch: Boolean(argv.watch),
26 | logLevel: 'warning',
27 | external: [
28 | ...Object.keys(pkg.dependencies || {}),
29 | ...Object.keys(pkg.peerDependencies || {})
30 | ]
31 | });
32 |
--------------------------------------------------------------------------------
/scripts/lib/publishNpm.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable unicorn/no-process-exit, unicorn/prefer-module */
2 | const { exec } = require("child_process");
3 |
4 | const publishPackages = (pkgPath, labels) => {
5 | return new Promise((_res, _rej) => {
6 | try {
7 | const command = `npm publish ${pkgPath} --access public --tag ${labels}`;
8 |
9 | console.log(command)
10 |
11 | exec(command, (error, stdout, stderr) => {
12 | if (error) {
13 | console.log(`error: ${error.message}`);
14 | return;
15 | }
16 | if (stderr) {
17 | console.log(`stderr: ${stderr}`);
18 | return;
19 | }
20 | console.log(`stdout: ${stdout}`);
21 | });
22 | } catch (e) {
23 | console.error(e);
24 | }
25 | });
26 | }
27 |
28 | module.exports = {
29 | publishPackages,
30 | }
31 |
--------------------------------------------------------------------------------
/packages/theme/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "declaration": true,
4 | "target": "ES2020",
5 | "module": "ES2015",
6 | "moduleResolution": "Node",
7 | "lib": [
8 | "ES2020",
9 | "DOM"
10 | ],
11 | "esModuleInterop": true,
12 | "allowJs": true,
13 | "sourceMap": true,
14 | "strict": false,
15 | "noEmit": true,
16 | "baseUrl": ".",
17 | "paths": {
18 | "~/*": ["./*"],
19 | "@/*": ["./*"]
20 | },
21 | "types": [
22 | "@types/node",
23 | "@nuxt/types",
24 | "nuxt-i18n"
25 | ],
26 | "resolveJsonModule": true,
27 | "rootDir": "./",
28 | "declarationDir": "./lib",
29 | "importHelpers": true,
30 | "allowSyntheticDefaultImports": true
31 | },
32 | "exclude": [
33 | "node_modules",
34 | ".nuxt",
35 | "dist",
36 | "_theme"
37 | ]
38 | }
39 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/userGetters.ts:
--------------------------------------------------------------------------------
1 | import { UserGetters } from '@vue-storefront/core';
2 | import type { User } from '@vue-storefront/__replace_me__-api';
3 |
4 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
5 | function getFirstName(user: User): string {
6 | return '';
7 | }
8 |
9 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
10 | function getLastName(user: User): string {
11 | return '';
12 | }
13 |
14 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
15 | function getFullName(user: User): string {
16 | return '';
17 | }
18 |
19 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
20 | function getEmailAddress(user: User): string {
21 | return '';
22 | }
23 |
24 | export const userGetters: UserGetters = {
25 | getFirstName,
26 | getLastName,
27 | getFullName,
28 | getEmailAddress
29 | };
30 |
--------------------------------------------------------------------------------
/packages/composables/src/useShippingProvider/index.ts:
--------------------------------------------------------------------------------
1 | import { useShippingProviderFactory, UseShippingProviderParams, Context } from '@vue-storefront/core';
2 | import type { ShippingProvider, ShippingMethod } from '@vue-storefront/__replace_me__-api';
3 |
4 | const params: UseShippingProviderParams = {
5 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
6 | load: async (context: Context, { customQuery }) => {
7 | console.log('Mocked: loadShippingProvider');
8 | return {};
9 | },
10 |
11 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
12 | save: async (context: Context, { shippingMethod, customQuery }) => {
13 | console.log('Mocked: saveShippingProvider');
14 | return {};
15 | }
16 | };
17 |
18 | export const useShippingProvider = useShippingProviderFactory(params);
19 |
--------------------------------------------------------------------------------
/packages/composables/src/useBilling/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useBillingFactory,
4 | UseBillingParams
5 | } from '@vue-storefront/core';
6 | import type { BillingAddress } from '@vue-storefront/__replace_me__-api';
7 | import type {
8 | UseBillingAddParams as AddParams
9 | } from '../types';
10 |
11 | const params: UseBillingParams = {
12 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
13 | load: async (context: Context, { customQuery }) => {
14 | console.log('Mocked: useBilling.load');
15 | return {};
16 | },
17 |
18 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
19 | save: async (context: Context, { params, billingDetails, customQuery }) => {
20 | console.log('Mocked: useBilling.save');
21 | return {};
22 | }
23 | };
24 |
25 | export const useBilling = useBillingFactory(params);
26 |
--------------------------------------------------------------------------------
/packages/composables/src/useShipping/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useShippingFactory,
4 | UseShippingParams
5 | } from '@vue-storefront/core';
6 | import type { ShippingAddress } from '@vue-storefront/__replace_me__-api';
7 | import type {
8 | UseShippingAddParams as AddParams
9 | } from '../types';
10 |
11 | const params: UseShippingParams = {
12 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
13 | load: async (context: Context, { customQuery }) => {
14 | console.log('Mocked: useShipping.load');
15 | return {};
16 | },
17 |
18 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
19 | save: async (context: Context, { shippingDetails, customQuery }) => {
20 | console.log('Mocked: useShipping.save');
21 | return {};
22 | }
23 | };
24 |
25 | export const useShipping = useShippingFactory(params);
26 |
--------------------------------------------------------------------------------
/packages/composables/src/useReview/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useReviewFactory,
4 | UseReviewFactoryParams
5 | } from '@vue-storefront/core';
6 | import type { Review } from '@vue-storefront/__replace_me__-api';
7 | import type {
8 | UseReviewSearchParams as SearchParams,
9 | UseReviewAddParams as AddParams
10 | } from '../types';
11 |
12 | const params: UseReviewFactoryParams = {
13 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
14 | searchReviews: async (context: Context, params) => {
15 | console.log('Mocked: useReview.searchReviews');
16 | return {};
17 | },
18 |
19 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
20 | addReview: async (context: Context, params) => {
21 | console.log('Mocked: useReview.addReview');
22 | return {};
23 | }
24 | };
25 |
26 | export const useReview = useReviewFactory(params);
27 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/plugins/index.js:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line spaced-comment
2 | ///
3 | // ***********************************************************
4 | // This example plugins/index.js can be used to load plugins
5 | //
6 | // You can change the location of this file or turn off loading
7 | // the plugins file with the 'pluginsFile' configuration option.
8 | //
9 | // You can read more here:
10 | // https://on.cypress.io/plugins-guide
11 | // ***********************************************************
12 |
13 | // This function is called when a project is opened or re-opened (e.g. due to
14 | // the project's config changing)
15 |
16 | const tagify = require('cypress-tags');
17 |
18 | /**
19 | * @type {Cypress.PluginConfig}
20 | */
21 | module.exports = (on, config) => {
22 | // `on` is used to hook into various events Cypress emits
23 | // `config` is the resolved Cypress config
24 | on('file:preprocessor', tagify(config));
25 | };
26 |
--------------------------------------------------------------------------------
/packages/theme/static/icons/facebook.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/support/commands.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-undef */
2 | // ***********************************************
3 | // This example commands.js shows you how to
4 | // create various custom commands and overwrite
5 | // existing commands.
6 | //
7 | // For more comprehensive examples of custom
8 | // commands please read more here:
9 | // https://on.cypress.io/custom-commands
10 | // ***********************************************
11 | //
12 | //
13 | // -- This is a parent command --
14 | // Cypress.Commands.add("login", (email, password) => { ... })
15 | //
16 | //
17 | // -- This is a child command --
18 | // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
19 | //
20 | //
21 | // -- This is a dual command --
22 | // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
23 | //
24 | //
25 | // -- This will overwrite an existing command --
26 | // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
27 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/4.question.yml:
--------------------------------------------------------------------------------
1 | name: "❓ Question / Basic Issue"
2 | description: |
3 | Do you have a question on the implementation or a basic issue
4 | labels:
5 | - triage-needed
6 | body:
7 | - type: markdown
8 | attributes:
9 | value: If you are not sure how something works or want discuss something just describe your doubts.
10 | - type: textarea
11 | attributes:
12 | label: What is your question / Please describe your issue
13 | validations:
14 | required: true
15 | - type: input
16 | attributes:
17 | label: What version of __replace_me__ integration are you using?
18 | description: 'For example: 1.0.0'
19 | validations:
20 | required: true
21 | - type: checkboxes
22 | id: terms
23 | attributes:
24 | label: Code of Conduct
25 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/vuestorefront/vue-storefront/blob/master/CODE_OF_CONDUCT.md)
26 | options:
27 | - label: I agree to follow this project's Code of Conduct
28 | required: true
29 |
--------------------------------------------------------------------------------
/packages/composables/src/useCategory/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useCategoryFactory,
4 | UseCategoryFactoryParams
5 | } from '@vue-storefront/core';
6 | import type { Category } from '@vue-storefront/__replace_me__-api';
7 | import type {
8 | UseCategorySearchParams as SearchParams
9 | } from '../types';
10 |
11 | const params: UseCategoryFactoryParams = {
12 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
13 | categorySearch: async (context: Context, { customQuery, ...params }) => {
14 | console.log('Mocked: useCategory.categorySearch');
15 |
16 | return [
17 | {
18 | id: 1,
19 | name: 'Women',
20 | slug: 'women',
21 | items: []
22 | },
23 | {
24 | id: 2,
25 | name: 'Men',
26 | slug: 'men',
27 | items: []
28 | },
29 | {
30 | id: 3,
31 | name: 'Kids',
32 | slug: 'kids',
33 | items: []
34 | }
35 | ];
36 | }
37 | };
38 |
39 | export const useCategory = useCategoryFactory(params);
40 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Vue Storefront
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/api-extractor.base.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3 | "projectFolder": ".",
4 | "compiler": {
5 | "tsconfigFilePath": "/tsconfig.base.json"
6 | },
7 | "docModel": {
8 | "enabled": true
9 | },
10 | "dtsRollup": {
11 | "enabled": true
12 | },
13 | "tsdocMetadata": {
14 | "enabled": false
15 | },
16 | "apiReport": {
17 | "enabled": false
18 | },
19 | "messages": {
20 | "compilerMessageReporting": {
21 | "default": {
22 | "logLevel": "warning"
23 | }
24 | },
25 | "extractorMessageReporting": {
26 | "default": {
27 | "logLevel": "none",
28 | "addToApiReportFile": false
29 | },
30 | "ae-extra-release-tag": {
31 | "logLevel": "none",
32 | "addToApiReportFile": false
33 | },
34 | "ae-forgotten-export": {
35 | "logLevel": "none"
36 | }
37 | },
38 | "tsdocMessageReporting": {
39 | "default": {
40 | "logLevel": "none",
41 | "addToApiReportFile": false
42 | }
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/2.documentation-issue.yml:
--------------------------------------------------------------------------------
1 | name: "📚 Documentation Issue"
2 | description: |
3 | Report issues in our documentation
4 | labels:
5 | - documentation
6 | - triage-needed
7 | body:
8 | - type: textarea
9 | attributes:
10 | label: Provide a description of requested docs changes
11 | placeholder: Briefly describe which document needs to be corrected.
12 | validations:
13 | required: true
14 | - type: checkboxes
15 | id: fixthebug
16 | attributes:
17 | label: Able to fix / change the documentation?
18 | description: Can you handle this change and create a Pull Request?
19 | options:
20 | - label: 'Yes'
21 | required: false
22 | - label: 'No'
23 | required: false
24 | - type: checkboxes
25 | id: terms
26 | attributes:
27 | label: Code of Conduct
28 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/vuestorefront/__replace_me__/blob/master/CODE_OF_CONDUCT.md)
29 | options:
30 | - label: I agree to follow this project's Code of Conduct
31 | required: true
32 |
--------------------------------------------------------------------------------
/docs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vsf-integration-docs",
3 | "version": "0.0.1",
4 | "description": "Documentation for __replace_me__ integration for Vue Storefront",
5 | "main": "index.js",
6 | "license": "MIT",
7 | "repository": "https://github.com/vuestorefront/__replace_me__/docs",
8 | "scripts": {
9 | "dev": "vuepress dev",
10 | "build": "vuepress build",
11 | "api-extract": "yarn api-ref && yarn comp-ref && yarn ref-md",
12 | "api-ref": "cd ../packages/api-client && api-extractor run --local",
13 | "comp-ref": "cd ../packages/composables && api-extractor run --local",
14 | "ref-md": "api-documenter markdown --i api-reference --o api-reference"
15 | },
16 | "devDependencies": {
17 | "@microsoft/api-documenter": "^7.13.65",
18 | "@microsoft/api-extractor": "^7.18.17",
19 | "@vuepress/plugin-active-header-links": "^1.8.2",
20 | "@vuepress/plugin-back-to-top": "^1.8.2",
21 | "@vuepress/plugin-medium-zoom": "^1.8.2",
22 | "@vuepress/plugin-search": "^1.8.2",
23 | "handlebars": "^4.7.7",
24 | "typescript": "^4.5.4",
25 | "vuepress": "^1.8.2"
26 | },
27 | "dependencies": {
28 | "sass-loader": "^8.0.2",
29 | "vue-multiselect": "^2.1.6"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/support/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-undef */
2 | // ***********************************************************
3 | // This example support/index.js is processed and
4 | // loaded automatically before your test files.
5 | //
6 | // This is a great place to put global configuration and
7 | // behavior that modifies Cypress.
8 | //
9 | // You can change the location of this file or turn off
10 | // automatically serving support files with the
11 | // 'supportFile' configuration option.
12 | //
13 | // You can read more here:
14 | // https://on.cypress.io/configuration
15 | // ***********************************************************
16 |
17 | // Import commands.js using ES2015 syntax:
18 | import './commands.js';
19 | import 'cypress-pipe';
20 |
21 | // Alternatively you can use CommonJS syntax:
22 | // require('./commands')
23 |
24 | import addContext from 'mochawesome/addContext';
25 |
26 | Cypress.on('test:after:run', (test, runnable) => {
27 | if (test.state === 'failed') {
28 | const screenshot = `assets/screenshots/${Cypress.spec.name}/${runnable.parent.title} -- ${test.title} (failed).png`;
29 | addContext({test}, {
30 | title: 'Screenshot',
31 | value: screenshot
32 | });
33 | }
34 | });
35 |
36 |
--------------------------------------------------------------------------------
/packages/api-client/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@vue-storefront/__replace_me__-api",
3 | "version": "0.0.1",
4 | "private": true,
5 | "sideEffects": false,
6 | "main": "./lib/index.js",
7 | "exports": {
8 | ".": "./lib/index.js",
9 | "./server": "./lib/index.server.js",
10 | "./package.json": "./package.json"
11 | },
12 | "types": "lib/index.d.ts",
13 | "scripts": {
14 | "build": "yarn build:clear && yarn build:package && yarn build:server && yarn build:types",
15 | "build:clear": "rimraf lib",
16 | "build:package": "node ../../scripts/build --file=src/index.ts",
17 | "build:server": "node ../../scripts/build --file=src/index.server.ts",
18 | "build:types": "tsc --emitDeclarationOnly",
19 | "dev": "concurrently \"yarn build:package --watch\" \"yarn build:server --watch\"",
20 | "precommit": "lint-staged",
21 | "prepublish": "yarn build",
22 | "test": "jest",
23 | "update:check": "ncu",
24 | "update:update": "ncu -u"
25 | },
26 | "dependencies": {
27 | "@vue-storefront/core": "~2.5.4"
28 | },
29 | "devDependencies": {
30 | "concurrently": "^7.0.0"
31 | },
32 | "files": [
33 | "lib/**/*"
34 | ],
35 | "publishConfig": {
36 | "access": "public"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish Packages on NPM
2 | on:
3 | workflow_dispatch:
4 | inputs:
5 | npmTag:
6 | description: 'NPM Tag'
7 | required: true
8 | default: 'latest'
9 | jobs:
10 | publishing:
11 | name: Package Publishing
12 | runs-on: ubuntu-latest
13 | env:
14 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
15 | steps:
16 | - name: Checkout code
17 | uses: actions/checkout@v2
18 |
19 | - name: Setup node
20 | uses: actions/setup-node@v2
21 | with:
22 | node-version: '14'
23 | registry-url: "https://registry.npmjs.org/"
24 | scope: "@vue-storefront"
25 | - run: echo "" >> .npmrc && echo "@vue-storefront:registry=https://registry.npmjs.org/" >> .npmrc
26 | - run: yarn
27 | env:
28 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29 | - run: yarn build:api-client && yarn publish:api-client "${{ github.event.inputs.npmTag }}" "$NODE_AUTH_TOKEN"
30 | env:
31 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32 | - run: yarn build:composables && yarn publish:composables "${{ github.event.inputs.npmTag }}" "$NODE_AUTH_TOKEN"
33 | env:
34 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35 |
--------------------------------------------------------------------------------
/packages/composables/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@vue-storefront/__replace_me__",
3 | "version": "0.0.1",
4 | "private": true,
5 | "sideEffects": false,
6 | "main": "./lib/index.js",
7 | "exports": {
8 | ".": "./lib/index.js",
9 | "./nuxt": "./nuxt/index.js",
10 | "./package.json": "./package.json"
11 | },
12 | "types": "lib/index.d.ts",
13 | "scripts": {
14 | "build": "yarn build:clear && yarn build:package && yarn build:types",
15 | "build:clear": "rimraf lib",
16 | "build:package": "node ../../scripts/build --file=src/index.ts",
17 | "build:types": "tsc --emitDeclarationOnly",
18 | "dev": "yarn build:package --watch",
19 | "precommit": "lint-staged",
20 | "prepublish": "yarn build",
21 | "test": "jest",
22 | "update:check": "ncu",
23 | "update:update": "ncu -u"
24 | },
25 | "dependencies": {
26 | "@vue-storefront/__replace_me__-api": "0.0.1",
27 | "@vue-storefront/core": "~2.5.4"
28 | },
29 | "devDependencies": {
30 | "@rollup/plugin-node-resolve": "^13.0.6",
31 | "rollup-plugin-typescript2": "^0.30.0"
32 | },
33 | "peerDependencies": {
34 | "@nuxtjs/composition-api": "^0.29.3"
35 | },
36 | "files": [
37 | "lib/**/*"
38 | ],
39 | "publishConfig": {
40 | "access": "public"
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/packages/api-client/src/types.ts:
--------------------------------------------------------------------------------
1 | export type TODO = unknown;
2 |
3 | export type Setttings = TODO;
4 |
5 | export type Endpoints = TODO;
6 |
7 | export type BillingAddress = TODO;
8 |
9 | export type Cart = TODO;
10 |
11 | export type CartItem = TODO;
12 |
13 | export type Category = TODO;
14 |
15 | export type Coupon = TODO;
16 |
17 | export type Facet = TODO;
18 |
19 | export type FacetSearchCriteria = TODO;
20 |
21 | export type Order = TODO;
22 |
23 | export type OrderItem = TODO;
24 |
25 | export type PasswordResetResult = TODO;
26 |
27 | export type Product = TODO;
28 |
29 | export type ProductFilter = TODO;
30 |
31 | export type Review = TODO;
32 |
33 | export type ReviewItem = TODO;
34 |
35 | export type User = TODO;
36 |
37 | export type UserBillingAddress = TODO;
38 |
39 | export type UserBillingAddressItem = TODO;
40 |
41 | export type UserBillingAddressSearchCriteria = TODO;
42 |
43 | export type UserShippingAddress = TODO;
44 |
45 | export type UserShippingAddressItem = TODO;
46 |
47 | export type UserShippingAddressSearchCriteria = TODO;
48 |
49 | export type ShippingAddress = TODO;
50 |
51 | export type ShippingMethod = TODO;
52 |
53 | export type ShippingProvider = TODO;
54 |
55 | export type Store = TODO;
56 |
57 | export type Wishlist = TODO;
58 |
59 | export type WishlistItem = TODO;
60 |
--------------------------------------------------------------------------------
/packages/api-client/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
4 |
5 | ## Vue Storefront 2 integration with __replace_me__
6 |
7 | ------
8 |
9 |
10 |
11 |
12 | ## How to start if you want to try out the integration
13 |
14 | ```
15 | yarn global add @vue-storefront/cli
16 | ```
17 | ```
18 | vsf init && cd && yarn && yarn dev
19 | ```
20 |
21 | ## Resources
22 |
23 | - [Vue Storefront Documentation](https://docs.vuestorefront.io/v2/)
24 | - [__replace_me__ integration Documentation](https://docs.vuestorefront.io/__replace_me__)
25 | - [Community Chat](https://discord.vuestorefront.io)
26 |
27 | ## Support
28 |
29 | If you have any questions about this integration we will be happy to answer them on `__replace_me__` channel on [our Discord](discord.vuestorefront.io).
30 |
31 | ## Contributors ✨
32 |
33 |
34 |
35 |
36 |
37 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
38 |
--------------------------------------------------------------------------------
/packages/composables/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
4 |
5 | ## Vue Storefront 2 integration with __replace_me__
6 |
7 | ------
8 |
9 |
10 |
11 |
12 |
13 | ## How to start if you want to try out the integration
14 |
15 | ```
16 | yarn global add @vue-storefront/cli
17 | ```
18 | ```
19 | vsf init && cd && yarn && yarn dev
20 | ```
21 |
22 | ## Resources
23 |
24 | - [Vue Storefront Documentation](https://docs.vuestorefront.io/v2/)
25 | - [__replace_me__ integration Documentation](https://docs.vuestorefront.io/__replace_me__)
26 | - [Community Chat](https://discord.vuestorefront.io)
27 |
28 | ## Support
29 |
30 | If you have any questions about this integration we will be happy to answer them on `__replace_me__` channel on [our Discord](discord.vuestorefront.io).
31 |
32 | ## Contributors ✨
33 |
34 |
35 |
36 |
37 |
38 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
39 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/integration/e2e-place-order.spec.ts:
--------------------------------------------------------------------------------
1 | import page from '../pages/factory';
2 |
3 | context('Order placement', () => {
4 | beforeEach(function () {
5 | cy.fixture('test-data/e2e-place-order').then((fixture) => {
6 | this.fixtures = {
7 | data: fixture
8 | };
9 | });
10 | });
11 |
12 | it(['happypath', 'regression'], 'Should successfully place an order', function () {
13 | const data = this.fixtures.data;
14 | page.home.visit();
15 | page.home.header.categories.first().click();
16 | page.category.products.first().click();
17 | page.product.addToCartButton.click();
18 | page.product.header.openCart();
19 | page.cart.goToCheckoutButton.click();
20 | page.checkout.shipping.heading.should('be.visible');
21 | page.checkout.shipping.fillForm(data.customer);
22 | page.checkout.shipping.selectShippingButton.click();
23 | page.checkout.shipping.shippingMethods.first().click();
24 | page.checkout.shipping.continueToBillingButton.click();
25 | page.checkout.billing.heading.should('be.visible');
26 | page.checkout.billing.fillForm(data.customer);
27 | page.checkout.billing.continueToPaymentButton.click();
28 | page.checkout.payment.paymentMethods.first().click();
29 | page.checkout.payment.terms.click();
30 | page.checkout.payment.makeAnOrderButton.click();
31 | page.checkout.thankyou.heading.should('be.visible');
32 | });
33 | });
34 |
--------------------------------------------------------------------------------
/packages/theme/static/icons/logo.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/packages/composables/src/useWishlist/index.ts:
--------------------------------------------------------------------------------
1 | /* istanbul ignore file */
2 | import {
3 | Context,
4 | useWishlistFactory,
5 | UseWishlistFactoryParams
6 | } from '@vue-storefront/core';
7 | import type { Wishlist, WishlistItem, Product } from '@vue-storefront/__replace_me__-api';
8 |
9 | const params: UseWishlistFactoryParams = {
10 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
11 | load: async (context: Context) => {
12 | console.log('Mocked: useWishlist.load');
13 | return {};
14 | },
15 |
16 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
17 | addItem: async (context: Context, { currentWishlist, product }) => {
18 | console.log('Mocked: useWishlist.addItem');
19 | return {};
20 | },
21 |
22 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
23 | removeItem: async (context: Context, { currentWishlist, product }) => {
24 | console.log('Mocked: useWishlist.removeItem');
25 | return {};
26 | },
27 |
28 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
29 | clear: async (context: Context, { currentWishlist }) => {
30 | console.log('Mocked: useWishlist.clear');
31 | return {};
32 | },
33 |
34 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
35 | isInWishlist: (context: Context, { currentWishlist, product }) => {
36 | console.log('Mocked: useWishlist.isInWishlist');
37 | return false;
38 | }
39 | };
40 |
41 | export const useWishlist = useWishlistFactory(params);
42 |
--------------------------------------------------------------------------------
/packages/composables/src/useUserBilling/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useUserBillingFactory,
4 | UseUserBillingFactoryParams
5 | } from '@vue-storefront/core';
6 | import type {
7 | UserBillingAddress as Address,
8 | UserBillingAddressItem as AddressItem
9 | } from '@vue-storefront/__replace_me__-api';
10 |
11 | const params: UseUserBillingFactoryParams = {
12 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
13 | addAddress: async (context: Context, params) => {
14 | console.log('Mocked: useUserBilling.addAddress');
15 | return {};
16 | },
17 |
18 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
19 | deleteAddress: async (context: Context, params) => {
20 | console.log('Mocked: useUserBilling.deleteAddress');
21 | return {};
22 | },
23 |
24 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
25 | updateAddress: async (context: Context, params) => {
26 | console.log('Mocked: useUserBilling.updateAddress');
27 | return {};
28 | },
29 |
30 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
31 | load: async (context: Context, params) => {
32 | console.log('Mocked: useUserBilling.load');
33 | return {};
34 | },
35 |
36 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
37 | setDefaultAddress: async (context: Context, params) => {
38 | console.log('Mocked: useUserBilling.setDefaultAddress');
39 | return {};
40 | }
41 | };
42 |
43 | export const useUserBilling = useUserBillingFactory(params);
44 |
--------------------------------------------------------------------------------
/packages/composables/src/useUserShipping/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useUserShippingFactory,
4 | UseUserShippingFactoryParams
5 | } from '@vue-storefront/core';
6 | import type {
7 | UserShippingAddress as Address,
8 | UserShippingAddressItem as AddressItem
9 | } from '@vue-storefront/__replace_me__-api';
10 |
11 | const params: UseUserShippingFactoryParams = {
12 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
13 | addAddress: async (context: Context, params) => {
14 | console.log('Mocked: useUserShipping.addAddress');
15 | return {};
16 | },
17 |
18 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
19 | deleteAddress: async (context: Context, params) => {
20 | console.log('Mocked: useUserShipping.deleteAddress');
21 | return {};
22 | },
23 |
24 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
25 | updateAddress: async (context: Context, params) => {
26 | console.log('Mocked: useUserShipping.updateAddress');
27 | return {};
28 | },
29 |
30 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
31 | load: async (context: Context, params) => {
32 | console.log('Mocked: useUserShipping.load');
33 | return {};
34 | },
35 |
36 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
37 | setDefaultAddress: async (context: Context, params) => {
38 | console.log('Mocked: useUserShipping.setDefaultAddress');
39 | return {};
40 | }
41 | };
42 |
43 | export const useUserShipping = useUserShippingFactory(params);
44 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/3.feature-request.yml:
--------------------------------------------------------------------------------
1 | name: "🚀 Feature Request"
2 | description: Sugest a new feature request or improvement on the project
3 | title: '[Feature]: '
4 | labels:
5 | - feature
6 | - enhancement
7 | - triage-needed
8 |
9 | body:
10 | - type: markdown
11 | attributes:
12 | value: |
13 | Please, provide as many information, and knowledge so the feature can be correctly designed and developed.
14 | - type: textarea
15 | id: suggestion
16 | attributes:
17 | label: How the project can be improved?
18 | description: What is the motivation for adding / enhancing this feature? Can you describe a concrete use case for this feature or why one of current ones should be enhanced.
19 | placeholder: Describe the motivation or the concrete use case
20 | validations:
21 | required: true
22 | - type: textarea
23 | id: acceptcriterea
24 | attributes:
25 | label: What are the acceptance criteria?
26 | description: List the acceptance criteria for this task in a form of a list.
27 | value: '- [ ]'
28 | - type: textarea
29 | id: additionalinfo
30 | attributes:
31 | label: Additional information
32 | description: If you think that any additional information would be useful please provide them here.
33 | - type: checkboxes
34 | id: terms
35 | attributes:
36 | label: Code of Conduct
37 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/vuestorefront/__replace_me__/blob/master/CODE_OF_CONDUCT.md)
38 | options:
39 | - label: I agree to follow this project's Code of Conduct
40 | required: true
41 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to @vuestorefront/__replace_me__
2 | We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
3 |
4 | - Reporting a bug
5 | - Discussing the current state of the code
6 | - Submitting a fix
7 | - Proposing new features
8 | - Becoming a maintainer
9 |
10 | ## We Develop with Github
11 | We use github to host code, to track issues and feature requests, as well as accept pull requests.
12 |
13 | ## Any contributions you make will be under the MIT Software License
14 | In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
15 |
16 | ## Report bugs using Github's [issues](https://github.com/vuestorefront/__replace_me__/issues)
17 | We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/vuestorefront/__replace_me__/issues/new); it's that easy!
18 |
19 | ## Write bug reports with detail, background, and sample code
20 | **Great Bug Reports** tend to have:
21 |
22 | - A quick summary and/or background
23 | - Steps to reproduce
24 | - Be specific!
25 | - Give sample code if you can.
26 | - What you expected would happen
27 | - What actually happens
28 | - The environment you're running the application
29 | - Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
30 |
31 | People *love* thorough bug reports. I'm not even kidding.
32 |
33 | ## License
34 | By contributing, you agree that your contributions will be licensed under its MIT License.
35 |
--------------------------------------------------------------------------------
/packages/composables/src/index.ts:
--------------------------------------------------------------------------------
1 | // Composables
2 | export { useBilling } from './useBilling';
3 | export { useCart } from './useCart';
4 | export { useCategory } from './useCategory';
5 | export { useContent } from './useContent';
6 | export { useFacet } from './useFacet';
7 | export { useForgotPassword } from './useForgotPassword';
8 | export { useMakeOrder } from './useMakeOrder';
9 | export { useProduct } from './useProduct';
10 | export { useReview } from './useReview';
11 | export { useShipping } from './useShipping';
12 | export { useShippingProvider } from './useShippingProvider';
13 | export { useStore } from './useStore';
14 | export { useUser } from './useUser';
15 | export { useUserBilling } from './useUserBilling';
16 | export { useUserOrder } from './useUserOrder';
17 | export { useUserShipping } from './useUserShipping';
18 | export { useWishlist } from './useWishlist';
19 |
20 | // Getters
21 | export { cartGetters } from './getters/cartGetters';
22 | export { categoryGetters } from './getters/categoryGetters';
23 | export { facetGetters } from './getters/facetGetters';
24 | export { forgotPasswordGetters } from './getters/forgotPasswordGetters';
25 | export { orderGetters } from './getters/orderGetters';
26 | export { productGetters } from './getters/productGetters';
27 | export { reviewGetters } from './getters/reviewGetters';
28 | export { storeGetters } from './getters/storeGetters';
29 | export { userBillingGetters } from './getters/userBillingGetters';
30 | export { userGetters } from './getters/userGetters';
31 | export { userShippingGetters } from './getters/userShippingGetters';
32 | export { wishlistGetters } from './getters/wishlistGetters';
33 |
34 | // Types
35 | export * from './types';
36 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Description
4 |
5 |
6 | ## Related Issue
7 |
8 |
9 |
10 |
11 |
12 | ## Motivation and Context
13 |
14 |
15 | ## How Has This Been Tested?
16 |
17 |
18 |
19 |
20 | ## Screenshots (if appropriate):
21 |
22 | ## Types of changes
23 |
24 | - [ ] Bug fix (non-breaking change which fixes an issue)
25 | - [ ] New feature (non-breaking change which adds functionality)
26 | - [ ] Breaking change (fix or feature that would cause existing functionality to change)
27 |
28 | ## Checklist:
29 |
30 |
31 | - [ ] My code follows the code style of this project.
32 | - [ ] My change requires a change to the documentation.
33 | - [ ] I have updated the documentation accordingly.
34 | - [ ] I have read the **CONTRIBUTING** document.
35 | - [ ] I have added tests to cover my changes.
36 | - [ ] All new and existing tests passed.
37 |
--------------------------------------------------------------------------------
/packages/composables/src/useUser/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useUserFactory,
4 | UseUserFactoryParams
5 | } from '@vue-storefront/core';
6 | import type { User } from '@vue-storefront/__replace_me__-api';
7 | import type {
8 | UseUserUpdateParams as UpdateParams,
9 | UseUserRegisterParams as RegisterParams
10 | } from '../types';
11 |
12 | const params: UseUserFactoryParams = {
13 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
14 | load: async (context: Context) => {
15 | console.log('Mocked: useUser.load');
16 | return {};
17 | },
18 |
19 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
20 | logOut: async (context: Context) => {
21 | console.log('Mocked: useUser.logOut');
22 | },
23 |
24 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
25 | updateUser: async (context: Context, { currentUser, updatedUserData }) => {
26 | console.log('Mocked: useUser.updateUser');
27 | return {};
28 | },
29 |
30 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
31 | register: async (context: Context, { email, password, firstName, lastName }) => {
32 | console.log('Mocked: useUser.register');
33 | return {};
34 | },
35 |
36 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
37 | logIn: async (context: Context, { username, password }) => {
38 | console.log('Mocked: useUser.logIn');
39 | return {};
40 | },
41 |
42 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
43 | changePassword: async (context: Context, { currentUser, currentPassword, newPassword }) => {
44 | console.log('Mocked: useUser.changePassword');
45 | return {};
46 | }
47 | };
48 |
49 | export const useUser = useUserFactory(params);
50 |
--------------------------------------------------------------------------------
/packages/theme/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@vue-storefront/__replace_me__-theme",
3 | "version": "0.0.1",
4 | "private": true,
5 | "engines": {
6 | "node": ">=14.17.x"
7 | },
8 | "scripts": {
9 | "build": "nuxt build -m",
10 | "build:analyze": "nuxt build -a -m",
11 | "dev": "nuxt",
12 | "generate": "nuxt generate",
13 | "lint": "eslint . --ext .ts,.vue",
14 | "lint:fix": "eslint . --ext .ts,.vue --fix",
15 | "precommit": "lint-staged",
16 | "start": "nuxt start",
17 | "test": "jest",
18 | "test:e2e": "cypress open --config-file tests/e2e/cypress.json",
19 | "test:e2e:generate:report": "yarn -s mochawesome-merge \"tests/e2e/report/*.json\" > \"tests/e2e/report.json\" && yarn -s marge tests/e2e/report.json -o \"tests/e2e/report\"",
20 | "test:e2e:hl": "cypress run --headless --config-file tests/e2e/cypress.json",
21 | "update:check": "ncu",
22 | "update:update": "ncu -u"
23 | },
24 | "dependencies": {
25 | "@storefront-ui/vue": "0.11.4",
26 | "@vue-storefront/__replace_me__": "0.0.1",
27 | "@vue-storefront/middleware": "~2.5.4",
28 | "@vue-storefront/nuxt": "~2.5.4",
29 | "@vue-storefront/nuxt-theme": "~2.5.4",
30 | "cookie-universal-nuxt": "^2.1.5",
31 | "core-js": "^3.19.0",
32 | "nuxt": "^2.15.8",
33 | "nuxt-i18n": "^6.5.0",
34 | "vee-validate": "^3.4.13",
35 | "vue-scrollto": "^2.20.0"
36 | },
37 | "devDependencies": {
38 | "@nuxt/types": "^2.15.8",
39 | "@vue/test-utils": "^1.2.2",
40 | "babel-jest": "^27.3.1",
41 | "cypress": "^8.7.0",
42 | "cypress-pipe": "^2.0.0",
43 | "cypress-tags": "^0.3.0",
44 | "jest": "^27.5.1",
45 | "mochawesome": "^6.3.1",
46 | "mochawesome-merge": "^4.2.0",
47 | "mochawesome-report-generator": "^5.2.0",
48 | "ts-loader": "^8.1.0",
49 | "vue-jest": "^4.0.0-0"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/packages/theme/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Node template
3 | # Logs
4 | logs
5 | *.log
6 | npm-debug.log*
7 | yarn-debug.log*
8 | yarn-error.log*
9 |
10 | # Runtime data
11 | pids
12 | *.pid
13 | *.seed
14 | *.pid.lock
15 |
16 | # Directory for instrumented libs generated by jscoverage/JSCover
17 | lib-cov
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # nyc test coverage
23 | .nyc_output
24 |
25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26 | .grunt
27 |
28 | # Bower dependency directory (https://bower.io/)
29 | bower_components
30 |
31 | # node-waf configuration
32 | .lock-wscript
33 |
34 | # Compiled binary addons (https://nodejs.org/api/addons.html)
35 | build/Release
36 |
37 | # Dependency directories
38 | node_modules/
39 | jspm_packages/
40 |
41 | # TypeScript v1 declaration files
42 | typings/
43 |
44 | # Optional npm cache directory
45 | .npm
46 |
47 | # Optional eslint cache
48 | .eslintcache
49 |
50 | # Optional REPL history
51 | .node_repl_history
52 |
53 | # Output of 'npm pack'
54 | *.tgz
55 |
56 | # Yarn Integrity file
57 | .yarn-integrity
58 |
59 | # dotenv environment variables file
60 | .env
61 |
62 | # parcel-bundler cache (https://parceljs.org/)
63 | .cache
64 |
65 | # next.js build output
66 | .next
67 |
68 | # nuxt.js build output
69 | .nuxt
70 |
71 | # theme
72 | _theme
73 |
74 | # Nuxt generate
75 | dist
76 |
77 | # vuepress build output
78 | .vuepress/dist
79 |
80 | # Serverless directories
81 | .serverless
82 |
83 | # IDE / Editor
84 | .idea
85 |
86 | # Service worker
87 | sw.*
88 |
89 | # Mac OSX
90 | .DS_Store
91 |
92 | # Vim swap files
93 | *.swp
94 |
95 | version
96 |
97 | # e2e reports
98 | tests/e2e/report.json
99 | tests/e2e/report
100 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/reviewGetters.ts:
--------------------------------------------------------------------------------
1 | import { ReviewGetters, AgnosticRateCount } from '@vue-storefront/core';
2 | import type { Review, ReviewItem } from '@vue-storefront/__replace_me__-api';
3 |
4 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
5 | function getItems(review: Review): ReviewItem[] {
6 | return [];
7 | }
8 |
9 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
10 | function getReviewId(item: ReviewItem): string {
11 | return '';
12 | }
13 |
14 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
15 | function getReviewAuthor(item: ReviewItem): string {
16 | return '';
17 | }
18 |
19 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
20 | function getReviewMessage(item: ReviewItem): string {
21 | return '';
22 | }
23 |
24 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
25 | function getReviewRating(item: ReviewItem): number {
26 | return 0;
27 | }
28 |
29 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
30 | function getReviewDate(item: ReviewItem): string {
31 | return '';
32 | }
33 |
34 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
35 | function getTotalReviews(review: Review): number {
36 | return 0;
37 | }
38 |
39 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
40 | function getAverageRating(review: Review): number {
41 | return 0;
42 | }
43 |
44 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
45 | function getRatesCount(review: Review): AgnosticRateCount[] {
46 | return [];
47 | }
48 |
49 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
50 | function getReviewsPage(review: Review): number {
51 | return 0;
52 | }
53 |
54 | export const reviewGetters: ReviewGetters = {
55 | getItems,
56 | getReviewId,
57 | getReviewAuthor,
58 | getReviewMessage,
59 | getReviewRating,
60 | getReviewDate,
61 | getTotalReviews,
62 | getAverageRating,
63 | getRatesCount,
64 | getReviewsPage
65 | };
66 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/orderGetters.ts:
--------------------------------------------------------------------------------
1 | import { UserOrderGetters } from '@vue-storefront/core';
2 | import type { Order, OrderItem } from '@vue-storefront/__replace_me__-api';
3 |
4 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
5 | function getDate(order: Order): string {
6 | return '';
7 | }
8 |
9 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
10 | function getId(order: Order): string {
11 | return '1';
12 | }
13 |
14 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
15 | function getStatus(order: Order): string {
16 | return '';
17 | }
18 |
19 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
20 | function getPrice(order: Order): number | null {
21 | return 0;
22 | }
23 |
24 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
25 | function getItems(order: Order): OrderItem[] {
26 | return [];
27 | }
28 |
29 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
30 | function getItemSku(item: OrderItem): string {
31 | return '';
32 | }
33 |
34 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
35 | function getItemName(item: OrderItem): string {
36 | return '';
37 | }
38 |
39 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
40 | function getItemQty(item: OrderItem): number {
41 | return 0;
42 | }
43 |
44 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
45 | function getItemPrice(item: OrderItem): number {
46 | return 0;
47 | }
48 |
49 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
50 | function getFormattedPrice(price: number): string {
51 | return '';
52 | }
53 |
54 | // eslint-disable-next-line
55 | function getOrdersTotal(orders: any): number {
56 | return 1;
57 | }
58 |
59 | export const orderGetters: UserOrderGetters = {
60 | getDate,
61 | getId,
62 | getStatus,
63 | getPrice,
64 | getItems,
65 | getItemSku,
66 | getItemName,
67 | getItemQty,
68 | getItemPrice,
69 | getFormattedPrice,
70 | getOrdersTotal
71 | };
72 |
--------------------------------------------------------------------------------
/packages/theme/README.md:
--------------------------------------------------------------------------------
1 | # Vue Storefront 2
2 |
3 | ## Build Setup
4 |
5 | ```bash
6 | # install dependencies
7 | $ yarn install
8 |
9 | # serve with hot reload at localhost:3000
10 | $ yarn dev
11 |
12 | # build for production and launch server
13 | $ yarn build
14 | $ yarn start
15 | ```
16 |
17 | For detailed explanation on how things work, check out the [documentation](https://docs.vuestorefront.io/v2/).
18 |
19 | ## Special Directories
20 |
21 | You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality.
22 |
23 | ### `assets`
24 |
25 | The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts.
26 |
27 | ### `components`
28 |
29 | The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components.
30 |
31 | ### `layouts`
32 |
33 | Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop.
34 |
35 | ### `pages`
36 |
37 | This directory contains your application views and routes. Nuxt will read all the `*.vue` files inside this directory and setup Vue Router automatically.
38 |
39 | ### `plugins`
40 |
41 | The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use `Vue.use()`, you should create a file in `plugins/` and add its path to plugins in `nuxt.config.js`.
42 |
43 | ### `static`
44 |
45 | This directory contains your static files. Each file inside this directory is mapped to `/`.
46 |
47 | Example: `/static/robots.txt` is mapped as `/robots.txt`.
48 |
49 | ### `store`
50 |
51 | This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex.
52 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: Test & Lint
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | - main
8 | - develop
9 | pull_request:
10 | branches:
11 | - master
12 | - main
13 | - develop
14 |
15 | jobs:
16 | prepare_dependencies:
17 | name: Install dependencies
18 | runs-on: ubuntu-latest
19 | steps:
20 | - name: Checkout code
21 | uses: actions/checkout@v2
22 |
23 | - name: Setup node
24 | uses: actions/setup-node@v2
25 | with:
26 | node-version: '14'
27 | cache: 'yarn'
28 |
29 | - name: Install dependencies
30 | run: yarn --frozen-lockfile
31 |
32 | lint:
33 | name: Run linter
34 | needs: prepare_dependencies
35 | runs-on: ubuntu-latest
36 | steps:
37 | - name: Checkout code
38 | uses: actions/checkout@v2
39 |
40 | - name: Setup node
41 | uses: actions/setup-node@v2
42 | with:
43 | node-version: '14'
44 | cache: 'yarn'
45 |
46 | - name: Install dependencies
47 | run: yarn --frozen-lockfile
48 |
49 | - name: Run linter
50 | run: yarn lint
51 |
52 | test:
53 | name: Test all packages
54 | needs: prepare_dependencies
55 | runs-on: ubuntu-latest
56 | steps:
57 | - name: Checkout code
58 | uses: actions/checkout@v2
59 |
60 | - name: Setup node
61 | uses: actions/setup-node@v2
62 | with:
63 | node-version: '14'
64 | cache: 'yarn'
65 |
66 | - name: Install dependencies
67 | run: yarn --frozen-lockfile
68 |
69 | - name: Build api-client
70 | run: yarn build:api-client
71 |
72 | - name: Test api-client
73 | run: yarn test:api-client
74 |
75 | - name: Build composables
76 | run: yarn build:composables
77 |
78 | - name: Test composables
79 | run: yarn test:composables
80 |
81 | - name: Build theme
82 | run: yarn build:theme
83 |
84 | - name: Test theme
85 | run: yarn test:theme
86 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Yeay! You want to contribute to @vuestorefront/__replace_me__. That's amazing! To smoothen everyone's experience involved with the project please take note of the following guidelines and rules.
4 |
5 |
6 | ## Found an Issue?
7 |
8 | Thank you for reporting any issues you find. We do our best to test and make @vuestorefront/__replace_me__ as solid as possible, but any reported issue is a real help.
9 |
10 | Please follow these guidelines when reporting issues:
11 |
12 | - Provide a title in the format of ` when `
13 | - Tag your issue with the tag `bug`
14 | - Provide a short summary of what you are trying to do
15 | - Provide the log of the encountered error if applicable
16 | - Provide the exact version of @vuestorefront/__replace_me__.
17 | - Be awesome and consider contributing a [pull request](#want-to-contribute)
18 |
19 | ## Want to contribute?
20 |
21 | Please consider these guidelines when filing a pull request:
22 |
23 | > @vuestorefront/__replace_me__ pull requests
24 |
25 | - Follow the [Coding Rules](#coding-rules)
26 | - Follow the [Commit Rules](#commit-rules)
27 | - Make sure you rebased the current master branch when filing the pull request
28 | - Squash your commits when filing the pull request
29 | - Provide a short title with a maximum of 100 characters
30 | - Provide a more detailed description containing
31 | _ What you want to achieve
32 | _ What you changed
33 | _ What you added
34 | _ What you removed
35 |
36 | ## Coding Rules
37 |
38 | To keep the code base of @vuestorefront/__replace_me__ neat and tidy the following rules apply to every change
39 |
40 | > Coding standards
41 |
42 | - `eslint` is king
43 | - Favor micro library over swiss army knives (rimraf, ncp vs. fs-extra)
44 | - Be awesome
45 |
46 | ## Commit Rules
47 |
48 | To help everyone with understanding the commit history of commitlint the following commit rules are enforced.
49 | To make your life easier @vuestorefront/__replace_me__ is commitizen-friendly and provides the npm run-script `commit`.
50 |
51 | > Commit standards
52 |
53 | - [conventional-changelog](https://github.com/conventional-changelog)
54 | - husky commit message hook available
55 | - present tense
56 | - maximum of 100 characters
57 | - message format of `$type($scope): $message`
58 |
--------------------------------------------------------------------------------
/packages/composables/src/useCart/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Context,
3 | useCartFactory,
4 | UseCartFactoryParams
5 | } from '@vue-storefront/core';
6 | import type {
7 | Cart,
8 | CartItem,
9 | Product
10 | } from '@vue-storefront/__replace_me__-api';
11 |
12 | const params: UseCartFactoryParams = {
13 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
14 | load: async (context: Context, { customQuery }) => {
15 | console.log('Mocked: useCart.load');
16 | return {};
17 | },
18 |
19 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
20 | addItem: async (context: Context, { currentCart, product, quantity, customQuery }) => {
21 | console.log('Mocked: useCart.addItem');
22 | return {};
23 | },
24 |
25 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
26 | removeItem: async (context: Context, { currentCart, product, customQuery }) => {
27 | console.log('Mocked: useCart.removeItem');
28 | return {};
29 | },
30 |
31 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
32 | updateItemQty: async (context: Context, { currentCart, product, quantity, customQuery }) => {
33 | console.log('Mocked: useCart.updateItemQty');
34 | return {};
35 | },
36 |
37 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
38 | clear: async (context: Context, { currentCart }) => {
39 | console.log('Mocked: useCart.clear');
40 | return {};
41 | },
42 |
43 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
44 | applyCoupon: async (context: Context, { currentCart, couponCode, customQuery }) => {
45 | console.log('Mocked: useCart.applyCoupon');
46 | return {
47 | updatedCart: {},
48 | updatedCoupon: {}
49 | };
50 | },
51 |
52 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
53 | removeCoupon: async (context: Context, { currentCart, couponCode, customQuery }) => {
54 | console.log('Mocked: useCart.removeCoupon');
55 | return {
56 | updatedCart: {}
57 | };
58 | },
59 |
60 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
61 | isInCart: (context: Context, { currentCart, product }) => {
62 | console.log('Mocked: useCart.isInCart');
63 | return false;
64 | }
65 | };
66 |
67 | export const useCart = useCartFactory(params);
68 |
--------------------------------------------------------------------------------
/docs/.vuepress/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | title: 'Vue Storefront 2 for __replace_me__',
3 | base: '/',
4 | description: 'Documentation for the __replace_me__ connector for Vue Storefront 2',
5 | head: [
6 | ['link', { rel: 'icon', href: '/favicon.png' }]
7 | ],
8 | configureWebpack: (config) => {
9 | config.module.rules = config.module.rules.map(rule => ({
10 | ...rule,
11 | use: rule.use && rule.use.map(useRule => ({
12 | ...useRule,
13 | options: useRule.loader === 'url-loader' ?
14 | /**
15 | Hack for loading images properly.
16 | ref: https://github.com/vuejs/vue-loader/issues/1612#issuecomment-559366730
17 | */
18 | { ...useRule.options, esModule: false } :
19 | useRule.options
20 | }))
21 | }))
22 | },
23 | plugins: [
24 | '@vuepress/plugin-back-to-top',
25 | [
26 | '@vuepress/plugin-medium-zoom',
27 | {
28 | // This selector excludes images from the "Integrations" page
29 | selector: 'main :not(.tile-image) > img'
30 | }
31 | ],
32 | '@vuepress/active-header-links',
33 | '@vuepress/search'
34 | ],
35 | themeConfig: {
36 | repo: 'https://github.com/vuestorefront/__replace_me__',
37 | editLinks: true,
38 | docsDir: 'docs',
39 | docsBranch: 'develop',
40 | editLinkText: 'Edit this page',
41 | logo: 'https://user-images.githubusercontent.com/1626923/137092657-fb398d20-b592-4661-a1f9-4135db0b61d5.png',
42 | nav: [
43 | { text: 'Vue Storefront', link: 'https://vuestorefront.io/' },
44 | { text: 'Core Documentation', link: 'https://docs.vuestorefront.io/v2/' },
45 | // { text: 'Demo', link: '' },
46 | { text: 'GitHub', link: 'https://github.com/vuestorefront/__replace_me__'},
47 | { text: 'Roadmap', link: 'https://github.com/vuestorefront/__replace_me__'}
48 | ],
49 | sidebar: [
50 | {
51 | title: 'Essentials',
52 | collapsable: false,
53 | children: [
54 | ['/', 'Introduction'],
55 | ['/guide/getting-started', 'Getting started'],
56 | ['/guide/configuration', 'Configuration'],
57 | ['/guide/about', 'About'],
58 | ]
59 | },
60 | {
61 | title: 'Composables',
62 | path: '/composables/'
63 | },
64 | {
65 | title: 'API Client',
66 | path: '/api-client/'
67 | },
68 | ]
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/wishlistGetters.ts:
--------------------------------------------------------------------------------
1 | import {
2 | WishlistGetters,
3 | AgnosticAttribute,
4 | AgnosticPrice,
5 | AgnosticTotals
6 | } from '@vue-storefront/core';
7 | import type { Wishlist, WishlistItem } from '@vue-storefront/__replace_me__-api';
8 |
9 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
10 | function getItems(wishlist: Wishlist): WishlistItem[] {
11 | return [];
12 | }
13 |
14 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
15 | function getTotals(wishlist: Wishlist): AgnosticTotals {
16 | return {
17 | total: 10,
18 | subtotal: 10
19 | };
20 | }
21 |
22 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
23 | function getItemName(item: WishlistItem): string {
24 | return '';
25 | }
26 |
27 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
28 | function getItemImage(item: WishlistItem): string {
29 | return '';
30 | }
31 |
32 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
33 | function getItemPrice(item: WishlistItem): AgnosticPrice {
34 | return {
35 | regular: 12,
36 | special: 10
37 | };
38 | }
39 |
40 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
41 | function getItemQty(item: WishlistItem): number {
42 | return 1;
43 | }
44 |
45 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
46 | function getItemAttributes(item: WishlistItem, filters?: string[]): Record {
47 | return {
48 | color: 'red'
49 | };
50 | }
51 |
52 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
53 | function getItemSku(item: WishlistItem): string {
54 | return '';
55 | }
56 |
57 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
58 | function getShippingPrice(wishlist: Wishlist): number {
59 | return 0;
60 | }
61 |
62 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
63 | function getTotalItems(wishlist: Wishlist): number {
64 | return 1;
65 | }
66 |
67 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
68 | function getFormattedPrice(price: number): string {
69 | return '';
70 | }
71 |
72 | export const wishlistGetters: WishlistGetters = {
73 | getItems,
74 | getTotals,
75 | getItemName,
76 | getItemImage,
77 | getItemPrice,
78 | getItemQty,
79 | getItemAttributes,
80 | getShippingPrice,
81 | getItemSku,
82 | getTotalItems,
83 | getFormattedPrice
84 | };
85 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/facetGetters.ts:
--------------------------------------------------------------------------------
1 | import {
2 | FacetsGetters,
3 | FacetSearchResult,
4 | AgnosticCategoryTree,
5 | AgnosticGroupedFacet,
6 | AgnosticPagination,
7 | AgnosticSort,
8 | AgnosticBreadcrumb,
9 | AgnosticFacet
10 | } from '@vue-storefront/core';
11 | import type { Facet, FacetSearchCriteria } from '@vue-storefront/__replace_me__-api';
12 |
13 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
14 | function getAll(params: FacetSearchResult, criteria?: FacetSearchCriteria): AgnosticFacet[] {
15 | return [];
16 | }
17 |
18 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
19 | function getGrouped(params: FacetSearchResult, criteria?: FacetSearchCriteria): AgnosticGroupedFacet[] {
20 | return [];
21 | }
22 |
23 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
24 | function getSortOptions(params: FacetSearchResult): AgnosticSort {
25 | return {
26 | options: [],
27 | selected: ''
28 | };
29 | }
30 |
31 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
32 | function getCategoryTree(params: FacetSearchResult): AgnosticCategoryTree {
33 | return {
34 | label: '',
35 | slug: '',
36 | items: null,
37 | isCurrent: false,
38 | count: 0
39 | };
40 | }
41 |
42 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
43 | function getProducts(params: FacetSearchResult): any {
44 | return [
45 | {
46 | _id: 1,
47 | _description: 'Some description',
48 | _categoriesRef: [
49 | '1',
50 | '2'
51 | ],
52 | name: 'Black jacket',
53 | sku: 'black-jacket',
54 | images: [
55 | 'https://s3-eu-west-1.amazonaws.com/commercetools-maximilian/products/081223_1_large.jpg'
56 | ],
57 | price: {
58 | original: 12.34,
59 | current: 10.00
60 | }
61 | }
62 | ];
63 | }
64 |
65 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
66 | function getPagination(params: FacetSearchResult): AgnosticPagination {
67 | return {
68 | currentPage: 1,
69 | totalPages: 1,
70 | totalItems: 1,
71 | itemsPerPage: 10,
72 | pageOptions: []
73 | };
74 | }
75 |
76 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
77 | function getBreadcrumbs(params: FacetSearchResult): AgnosticBreadcrumb[] {
78 | return [];
79 | }
80 |
81 | export const facetGetters: FacetsGetters = {
82 | getSortOptions,
83 | getGrouped,
84 | getAll,
85 | getProducts,
86 | getCategoryTree,
87 | getBreadcrumbs,
88 | getPagination
89 | };
90 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/1.bug-report.yml:
--------------------------------------------------------------------------------
1 | name: "🐛 Bug report"
2 | description: Report errors or unexpected behavior
3 | labels:
4 | - bug
5 | - triage-needed
6 | title: '[Bug]: '
7 | body:
8 | - type: markdown
9 | attributes:
10 | value: |
11 | Thanks for taking the time to fill out this bug report, please make sure to [search for existing issues](https://github.com/vuestorefront/<% REPOSITORY %>/issues) before filing a new one!
12 | - type: textarea
13 | id: whattoexpect
14 | attributes:
15 | label: Expected Behavior
16 | placeholder: What were you expecting?
17 | validations:
18 | required: false
19 | - type: textarea
20 | id: whathappened
21 | attributes:
22 | label: Actual Behavior
23 | placeholder: What happened instead??
24 | validations:
25 | required: true
26 | - type: textarea
27 | id: solution
28 | attributes:
29 | label: Possible Solution
30 | description: Also, if possible provide the information on how to implement the solution.
31 | placeholder: Do you have any possible solution or fix for this bug?
32 | validations:
33 | required: false
34 | - type: textarea
35 | id: reproduce
36 | attributes:
37 | label: Steps to reproduce
38 | description: Please provide detailed instructions on how to reproduce.
39 | placeholder: How we can reproduce this bug?
40 | validations:
41 | required: false
42 | - type: input
43 | attributes:
44 | label: What version of __replace_me__ integration are you using?
45 | description: 'For example: 1.0.0'
46 | validations:
47 | required: true
48 | - type: input
49 | attributes:
50 | label: What version of Node.js are you using?
51 | description: 'For example: 14.0.0'
52 | validations:
53 | required: true
54 | - type: input
55 | attributes:
56 | label: What browser (and version) are you using?
57 | description: 'For example: Chrome, Safari'
58 | validations:
59 | required: true
60 | - type: input
61 | attributes:
62 | label: What operating system (and version) are you using?
63 | description: 'For example: macOS, Windows'
64 | validations:
65 | required: true
66 | - type: textarea
67 | id: logs
68 | attributes:
69 | label: Relevant log output
70 | description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
71 | render: shell
72 | - type: checkboxes
73 | id: terms
74 | attributes:
75 | label: Code of Conduct
76 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/vuestorefront/<% REPOSITORY %>/blob/master/CODE_OF_CONDUCT.md)
77 | options:
78 | - label: I agree to follow this project's Code of Conduct
79 | required: true
80 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/cartGetters.ts:
--------------------------------------------------------------------------------
1 | import {
2 | CartGetters,
3 | AgnosticPrice,
4 | AgnosticTotals,
5 | AgnosticCoupon,
6 | AgnosticDiscount,
7 | AgnosticAttribute
8 | } from '@vue-storefront/core';
9 | import type { Cart, CartItem } from '@vue-storefront/__replace_me__-api';
10 |
11 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
12 | function getItems(cart: Cart): CartItem[] {
13 | return [
14 | {}
15 | ];
16 | }
17 |
18 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
19 | function getItemName(item: CartItem): string {
20 | return 'Name';
21 | }
22 |
23 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
24 | function getItemImage(item: CartItem): string {
25 | return 'https://s3-eu-west-1.amazonaws.com/commercetools-maximilian/products/081223_1_large.jpg';
26 | }
27 |
28 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
29 | function getItemPrice(item: CartItem): AgnosticPrice {
30 | return {
31 | regular: 12,
32 | special: 10
33 | };
34 | }
35 |
36 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
37 | function getItemQty(item: CartItem): number {
38 | return 1;
39 | }
40 |
41 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
42 | function getItemAttributes(item: CartItem, filterByAttributeName?: Array): Record {
43 | return {
44 | color: 'red'
45 | };
46 | }
47 |
48 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
49 | function getItemSku(item: CartItem): string {
50 | return '';
51 | }
52 |
53 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
54 | function getTotals(cart: Cart): AgnosticTotals {
55 | return {
56 | total: 12,
57 | subtotal: 12,
58 | special: 10
59 | };
60 | }
61 |
62 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
63 | function getShippingPrice(cart: Cart): number {
64 | return 0;
65 | }
66 |
67 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
68 | function getTotalItems(cart: Cart): number {
69 | return 1;
70 | }
71 |
72 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
73 | function getFormattedPrice(price: number): string {
74 | return '';
75 | }
76 |
77 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
78 | function getCoupons(cart: Cart): AgnosticCoupon[] {
79 | return [];
80 | }
81 |
82 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
83 | function getDiscounts(cart: Cart): AgnosticDiscount[] {
84 | return [];
85 | }
86 |
87 | export const cartGetters: CartGetters = {
88 | getTotals,
89 | getShippingPrice,
90 | getItems,
91 | getItemName,
92 | getItemImage,
93 | getItemPrice,
94 | getItemQty,
95 | getItemAttributes,
96 | getItemSku,
97 | getFormattedPrice,
98 | getTotalItems,
99 | getCoupons,
100 | getDiscounts
101 | };
102 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ecommerce-__replace_me__-integration",
3 | "private": true,
4 | "license": "MIT",
5 | "engines": {
6 | "node": ">=14.17.x"
7 | },
8 | "scripts": {
9 | "build": "yarn build:api-client && yarn build:composables && yarn build:theme",
10 | "build:api-client": "cd packages/api-client && yarn build",
11 | "build:composables": "cd packages/composables && yarn build",
12 | "build:theme": "cd packages/theme && yarn build",
13 | "contributors:add": "all-contributors add",
14 | "contributors:generate": "all-contributors generate",
15 | "dev": "concurrently \"yarn:dev:*\"",
16 | "dev:api-client": "cd packages/api-client && yarn dev",
17 | "dev:composables": "cd packages/composables && yarn dev",
18 | "dev:theme": "cd packages/theme && yarn dev",
19 | "docs:build": "cd docs && yarn build",
20 | "docs:dev": "cd docs && yarn dev",
21 | "docs:install": "cd docs && yarn",
22 | "lint": "eslint . --ext .ts,.vue",
23 | "prepare": "[ -d '.husky' ] && (husky install && shx rm -rf .git/hooks && shx ln -s ../.husky .git/hooks) || true",
24 | "publish:api-client": "node ./scripts/publishApi.js",
25 | "publish:composables": "node ./scripts/publishComposable.js",
26 | "start": "cd packages/theme && yarn start",
27 | "test": "yarn test:api-client && yarn test:composables && yarn test:theme",
28 | "test:api-client": "cd packages/api-client && yarn test --passWithNoTests",
29 | "test:composables": "cd packages/composables && yarn test --passWithNoTests",
30 | "test:theme": "cd packages/theme && yarn test --passWithNoTests",
31 | "update:check": "ncu && lerna run update:check --stream",
32 | "update:update": "ncu -u && lerna run update:update --stream"
33 | },
34 | "devDependencies": {
35 | "@babel/core": "^7.17.5",
36 | "@commitlint/cli": "^13.2.1",
37 | "@commitlint/config-conventional": "^13.2.0",
38 | "@commitlint/config-lerna-scopes": "^13.2.0",
39 | "@types/jest": "^27.0.2",
40 | "@types/node": "^16.11.6",
41 | "@typescript-eslint/eslint-plugin": "^5.2.0",
42 | "@typescript-eslint/parser": "^5.2.0",
43 | "@vue/eslint-config-typescript": "^9.0.0",
44 | "all-contributors-cli": "^6.20.0",
45 | "commitizen": "^4.2.4",
46 | "concurrently": "^6.3.0",
47 | "esbuild": "^0.14.23",
48 | "eslint": "8.1.0",
49 | "eslint-config-standard": "^16.0.3",
50 | "eslint-plugin-import": "^2.25.2",
51 | "eslint-plugin-node": "^11.1.0",
52 | "eslint-plugin-promise": "^5.1.1",
53 | "eslint-plugin-standard": "^5.0.0",
54 | "eslint-plugin-vue": "^8.0.3",
55 | "husky": "^7.0.4",
56 | "jest": "^27.5.1",
57 | "lerna": "^4.0.0",
58 | "lint-staged": "^11.2.6",
59 | "npm-check-updates": "^11.8.5",
60 | "rimraf": "^3.0.2",
61 | "shx": "^0.3.3",
62 | "ts-jest": "^27.0.7",
63 | "tslib": "^2.3.1",
64 | "typescript": "^4.5.4",
65 | "vue-eslint-parser": "^8.0.1",
66 | "yargs": "^17.3.1"
67 | },
68 | "workspaces": [
69 | "packages/*"
70 | ]
71 | }
72 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Boilerplate for Vue Storefront 2 eCommerce integration
2 |
3 | This is a template, to use it you must rename the project changing the `{YOUR INTEGRATION NAME}` to the name of the integration you are developing. The name must be in lowercase and without any special characters.
4 |
5 | ```sh
6 | grep -rl '__replace_me__' ./ | xargs sed -i '' 's/__replace_me__/{YOUR INTEGRATION NAME}/g'
7 | ```
8 |
9 | ------
10 |
11 |
12 |

13 |
14 |
15 | ## Vue Storefront 2 integration with __replace_me__
16 |
17 | ### Stay connected
18 |
19 | [](https://github.com/vuestorefront/vue-storefront)
20 | [](https://twitter.com/vuestorefront)
21 | [](https://www.youtube.com/c/VueStorefront)
22 | [](https://discord.vuestorefront.io)
23 |
24 | To learn how to build your integration, see our [Integration guide](https://docs.vuestorefront.io/v2/integrate/integration-guide.html).
25 |
26 | ------
27 |
28 |
29 |
30 |
31 | ## How to start if you want to try out the integration
32 |
33 | ```
34 | yarn global add @vue-storefront/cli
35 | ```
36 | ```
37 | vsf init && cd && yarn && yarn dev
38 | ```
39 |
40 | ## How to start if you want to contribute?
41 |
42 | Want to contribute? Ping us on `__replace_me__` channel on [our Discord](https://discord.vuestorefront.io)!
43 |
44 | ### Requirements:
45 | - NodeJS v14 or later
46 |
47 | ### Steps
48 | 1. Fork the repo
49 | 2. Clone your fork of the repo
50 | ```
51 | example:
52 | git clone https://github.com/vuestorefront/__replace_me__.git
53 | cd __replace_me__
54 | ```
55 | 3. Run `yarn` to install dependencies
56 | 4. Build dependencies `yarn build:api-client && yarn build:composables`
57 | 5. Run `yarn dev:theme` to run theme. You can find other commands in `package.json`
58 |
59 | - If you need HMR on Api Client/Composables run `yarn dev:api-client` or `yarn dev:composables` on a separate terminal window.
60 |
61 | ## Resources
62 |
63 | - [Vue Storefront Documentation](https://docs.vuestorefront.io/v2/)
64 | - [__replace_me__ integration Documentation](https://docs.vuestorefront.io/__replace_me__)
65 | - [Community Chat](https://discord.vuestorefront.io)
66 |
67 | ## Support
68 |
69 | If you have any questions about this integration we will be happy to answer them on `__replace_me__` channel on [our Discord](discord.vuestorefront.io).
70 |
71 | ## Contributors ✨
72 |
73 |
74 |
75 |
76 |
77 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
78 |
--------------------------------------------------------------------------------
/.github/workflows/docs-deployment.yaml:
--------------------------------------------------------------------------------
1 | name: Deploy Documentation
2 | on:
3 | workflow_dispatch:
4 |
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - name: Checkout code
10 | uses: actions/checkout@v1
11 | - shell: bash
12 | run: |
13 | echo "1.0.`date +%s`" > version.txt
14 | - name: Upload version artifact
15 | uses: actions/upload-artifact@v2
16 | with:
17 | name: version
18 | path: version.txt
19 | - name: Get the version
20 | id: get_version
21 | run: echo ::set-output name=VERSION::$(cat version.txt)
22 | - name: Build and publish docker image
23 | uses: elgohr/Publish-Docker-Github-Action@master
24 | with:
25 | name: docs-storefrontcloud-io/v2-__replace_me__:${{ steps.get_version.outputs.VERSION }}
26 | registry: registry.storefrontcloud.io
27 | username: ${{ secrets.DOCS_CLOUD_USERNAME }}
28 | password: ${{ secrets.DOCS_CLOUD_PASSWORD }}
29 | workdir: .
30 | dockerfile: ./.vuestorefrontcloud/docker/docs/Dockerfile
31 | buildoptions: "--compress"
32 |
33 | deploy:
34 | runs-on: ubuntu-latest
35 | needs: build
36 | steps:
37 | - name: Download version artifact
38 | uses: actions/download-artifact@v2
39 | with:
40 | name: version
41 | - name: Get the version
42 | id: get_version
43 | run: echo ::set-output name=VERSION::$(cat version.txt)
44 | - uses: chrnorm/deployment-action@releases/v1
45 | name: Create GitHub deployment
46 | id: deployment
47 | with:
48 | token: "${{ github.token }}"
49 | target_url: https://docs.europe-west1.gcp.storefrontcloud.io/__replace_me__
50 | environment: production
51 | initial_status: in_progress
52 | - name: Deploy on docs.europe-west1.gcp.storefrontcloud.io/__replace_me__
53 | run: |
54 | if curl -s -H 'X-User-Id: ${{ secrets.DOCS_CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.DOCS_CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '{"code":"docs","region":"europe-west1.gcp","additionalApps":{"apps":[{"name":"docs-v2-__replace_me__","tag":"${{ steps.get_version.outputs.VERSION }}","image":"registry.storefrontcloud.io/docs-storefrontcloud-io/v2-__replace_me__","path":"/__replace_me__","port":"80"}]}}' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then
55 | echo "Instance updated"
56 | else
57 | echo "Something went wrong during the update process..."
58 | exit 1
59 | fi
60 | - name: Update deployment status (success)
61 | if: success()
62 | uses: chrnorm/deployment-status@releases/v1
63 | with:
64 | token: "${{ github.token }}"
65 | target_url: https://docs.europe-west1.gcp.storefrontcloud.io/__replace_me__
66 | state: "success"
67 | description: Congratulations! The deploy is done.
68 | deployment_id: ${{ steps.deployment.outputs.deployment_id }}
69 | - name: Update deployment status (failure)
70 | if: failure()
71 | uses: chrnorm/deployment-status@releases/v1
72 | with:
73 | token: "${{ github.token }}"
74 | target_url: https://docs.europe-west1.gcp.storefrontcloud.io/__replace_me__
75 | description: Unfortunately, the instance hasn't been updated.
76 | state: "failure"
77 | deployment_id: ${{ steps.deployment.outputs.deployment_id }}
78 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/userBillingGetters.ts:
--------------------------------------------------------------------------------
1 | import { UserBillingGetters } from '@vue-storefront/core';
2 | import type {
3 | UserBillingAddress as Address,
4 | UserBillingAddressItem as AddressItem,
5 | UserBillingAddressSearchCriteria
6 | } from '@vue-storefront/__replace_me__-api';
7 |
8 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
9 | function getAddresses(billing: Address, criteria?: UserBillingAddressSearchCriteria): AddressItem[] {
10 | return [];
11 | }
12 |
13 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
14 | function getDefault(billing: Address): Address {
15 | return {};
16 | }
17 |
18 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
19 | function getTotal(billing: Address): number {
20 | return 0;
21 | }
22 |
23 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
24 | function getPostCode(address: AddressItem): string {
25 | return '';
26 | }
27 |
28 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
29 | function getStreetName(address: AddressItem): string {
30 | return '';
31 | }
32 |
33 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
34 | function getStreetNumber(address: AddressItem): string | number {
35 | return '';
36 | }
37 |
38 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
39 | function getCity(address: AddressItem): string {
40 | return '';
41 | }
42 |
43 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
44 | function getFirstName(address: AddressItem): string {
45 | return '';
46 | }
47 |
48 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
49 | function getLastName(address: AddressItem): string {
50 | return '';
51 | }
52 |
53 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
54 | function getCountry(address: AddressItem): string {
55 | return '';
56 | }
57 |
58 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
59 | function getPhone(address: AddressItem): string {
60 | return '';
61 | }
62 |
63 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
64 | function getEmail(address: AddressItem): string {
65 | return '';
66 | }
67 |
68 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
69 | function getProvince(address: AddressItem): string {
70 | return '';
71 | }
72 |
73 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
74 | function getCompanyName(address: AddressItem): string {
75 | return '';
76 | }
77 |
78 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
79 | function getTaxNumber(address: AddressItem): string {
80 | return '';
81 | }
82 |
83 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
84 | function getId(address: AddressItem): string {
85 | return '';
86 | }
87 |
88 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
89 | function getApartmentNumber(address: AddressItem): string | number {
90 | return '';
91 | }
92 |
93 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
94 | function isDefault(address: AddressItem): boolean {
95 | return false;
96 | }
97 |
98 | export const userBillingGetters: UserBillingGetters = {
99 | getAddresses,
100 | getDefault,
101 | getTotal,
102 | getPostCode,
103 | getStreetName,
104 | getStreetNumber,
105 | getCity,
106 | getFirstName,
107 | getLastName,
108 | getCountry,
109 | getPhone,
110 | getEmail,
111 | getProvince,
112 | getCompanyName,
113 | getTaxNumber,
114 | getId,
115 | getApartmentNumber,
116 | isDefault
117 | };
118 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/userShippingGetters.ts:
--------------------------------------------------------------------------------
1 | import { UserShippingGetters } from '@vue-storefront/core';
2 | import type {
3 | UserShippingAddress as Address,
4 | UserShippingAddressItem as AddressItem,
5 | UserShippingAddressSearchCriteria
6 | } from '@vue-storefront/__replace_me__-api';
7 |
8 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
9 | function getAddresses(shipping: Address, criteria?: UserShippingAddressSearchCriteria): AddressItem[] {
10 | return [];
11 | }
12 |
13 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
14 | function getDefault(shipping: Address): Address {
15 | return {};
16 | }
17 |
18 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
19 | function getTotal(shipping: Address): number {
20 | return 0;
21 | }
22 |
23 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
24 | function getPostCode(address: AddressItem): string {
25 | return '';
26 | }
27 |
28 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
29 | function getStreetName(address: AddressItem): string {
30 | return '';
31 | }
32 |
33 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
34 | function getStreetNumber(address: AddressItem): string | number {
35 | return '';
36 | }
37 |
38 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
39 | function getCity(address: AddressItem): string {
40 | return '';
41 | }
42 |
43 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
44 | function getFirstName(address: AddressItem): string {
45 | return '';
46 | }
47 |
48 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
49 | function getLastName(address: AddressItem): string {
50 | return '';
51 | }
52 |
53 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
54 | function getCountry(address: AddressItem): string {
55 | return '';
56 | }
57 |
58 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
59 | function getPhone(address: AddressItem): string {
60 | return '';
61 | }
62 |
63 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
64 | function getEmail(address: AddressItem): string {
65 | return '';
66 | }
67 |
68 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
69 | function getProvince(address: AddressItem): string {
70 | return '';
71 | }
72 |
73 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
74 | function getCompanyName(address: AddressItem): string {
75 | return '';
76 | }
77 |
78 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
79 | function getTaxNumber(address: AddressItem): string {
80 | return '';
81 | }
82 |
83 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
84 | function getId(address: AddressItem): string {
85 | return '';
86 | }
87 |
88 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
89 | function getApartmentNumber(address: AddressItem): string | number {
90 | return '';
91 | }
92 |
93 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
94 | function isDefault(address: AddressItem): boolean {
95 | return false;
96 | }
97 |
98 | export const userShippingGetters: UserShippingGetters = {
99 | getAddresses,
100 | getDefault,
101 | getTotal,
102 | getPostCode,
103 | getStreetName,
104 | getStreetNumber,
105 | getCity,
106 | getFirstName,
107 | getLastName,
108 | getCountry,
109 | getPhone,
110 | getEmail,
111 | getProvince,
112 | getCompanyName,
113 | getTaxNumber,
114 | getId,
115 | getApartmentNumber,
116 | isDefault
117 | };
118 |
--------------------------------------------------------------------------------
/packages/composables/src/getters/productGetters.ts:
--------------------------------------------------------------------------------
1 | import {
2 | AgnosticMediaGalleryItem,
3 | AgnosticAttribute,
4 | AgnosticPrice,
5 | ProductGetters
6 | } from '@vue-storefront/core';
7 | import type { Product, ProductFilter } from '@vue-storefront/__replace_me__-api';
8 |
9 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
10 | function getName(product: Product): string {
11 | return 'Name';
12 | }
13 |
14 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
15 | function getSlug(product: Product): string {
16 | return 'slug';
17 | }
18 |
19 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
20 | function getPrice(product: Product): AgnosticPrice {
21 | return {
22 | regular: 0,
23 | special: 0
24 | };
25 | }
26 |
27 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
28 | function getGallery(product: Product): AgnosticMediaGalleryItem[] {
29 | return [
30 | {
31 | small: 'https://s3-eu-west-1.amazonaws.com/commercetools-maximilian/products/081223_1_large.jpg',
32 | normal: 'https://s3-eu-west-1.amazonaws.com/commercetools-maximilian/products/081223_1_large.jpg',
33 | big: 'https://s3-eu-west-1.amazonaws.com/commercetools-maximilian/products/081223_1_large.jpg'
34 | }
35 | ];
36 | }
37 |
38 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
39 | function getCoverImage(product: Product): string {
40 | return 'https://s3-eu-west-1.amazonaws.com/commercetools-maximilian/products/081223_1_large.jpg';
41 | }
42 |
43 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
44 | function getFiltered(products: Product[], filters: ProductFilter): Product[] {
45 | return [
46 | {
47 | _id: 1,
48 | _description: 'Some description',
49 | _categoriesRef: [
50 | '1',
51 | '2'
52 | ],
53 | name: 'Black jacket',
54 | sku: 'black-jacket',
55 | images: [
56 | 'https://s3-eu-west-1.amazonaws.com/commercetools-maximilian/products/081223_1_large.jpg'
57 | ],
58 | price: {
59 | original: 12.34,
60 | current: 10.00
61 | }
62 | }
63 | ];
64 | }
65 |
66 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
67 | function getAttributes(products: Product[] | Product, filterByAttributeName?: string[]): Record {
68 | return {};
69 | }
70 |
71 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
72 | function getDescription(product: Product): string {
73 | return '';
74 | }
75 |
76 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
77 | function getCategoryIds(product: Product): string[] {
78 | return [];
79 | }
80 |
81 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
82 | function getId(product: Product): string {
83 | return '1';
84 | }
85 |
86 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
87 | function getFormattedPrice(price: number): string {
88 | return '';
89 | }
90 |
91 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
92 | function getTotalReviews(product: Product): number {
93 | return 0;
94 | }
95 |
96 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
97 | function getAverageRating(product: Product): number {
98 | return 0;
99 | }
100 |
101 | export const productGetters: ProductGetters = {
102 | getName,
103 | getSlug,
104 | getPrice,
105 | getGallery,
106 | getCoverImage,
107 | getFiltered,
108 | getAttributes,
109 | getDescription,
110 | getCategoryIds,
111 | getId,
112 | getFormattedPrice,
113 | getTotalReviews,
114 | getAverageRating
115 | };
116 |
--------------------------------------------------------------------------------
/packages/theme/tests/e2e/pages/checkout.ts:
--------------------------------------------------------------------------------
1 | import { Customer } from '../types/customer';
2 | import { el } from './utils/element';
3 |
4 | class Checkout {
5 | protected step: string;
6 |
7 | get heading(): Cypress.Chainable {
8 | return cy.get(`h3:contains("${Cypress._.capitalize(this.step)}")`);
9 | }
10 |
11 | get firstName(): Cypress.Chainable {
12 | return el(`${this.step}-firstName`, 'input');
13 | }
14 |
15 | get lastName(): Cypress.Chainable {
16 | return el(`${this.step}-lastName`);
17 | }
18 |
19 | get streetName(): Cypress.Chainable {
20 | return el(`${this.step}-streetName`);
21 | }
22 |
23 | get apartment(): Cypress.Chainable {
24 | return el(`${this.step}-apartment`);
25 | }
26 |
27 | get city(): Cypress.Chainable {
28 | return el(`${this.step}-city`);
29 | }
30 |
31 | get state(): Cypress.Chainable {
32 | return el(`${this.step}-state`, 'input');
33 | }
34 |
35 | get country(): Cypress.Chainable {
36 | return el(`${this.step}-country`, 'select');
37 | }
38 |
39 | get zipcode(): Cypress.Chainable {
40 | return el(`${this.step}-zipcode`);
41 | }
42 |
43 | get phone(): Cypress.Chainable {
44 | return el(`${this.step}-phone`);
45 | }
46 |
47 | }
48 |
49 | class Shipping extends Checkout {
50 | constructor() {
51 | super();
52 | this.step = 'shipping';
53 | }
54 |
55 | get continueToBillingButton(): Cypress.Chainable {
56 | return cy.contains('Continue to billing');
57 | }
58 |
59 | get selectShippingButton(): Cypress.Chainable {
60 | return cy.contains('Select shipping method');
61 | }
62 |
63 | get shippingMethods(): Cypress.Chainable {
64 | return el('shipping-method', 'label');
65 | }
66 |
67 | public fillForm(customer: Customer) {
68 | this.firstName.type(customer.firstName);
69 | this.lastName.type(customer.lastName);
70 | this.streetName.type(customer.address.shipping.streetName);
71 | this.apartment.type(customer.address.shipping.apartment);
72 | this.city.type(customer.address.shipping.city);
73 | this.country.select(customer.address.shipping.country);
74 | this.state.type(customer.address.shipping.state);
75 | this.zipcode.type(customer.address.shipping.zipcode);
76 | this.phone.type(customer.address.shipping.phone);
77 | }
78 | }
79 |
80 | class Billing extends Checkout {
81 | constructor() {
82 | super();
83 | this.step = 'billing';
84 | }
85 |
86 | get continueToPaymentButton(): Cypress.Chainable {
87 | return cy.contains('Continue to payment');
88 | }
89 |
90 | public fillForm(customer: Customer) {
91 | this.firstName.type(customer.firstName);
92 | this.lastName.type(customer.lastName);
93 | this.streetName.type(customer.address.billing.streetName);
94 | this.apartment.type(customer.address.billing.apartment);
95 | this.city.type(customer.address.billing.city);
96 | this.country.select(customer.address.billing.country);
97 | this.state.type(customer.address.billing.state);
98 | this.zipcode.type(customer.address.billing.zipcode);
99 | this.phone.type(customer.address.billing.phone);
100 | }
101 |
102 | }
103 |
104 | class Payment {
105 | get makeAnOrderButton(): Cypress.Chainable {
106 | return cy.contains('Make an order');
107 | }
108 |
109 | get paymentMethods(): Cypress.Chainable {
110 | return el('payment-method');
111 | }
112 |
113 | get terms(): Cypress.Chainable {
114 | return el('terms', 'label');
115 | }
116 | }
117 |
118 | class ThankYou {
119 | get heading(): Cypress.Chainable {
120 | return el('thank-you-banner', 'h2');
121 | }
122 | }
123 |
124 | export {
125 | Shipping,
126 | Billing,
127 | Payment,
128 | ThankYou
129 | };
130 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "extends": [
4 | "eslint:recommended",
5 | "plugin:@typescript-eslint/eslint-recommended",
6 | "plugin:@typescript-eslint/recommended"
7 | ],
8 | "parser": "vue-eslint-parser",
9 | "parserOptions": {
10 | "parser": "@typescript-eslint/parser",
11 | "ecmaVersion": 2021,
12 | "sourceType": "module"
13 | },
14 | "plugins": ["vue", "@typescript-eslint"],
15 | "env": {
16 | "browser": true,
17 | "commonjs": true,
18 | "node": true,
19 | "jest": true
20 | },
21 | "globals": {
22 | "Promise": true,
23 | "process": true,
24 | "console": true,
25 | "Set": true,
26 | "Intl": true
27 | },
28 | "rules": {
29 | "eqeqeq": 2,
30 | "no-use-before-define": [
31 | 2,
32 | {
33 | "functions": false
34 | }
35 | ],
36 | "no-undef": 2,
37 | "no-unused-vars": 2,
38 | "brace-style": 2,
39 | "no-mixed-spaces-and-tabs": 2,
40 | "key-spacing": 2,
41 | "comma-spacing": 2,
42 | "array-bracket-spacing": 2,
43 | "space-in-parens": 2,
44 | "no-trailing-spaces": 2,
45 | "comma-dangle": 2,
46 | "comma-style": 2,
47 | "space-infix-ops": 2,
48 | "keyword-spacing": 2,
49 | "space-before-blocks": 2,
50 | "spaced-comment": 2,
51 | "no-multiple-empty-lines": [
52 | 2,
53 | {
54 | "max": 1
55 | }
56 | ],
57 | "complexity": 2,
58 | "max-depth": [
59 | 2,
60 | {
61 | "max": 3
62 | }
63 | ],
64 | "default-case": 0,
65 | "dot-notation": 2,
66 | "no-alert": 2,
67 | "no-empty-function": 0,
68 | "no-eval": 2,
69 | "no-extend-native": 2,
70 | "no-extra-bind": 2,
71 | "no-implicit-coercion": 2,
72 | "no-multi-spaces": 2,
73 | "no-useless-return": 2,
74 | "no-console": 0,
75 | "global-require": 1,
76 | "camelcase": 2,
77 | "computed-property-spacing": 2,
78 | "consistent-this": 2,
79 | "func-call-spacing": 2,
80 | "func-names": 2,
81 | "func-name-matching": 2,
82 | "func-style": [
83 | 2,
84 | "declaration",
85 | {
86 | "allowArrowFunctions": true
87 | }
88 | ],
89 | "indent": [
90 | 2,
91 | 2,
92 | {
93 | "SwitchCase": 1
94 | }
95 | ],
96 | "line-comment-position": 2,
97 | "linebreak-style": [2, "unix"],
98 | "lines-around-comment": 2,
99 | "max-statements-per-line": 2,
100 | "no-lonely-if": 2,
101 | "prefer-const": 2,
102 | "no-mixed-operators": 2,
103 | "no-multi-assign": 2,
104 | "no-unneeded-ternary": 2,
105 | "object-property-newline": [
106 | 2,
107 | {
108 | "allowAllPropertiesOnSameLine": true
109 | }
110 | ],
111 | "operator-linebreak": 2,
112 | "quote-props": [2, "as-needed"],
113 | "quotes": [2, "single"],
114 | "semi": 2,
115 | "semi-spacing": 2,
116 | "one-var": [2, "never"],
117 | "eol-last": 2,
118 | "newline-after-var": 0,
119 | "no-var": 2,
120 | "@typescript-eslint/no-empty-function": 0,
121 | "no-case-declarations": 0,
122 | "@typescript-eslint/no-var-requires": 0,
123 | "@typescript-eslint/no-explicit-any": 0,
124 | "@typescript-eslint/explicit-function-return-type": 0,
125 | "@typescript-eslint/no-unused-vars": 2,
126 | "@typescript-eslint/ban-ts-ignore": 0,
127 | "@typescript-eslint/explicit-module-boundary-types": "off"
128 | },
129 | "overrides": [
130 | {
131 | "files": "*.ts",
132 | "rules": {
133 | "no-undef": "off",
134 | "no-unused-vars": "off"
135 | }
136 | },
137 | {
138 | "files": ["*.ts", "*.tsx"],
139 | "rules": {
140 | "@typescript-eslint/explicit-module-boundary-types": ["error"]
141 | }
142 | }
143 | ]
144 | }
145 |
--------------------------------------------------------------------------------
/packages/theme/nuxt.config.js:
--------------------------------------------------------------------------------
1 | import webpack from 'webpack';
2 | import theme from './themeConfig';
3 |
4 | export default {
5 | server: {
6 | port: 3000,
7 | host: '0.0.0.0'
8 | },
9 |
10 | // Global page headers: https://go.nuxtjs.dev/config-head
11 | head: {
12 | title: 'Vue Storefront',
13 | meta: [
14 | { charset: 'utf-8' },
15 | { name: 'viewport', content: 'width=device-width, initial-scale=1' },
16 | { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
17 | ],
18 | link: [
19 | {
20 | rel: 'icon',
21 | type: 'image/x-icon',
22 | href: '/favicon.ico'
23 | },
24 | {
25 | rel: 'preconnect',
26 | href: 'https://fonts.gstatic.com',
27 | crossorigin: 'crossorigin'
28 | },
29 | {
30 | rel: 'stylesheet',
31 | href: 'https://fonts.googleapis.com/css?family=Raleway:300,400,400i,500,600,700|Roboto:300,300i,400,400i,500,700&display=swap'
32 | }
33 | ]
34 | },
35 |
36 | loading: { color: '#fff' },
37 |
38 | // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
39 | plugins: [],
40 |
41 | // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
42 | buildModules: [
43 | // to core
44 | '@nuxtjs/composition-api/module',
45 | '@nuxt/typescript-build',
46 | '@nuxtjs/style-resources',
47 | ['@vue-storefront/nuxt', {
48 | // @core-development-only-start
49 | coreDevelopment: true,
50 | // @core-development-only-end
51 | useRawSource: {
52 | dev: [
53 | '@vue-storefront/__replace_me__',
54 | '@vue-storefront/core'
55 | ],
56 | prod: [
57 | '@vue-storefront/__replace_me__',
58 | '@vue-storefront/core'
59 | ]
60 | }
61 | }],
62 | // @core-development-only-start
63 | ['@vue-storefront/nuxt-theme', {
64 | generate: {
65 | replace: {
66 | apiClient: '@vue-storefront/__replace_me__-api',
67 | composables: '@vue-storefront/__replace_me__'
68 | }
69 | }
70 | }],
71 | // @core-development-only-end
72 | /* project-only-start
73 | ['@vue-storefront/nuxt-theme'],
74 | project-only-end */
75 | ['@vue-storefront/__replace_me__/nuxt', {}]
76 | ],
77 |
78 | // Modules: https://go.nuxtjs.dev/config-modules
79 | modules: [
80 | ['nuxt-i18n', {
81 | baseUrl: process.env.BASE_URL || 'http://localhost:3000'
82 | }],
83 | 'cookie-universal-nuxt',
84 | 'vue-scrollto/nuxt',
85 | '@vue-storefront/middleware/nuxt'
86 | ],
87 |
88 | i18n: {
89 | currency: 'USD',
90 | country: 'US',
91 | countries: [
92 | { name: 'US', label: 'United States', states: ['California', 'Nevada'] },
93 | { name: 'AT', label: 'Austria' },
94 | { name: 'DE', label: 'Germany' },
95 | { name: 'NL', label: 'Netherlands' }
96 | ],
97 | currencies: [
98 | { name: 'EUR', label: 'Euro' },
99 | { name: 'USD', label: 'Dollar' }
100 | ],
101 | locales: [
102 | { code: 'en', label: 'English', file: 'en.js', iso: 'en' },
103 | { code: 'de', label: 'German', file: 'de.js', iso: 'de' }
104 | ],
105 | defaultLocale: 'en',
106 | lazy: true,
107 | seo: true,
108 | langDir: 'lang/',
109 | vueI18n: {
110 | fallbackLocale: 'en',
111 | numberFormats: {
112 | en: {
113 | currency: {
114 | style: 'currency', currency: 'USD', currencyDisplay: 'symbol'
115 | }
116 | },
117 | de: {
118 | currency: {
119 | style: 'currency', currency: 'EUR', currencyDisplay: 'symbol'
120 | }
121 | }
122 | }
123 | },
124 | detectBrowserLanguage: false
125 | },
126 |
127 | styleResources: {
128 | scss: [require.resolve('@storefront-ui/shared/styles/_helpers.scss', { paths: [process.cwd()] })]
129 | },
130 |
131 | // Build Configuration: https://go.nuxtjs.dev/config-build
132 | build: {
133 | transpile: [
134 | 'vee-validate/dist/rules'
135 | ],
136 | plugins: [
137 | new webpack.DefinePlugin({
138 | 'process.VERSION': JSON.stringify({
139 | // eslint-disable-next-line global-require
140 | version: require('./package.json').version,
141 | lastCommit: process.env.LAST_COMMIT || ''
142 | })
143 | })
144 | ]
145 | },
146 |
147 | router: {
148 | middleware: ['checkout']
149 | },
150 | publicRuntimeConfig: {
151 | theme
152 | },
153 | pwa: {
154 | meta: {
155 | theme_color: '#5ECE7B'
156 | }
157 | }
158 | };
159 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, caste, color, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | contributors@vuestorefront.io
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
120 |
121 | Community Impact Guidelines were inspired by
122 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123 |
124 | For answers to common questions about this code of conduct, see the FAQ at
125 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
126 | at [https://www.contributor-covenant.org/translations][translations].
127 |
128 | [homepage]: https://www.contributor-covenant.org
129 | [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
130 | [Mozilla CoC]: https://github.com/mozilla/diversity
131 | [FAQ]: https://www.contributor-covenant.org/faq
132 | [translations]: https://www.contributor-covenant.org/translations
133 |
--------------------------------------------------------------------------------
/packages/theme/lang/en.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export default {
4 | 'Categories': 'Categories',
5 | 'Filters': 'Filters',
6 | 'Sort by': 'Sort by',
7 | 'Products found': 'Products found',
8 | 'About us': 'About us',
9 | 'Who we are': 'Who we are',
10 | 'Quality in the details': 'Quality in the details',
11 | 'Customer Reviews': 'Customer Reviews',
12 | 'Departments': 'Departments',
13 | 'Women fashion': 'Women fashion',
14 | 'Men fashion': 'Men fashion',
15 | 'Kidswear': 'Kidswear',
16 | 'Home': 'Home',
17 | 'Help': 'Help',
18 | 'Customer service': 'Customer service',
19 | 'Size guide': 'Size guide',
20 | 'Contact us': 'Contact us',
21 | 'Payment & Delivery': 'Payment & Delivery',
22 | 'Purchase terms': 'Purchase terms',
23 | 'Guarantee': 'Guarantee',
24 | 'Description': 'Description',
25 | 'Read reviews': 'Read reviews',
26 | 'Additional Information': 'Additional Information',
27 | 'Save for later': 'Save for later',
28 | 'Add to compare': 'Add to compare',
29 | 'Match it with': 'Match it with',
30 | 'Share your look': 'Share your look',
31 | 'Product description': `The Karissa V-Neck Tee features a semi-fitted shape that's flattering for every figure. You can hit the gym with confidence while it hugs curves and hides common "problem" areas. Find stunning women's cocktail dresses and party dresses.`,
32 | 'Brand': 'Brand',
33 | 'Instruction1': 'Take care of me',
34 | 'Instruction2': 'Just here for the care instructions?',
35 | 'Instruction3': 'Yeah, we thought so',
36 | 'Items': 'Items',
37 | 'View': 'View',
38 | 'Show on page': 'Show on page',
39 | 'Done': 'Done',
40 | 'Clear all': 'Clear all',
41 | 'Empty': 'Looks like you haven’t added any items to the bag yet. Start shopping to fill it in.',
42 | 'Help & FAQs': 'Help & FAQs',
43 | 'Download': 'Download our application.',
44 | 'Find out more': 'Find out more',
45 | 'Login': 'Login',
46 | 'Forgotten password?': 'Forgotten password?',
47 | 'No account': `Don't have an account yet?`,
48 | 'Register today': 'Register today',
49 | 'Go to checkout': 'Go to checkout',
50 | 'Go back shopping': 'Go back shopping',
51 | 'Personal details': 'Personal details',
52 | 'Edit': 'Edit',
53 | 'Shipping details': 'Shipping details',
54 | 'Billing address': 'Billing address',
55 | 'Same as shipping address': 'Same as shipping address',
56 | 'Payment method': 'Payment method',
57 | 'Apply': 'Apply',
58 | 'Update password': 'Update password',
59 | 'Update personal data': 'Update personal data',
60 | 'Item': 'Item',
61 | 'Go back': 'Go back',
62 | 'Continue to shipping': 'Continue to shipping',
63 | 'I agree to': 'I agree to',
64 | 'Terms and conditions': 'Terms and conditions',
65 | 'Pay for order': 'Pay for order',
66 | 'Log into your account': 'Log into your account',
67 | 'or fill the details below': 'or fill the details below',
68 | 'Enjoy your free account': 'Enjoy these perks with your free account!',
69 | 'Continue to payment': 'Continue to payment',
70 | 'Order No.': 'Order No.',
71 | 'Successful placed order': 'You have successfully placed the order. You can check status of your order by using our delivery status feature. You will receive an order confirmation e-mail with details of your order and a link to track its progress.',
72 | 'Info after order': 'You can log to your account using e-mail and password defined earlier. On your account you can edit your profile data, check history of transactions, edit subscription to newsletter.',
73 | 'Allow order notifications': 'Allow order notifications',
74 | 'Feedback': 'Your feedback is important to us. Let us know what we could improve.',
75 | 'Send my feedback': 'Send my feedback',
76 | 'Go back to shop': 'Go back to shop',
77 | 'Read all reviews': 'Read all reviews',
78 | 'Color': 'Color',
79 | 'Contact details updated': 'Keep your addresses and contact details updated.',
80 | 'Manage billing addresses': 'Manage all the billing addresses you want (work place, home address...) This way you won"t have to enter the billing address manually with each order.',
81 | 'Change': 'Change',
82 | 'Delete': 'Delete',
83 | 'Add new address': 'Add new address',
84 | 'Set up newsletter': 'Set up your newsletter and we will send you information about new products and trends from the sections you selected every week.',
85 | 'Sections that interest you': 'Sections that interest you',
86 | 'Save changes': 'Save changes',
87 | 'Read and understand': 'I have read and understand the',
88 | 'Privacy': 'Privacy',
89 | 'Cookies Policy': 'Cookies Policy',
90 | 'Commercial information': 'and agree to receive personalized commercial information from Brand name by email',
91 | 'Feel free to edit': 'Feel free to edit any of your details below so your account is always up to date',
92 | 'Use your personal data': 'At Brand name, we attach great importance to privacy issues and are committed to protecting the personal data of our users. Learn more about how we care and use your personal data in the',
93 | 'Privacy Policy': 'Privacy Policy',
94 | 'Change password your account': 'If you want to change the password to access your account, enter the following information',
95 | 'Your current email address is': 'Your current email address is',
96 | 'Product': 'Product',
97 | 'Details and status orders': 'Check the details and status of your orders in the online store. You can also cancel your order or request a return.',
98 | 'You currently have no orders': 'You currently have no orders',
99 | 'Start shopping': 'Start shopping',
100 | 'Download': 'Download',
101 | 'Download all': 'Download all',
102 | 'View details': 'View details',
103 | 'Manage shipping addresses': 'Manage all the shipping addresses you want (work place, home address...) This way you won"t have to enter the shipping address manually with each order.',
104 | 'Quantity': 'Quantity',
105 | 'Price': 'Price',
106 | 'Back to homepage': 'Back to homepage',
107 | 'Select shipping method': 'Select shipping method',
108 | 'Review my order': 'Review my order',
109 | 'Select payment method': 'Select payment method',
110 | 'Make an order': 'Make an order',
111 | 'or': 'or',
112 | 'login in to your account': 'login in to your account',
113 | 'Create an account': 'Create an account',
114 | 'Your bag is empty': 'Your bag is empty',
115 | 'Cancel': 'Cancel',
116 | 'See all results': 'See all results',
117 | 'We haven’t found any results for given phrase': 'We haven’t found any results for given phrase',
118 | 'You haven’t searched for items yet': 'You haven’t searched for items yet.',
119 | 'Let’s start now – we’ll help you': 'Let’s start now – we’ll help you.',
120 | 'Search results': 'Search results',
121 | 'Product suggestions': 'Product suggestions',
122 | 'Search for items': 'Search for items',
123 | 'Enter promo code': 'Enter promo code',
124 | 'Shipping method': 'Shipping method',
125 | 'Continue to billing': 'Continue to billing',
126 | 'Payment methods': 'Payment methods',
127 | 'Shipping address': 'Shipping address',
128 | 'Subtotal': 'Subtotal',
129 | 'Shipping': 'Shipping',
130 | 'Total price': 'Total price',
131 | 'Payment': 'Payment',
132 | 'Order summary': 'Order summary',
133 | 'Products': 'Products',
134 | 'Total': 'Total',
135 | 'Reset Password': 'Reset Password',
136 | 'Save Password': 'Save Password',
137 | 'Back to home': 'Back to home',
138 | 'Forgot Password': 'If you can’t remember your password, you can reset it.',
139 | 'Thank You Inbox': 'If the message is not arriving in your inbox, try another email address you might’ve used to register.',
140 | 'Sign in': 'Sign in',
141 | 'Register': 'Register',
142 | 'Password Changed': 'Password successfuly changed. You can now go back to homepage and sign in.',
143 | 'Password': 'Password',
144 | 'Repeat Password': 'Repeat Password',
145 | 'Forgot Password Modal Email': 'Email you are using to sign in:',
146 | forgotPasswordConfirmation: 'Thanks! If there is an account registered with the {0} email, you will find message with a password reset link in your inbox.',
147 | subscribeToNewsletterModalContent:
148 | 'After signing up for the newsletter, you will receive special offers and messages from VSF via email. We will not sell or distribute your email to any third party at any time. Please see our {0}.',
149 | 'Subscribe': 'Subscribe',
150 | 'Subscribe to newsletter': 'Subscribe to newsletter',
151 | 'Email address': 'Email address',
152 | 'I confirm subscription': 'I confirm subscription',
153 | 'You can unsubscribe at any time': 'You can unsubscribe at any time',
154 | 'show more': 'show more',
155 | 'hide': 'hide',
156 | 'Change to grid view': 'Change to grid view',
157 | 'Change to list view': 'Change to list view'
158 | };
159 |
--------------------------------------------------------------------------------
/packages/theme/static/error/error.svg:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/packages/theme/lang/de.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export default {
4 | 'Categories': 'Kategorien',
5 | 'Filters': 'Filters',
6 | 'Sort by': 'Sortieren nach',
7 | 'Products found': 'Produkte gefunden',
8 | 'About us': 'Über uns',
9 | 'Who we are': 'Wer wir sind',
10 | 'Quality in the details': 'Qualität im Detail',
11 | 'Customer Reviews': 'Kundenbewertungen',
12 | 'Departments': 'Abteilungen',
13 | 'Women fashion': 'Damenmode',
14 | 'Men fashion': 'Herrenmode',
15 | 'Kidswear': 'Kinderkleidung',
16 | 'Home': 'Zuhause',
17 | 'Help': 'Hilfe',
18 | 'Customer service': 'Kundendienst',
19 | 'Size guide': 'Größentabelle',
20 | 'Contact us': 'Kontaktiere uns',
21 | 'Payment & Delivery': 'Zahlung & Lieferung',
22 | 'Purchase terms': 'Kaufbedingungen',
23 | 'Guarantee': 'Garantie',
24 | 'Description': 'Beschreibung',
25 | 'Read reviews': 'Bewertungen lesen',
26 | 'Additional Information': 'Zusätzliche Information',
27 | 'Save for later': 'Für später speichern',
28 | 'Add to compare': 'Hinzufügen zum vergleichen',
29 | 'Match it with': 'Kombiniere es mit',
30 | 'Share your look': 'Teile deinen Look',
31 | 'Product description': 'Das Karissa V-Neck Tee hat eine halb taillierte Form schmeichelhaft für jede Figur. Sie können mit ins Fitnessstudio gehen Vertrauen, während es Kurven umarmt und häufiges "Problem" verbirgt Bereiche. Finden Sie atemberaubende Cocktailkleider für Frauen und feiern Sie Kleider.',
32 | 'Brand': 'Marke',
33 | 'Instruction1': 'Um mich kümmern',
34 | 'Instruction2': 'Nur hier für die Pflegehinweise?',
35 | 'Instruction3': 'Ja, das haben wir uns gedacht',
36 | 'Items': 'Gegenstände',
37 | 'View': 'Ansicht',
38 | 'Show on page': 'Auf Seite anzeigen',
39 | 'Done': 'Fertig',
40 | 'Clear all': 'Alles löschen',
41 | 'Empty': 'Sieht so aus, als hätten Sie der Tasche noch keine Artikel hinzugefügt. Beginnen Sie mit dem Einkaufen, um es auszufüllen.',
42 | 'Help & FAQs': 'Hilfe & FAQs',
43 | 'Download': 'Laden Sie unsere Anwendung herunter',
44 | 'Find out more': 'Finde mehr heraus',
45 | 'Login': 'Anmeldung',
46 | 'Forgotten password?': 'Passwort vergessen?',
47 | 'No account': `Sie haben noch keinen Account?`,
48 | 'Register today': 'Melde dich noch heute an',
49 | 'Go to checkout': 'Zur Kasse gehen',
50 | 'Go back shopping': 'Zurück einkaufen',
51 | 'Personal details': 'Persönliche Daten',
52 | 'Edit': 'Bearbeiten',
53 | 'Shipping details': 'Versanddetails',
54 | 'Billing address': 'Rechnungsadresse',
55 | 'Same as shipping address': 'Wie Versandadresse',
56 | 'Payment method': 'Zahlungsmethode',
57 | 'Apply': 'Übernehmen',
58 | 'Update password': 'Passwort aktualisieren',
59 | 'Update personal data': 'Persönliche Daten aktualisieren',
60 | 'Item': 'Artikel',
61 | 'Go back': 'Go back',
62 | 'Continue to shipping': 'Weiter zum Versand',
63 | 'I agree to': 'Ich stimme zu',
64 | 'Terms and conditions': 'Allgemeine Geschäftsbedingungen',
65 | 'Pay for order': 'Für Bestellung bezahlen',
66 | 'Log into your account': 'In dein Konto einloggen',
67 | 'or fill the details below': 'oder füllen Sie die Details unten',
68 | 'Enjoy your free account': 'Enjoy these perks with your free account!',
69 | 'Continue to payment': 'Weiter zur Zahlung',
70 | 'Order No.': 'Bestellnummer',
71 | 'Successful placed order': 'Sie haben die Bestellung erfolgreich aufgegeben. Sie können den Status Ihres Bestellen Sie über unsere Lieferstatusfunktion. Sie erhalten eine Bestellung Bestätigungs-E-Mail mit Details Ihrer Bestellung und einem Link zum Verfolgen der Bestellung Fortschritt.',
72 | 'Info after order': 'Sie können sich mit E-Mail und definiertem Passwort in Ihrem Konto anmelden vorhin. Überprüfen Sie in Ihrem Konto Ihre Profildaten Transaktionsverlauf, Abonnement für Newsletter bearbeiten.',
73 | 'Allow order notifications': 'Bestellbenachrichtigungen zulassen',
74 | 'Feedback': 'Ihr Feedback ist uns wichtig. Lassen Sie uns wissen, was wir verbessern können.',
75 | 'Send my feedback': 'Senden Sie mein Feedback',
76 | 'Go back to shop': 'Zurück zum Einkaufen',
77 | 'Read all reviews': 'Alle Bewertungen lesen',
78 | 'Color': 'Farbe',
79 | 'Contact details updated': 'Halten Sie Ihre Adressen und Kontaktdaten auf dem neuesten Stand.',
80 | 'Manage billing addresses': 'Alle gewünschten Rechnungsadressen verwalten (Arbeitsplatz, Privatadresse ...) Auf diese Weise müssen Sie die Rechnungsadresse nicht bei jeder Bestellung manuell eingeben.',
81 | 'Change': 'Änderungsänderung',
82 | 'Delete': 'Löschen',
83 | 'Add new address': 'Neue Adresse hinzufügen',
84 | 'Set up newsletter': 'Richten Sie Ihren Newsletter ein und wir senden Ihnen wöchentlich Informationen zu neuen Produkten und Trends aus den von Ihnen ausgewählten Bereichen',
85 | 'Sections that interest you': 'Abschnitte, die Sie interessieren',
86 | 'Save changes': 'Änderungen speichern',
87 | 'Read and understand': 'Ich habe das gelesen und verstanden',
88 | 'Privacy': 'Datenschutz',
89 | 'Cookies Policy': 'Cookie-Richtlinie',
90 | 'Commercial information': 'und erklären sich damit einverstanden, personalisierte Handelsinformationen vom Markennamen per E-Mail zu erhalten',
91 | 'Feel free to edit': 'Fühlen Sie sich frei, Ihre unten stehenden Daten zu bearbeiten, damit Ihr Konto immer auf dem neuesten Stand ist',
92 | 'Use your personal data': 'Bei Markennamen legen wir großen Wert auf Datenschutzfragen und verpflichten uns, die persönlichen Daten unserer Benutzer zu schützen. Erfahren Sie mehr darüber, wie wir Ihre persönlichen Daten pflegen und verwenden',
93 | 'Privacy Policy': 'Datenschutzrichtlinie',
94 | 'Change password your account': 'Wenn Sie das Passwort ändern möchten, um auf Ihr Konto zuzugreifen, geben Sie die folgenden Informationen ein',
95 | 'Your current email address is': 'Ihre aktuelle E-Mail-Adresse lautet',
96 | 'Product': 'Produkt',
97 | 'Details and status orders': 'Überprüfen Sie die Details und den Status Ihrer Bestellungen im Online-Shop. Sie können Ihre Bestellung auch stornieren oder eine Rücksendung anfordern. ',
98 | 'You currently have no orders': 'Sie haben derzeit keine Bestellungen',
99 | 'Start shopping': 'Einkaufen starten',
100 | 'Download': 'Herunterladen',
101 | 'Download all': 'Alle herunterladen',
102 | 'View details': 'Details anzeigen',
103 | 'Manage shipping addresses': 'Alle gewünschten Versandadressen verwalten (Arbeitsplatz, Privatadresse ...) Auf diese Weise müssen Sie die Versandadresse nicht bei jeder Bestellung manuell eingeben.',
104 | 'Quantity': 'Menge',
105 | 'Price': 'Preis',
106 | 'Back to homepage': 'Zurück zur Homepage',
107 | 'Select shipping method': 'Versandart auswählen',
108 | 'Review my order': 'Meine Bestellung überprüfen',
109 | 'Select payment method': 'Zahlungsmethode auswählen',
110 | 'Make an order': 'Bestellung aufgeben',
111 | 'or': 'oder',
112 | 'login in to your account': 'Anmelden bei Ihrem Konto',
113 | 'Create an account': 'Konto erstellen',
114 | 'Your bag is empty': 'Ihre Tasche ist leer',
115 | 'Cancel': 'Abbrechen',
116 | 'See all results': 'Alle Ergebnisse anzeigen',
117 | 'We haven’t found any results for given phrase': 'Wir haben keine Ergebnisse für die angegebene Phrase gefunden',
118 | 'You haven’t searched for items yet': 'Sie haben noch nicht nach Artikeln gesucht.',
119 | 'Let’s start now – we’ll help you': 'Fangen wir jetzt an - wir helfen Ihnen.',
120 | 'Search results': 'Suchergebnisse',
121 | 'Product suggestions': 'Produktvorschläge',
122 | 'Search for items': 'Nach Artikeln suchen',
123 | 'Enter promo code': 'Geben Sie den Promo-Code ein',
124 | 'Shipping method': 'Versandart',
125 | 'Continue to billing': 'Weiter zur Abrechnung',
126 | 'Payment methods': 'Zahlungsmethoden',
127 | 'Shipping address': 'Lieferanschrift',
128 | 'Subtotal': 'Zwischensumme',
129 | 'Shipping': 'Versand',
130 | 'Total price': 'Gesamtpreis',
131 | 'Payment': 'Zahlung',
132 | 'Order summary': 'Bestellübersicht',
133 | 'Products': 'Produkte',
134 | 'Total': 'Gesamt',
135 | 'Reset Password': 'Passwort Zurücksetzen',
136 | 'Save Password': 'Passwort Speichern',
137 | 'Back to home': 'Zurück Zur Startseite',
138 | 'Forgot Password': 'Wenn Sie Ihr Passwort vergessen haben, können Sie es zurücksetzen.',
139 | 'Thank You Inbox': 'Wenn die Nachricht nicht in Ihrem Posteingang ankommt, versuchen Sie es mit einer anderen E-Mail-Adresse, mit der Sie sich möglicherweise registriert haben.',
140 | 'Sign in': 'Einloggen',
141 | 'Register': 'Registrieren',
142 | 'Password Changed': 'Passwort erfolgreich geändert. Sie können nun zur Startseite zurückkehren und sich anmelden.',
143 | 'Password': 'Passwort',
144 | 'Repeat Password': 'Wiederhole das Passwort',
145 | 'Forgot Password Modal Email': 'E-Mail, mit der Sie sich anmelden:',
146 | forgotPasswordConfirmation: 'Vielen Dank! Wenn ein Konto mit der E-Mail-Adresse {0} registriert ist, finden Sie in Ihrem Posteingang eine Nachricht mit einem Link zum Zurücksetzen des Passworts.',
147 | subscribeToNewsletterModalContent:
148 | 'Wenn Sie sich für den Newsletter angemeldet haben, erhalten Sie spezielle Angebote und Nachrichten von VSF per E-Mail. Wir werden Ihre E-Mail zu keinem Zeitpunkt an Dritte verkaufen oder weitergeben. Bitte beachten Sie unsere {0}.',
149 | 'Subscribe': 'Abonnieren',
150 | 'Subscribe to newsletter': 'Anmeldung zum Newsletter',
151 | 'Email address': 'E-Mail Adresse',
152 | 'I confirm subscription': 'Ich bestätige das Abonnement',
153 | 'You can unsubscribe at any time': 'Sie können sich jederzeit abmelden',
154 | 'show more': 'mehr anzeigen',
155 | 'hide': 'ausblenden',
156 | 'Change to grid view': 'Zur Rasteransicht wechseln',
157 | 'Change to list view': 'Zur Listenansicht wechseln'
158 | };
159 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | /* Visit https://aka.ms/tsconfig.json to read more about this file */
4 |
5 | /* Projects */
6 | // "incremental": true, /* Enable incremental compilation */
7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8 | // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12 |
13 | /* Language and Environment */
14 | "target": "ES2020", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15 | "lib": ["ES2020"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16 | // "jsx": "preserve", /* Specify what JSX code is generated. */
17 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
22 | // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25 |
26 | /* Modules */
27 | "module": "ES2015", /* Specify what module code is generated. */
28 | // "rootDir": "./", /* Specify the root folder within your source files. */
29 | "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
30 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
31 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
32 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
33 | // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
34 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */
35 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
36 | "resolveJsonModule": true, /* Enable importing .json files */
37 | // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */
38 |
39 | /* JavaScript Support */
40 | "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
41 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
42 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
43 |
44 | /* Emit */
45 | "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
46 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */
47 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
48 | "sourceMap": true, /* Create source map files for emitted JavaScript files. */
49 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
50 | // "outDir": "./", /* Specify an output folder for all emitted files. */
51 | // "removeComments": true, /* Disable emitting comments. */
52 | // "noEmit": true, /* Disable emitting files from a compilation. */
53 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
54 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
55 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
56 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
57 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
58 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
59 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
60 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
61 | // "newLine": "crlf", /* Set the newline character for emitting files. */
62 | // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
63 | // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
64 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
65 | // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
66 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
67 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
68 |
69 | /* Interop Constraints */
70 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
71 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
72 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
73 | "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
74 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
75 |
76 | /* Type Checking */
77 | "strict": false, /* Enable all strict type-checking options. */
78 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
79 | // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
80 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
81 | // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
82 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
83 | // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
84 | // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
85 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
86 | // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
87 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
88 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
89 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
90 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
91 | // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
92 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
93 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
94 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
95 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
96 |
97 | /* Completeness */
98 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
99 | "skipLibCheck": true /* Skip type checking all .d.ts files. */
100 | },
101 | "exclude": [
102 | "docs",
103 | "packages",
104 | "node_modules"
105 | ]
106 | }
107 |
--------------------------------------------------------------------------------
/packages/theme/static/icons/youtube.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------