diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 92749b7..0e6d39f 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -18,6 +18,6 @@ module.exports = { "vue/html-self-closing": 0, "no-unused-vars": 1, "vue/order-in-components": 0, - "vue/no-deprecated-slot-attribute":0, + "vue/no-deprecated-slot-attribute": 0 } } diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index bf799c6..aaacd99 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -5,7 +5,7 @@ name: Node.js Package on: push: - tags: + tags: - v* jobs: @@ -24,7 +24,6 @@ jobs: env: NODE_AUTH_TOKEN: ${{secrets.NPM_API_TOKEN}} - gh-release: runs-on: ubuntu-latest permissions: write-all diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..4942c74 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +node_modules +dist +build +*.min.js +package-lock.json diff --git a/.prettierrc b/.prettierrc index 12b122c..6af6365 100644 --- a/.prettierrc +++ b/.prettierrc @@ -7,5 +7,6 @@ "bracketSpacing": true, "bracketSameLine": false, "arrowParens": "always", - "trailingComma": "none" + "trailingComma": "none", + "tabWidth": 2 } diff --git a/README.md b/README.md index c94ec30..482c202 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,11 @@ ### Structure -* **Main components** have to be exported in `./src/main.js`. Main Components should be in folder `./src/components`. -* **Ui Elements** for main components should be in `./src/components/ui` so everyone who contributes can see if there is an element/component already for their use. -* Components should be as small as possible to make the code easier to access and understand, thats why the directory structure has importance. -* Every logic/function according to articles/items/cart or anything else should be in the `cartStore` in `./src/stores/cart.js` - reason is as follows - all components get their data with so called props which are not "reactive" by nature. We want to trigger a rerender if we change/add/edit... items thats why anything according to that should be in the cartStore. Read the cartStore carefully and use the already existing states to grant a clean rerender/reactive process. The props all get updated as soon as the main states get updated in the `cartStore` -> rerender --> profit... + +- **Main components** have to be exported in `./src/main.js`. Main Components should be in folder `./src/components`. +- **Ui Elements** for main components should be in `./src/components/ui` so everyone who contributes can see if there is an element/component already for their use. +- Components should be as small as possible to make the code easier to access and understand, thats why the directory structure has importance. +- Every logic/function according to articles/items/cart or anything else should be in the `cartStore` in `./src/stores/cart.js` - reason is as follows - all components get their data with so called props which are not "reactive" by nature. We want to trigger a rerender if we change/add/edit... items thats why anything according to that should be in the cartStore. Read the cartStore carefully and use the already existing states to grant a clean rerender/reactive process. The props all get updated as soon as the main states get updated in the `cartStore` -> rerender --> profit... Try to understand this structure and adopt it with new components for easy implementation without much effort. diff --git a/package-lock.json b/package-lock.json index 920a5b4..dec5c5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,19 +11,19 @@ "dependencies": { "@viur/ignite": "^5.1.2", "@viur/shoelace": "^1.0.10-v2.20.0", - "@viur/vue-utils": "^3.1.4", - "@vueuse/core": "^13.1.0", + "@viur/vue-utils": "^3.1.5", + "@vueuse/core": "^13.5.0", "pinia": "^2.3.1", - "vue": "^3.5.13", - "vue-i18n": "^11.1.3", - "vue-router": "^4.5.0" + "vue": "^3.5.17", + "vue-i18n": "^11.1.10", + "vue-router": "^4.5.1" }, "devDependencies": { - "@vitejs/plugin-vue": "^5.2.3", - "postcss-custom-media": "^11.0.5", - "postcss-nesting": "^13.0.1", - "prettier": "^3.5.3", - "vite": "^6.2.6" + "@vitejs/plugin-vue": "^6.0.0", + "postcss-custom-media": "^11.0.6", + "postcss-nesting": "^13.0.2", + "prettier": "^3.6.2", + "vite": "^7.0.5" } }, "node_modules/@ampproject/remapping": { @@ -1663,12 +1663,13 @@ } }, "node_modules/@intlify/core-base": { - "version": "11.1.7", - "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-11.1.7.tgz", - "integrity": "sha512-gYiGnQeJVp3kNBeXQ73m1uFOak0ry4av8pn+IkEWigyyPWEMGzB+xFeQdmGMFn49V+oox6294oGVff8bYOhtOw==", + "version": "11.1.10", + "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-11.1.10.tgz", + "integrity": "sha512-JhRb40hD93Vk0BgMgDc/xMIFtdXPHoytzeK6VafBNOj6bb6oUZrGamXkBKecMsmGvDQQaPRGG2zpa25VCw8pyw==", + "license": "MIT", "dependencies": { - "@intlify/message-compiler": "11.1.7", - "@intlify/shared": "11.1.7" + "@intlify/message-compiler": "11.1.10", + "@intlify/shared": "11.1.10" }, "engines": { "node": ">= 16" @@ -1678,11 +1679,12 @@ } }, "node_modules/@intlify/message-compiler": { - "version": "11.1.7", - "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-11.1.7.tgz", - "integrity": "sha512-0ezkep1AT30NyuKj8QbRlmvMORCCRlOIIu9v8RNU8SwDjjTiFCZzczCORMns2mCH4HZ1nXgrfkKzYUbfjNRmng==", + "version": "11.1.10", + "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-11.1.10.tgz", + "integrity": "sha512-TABl3c8tSLWbcD+jkQTyBhrnW251dzqW39MPgEUCsd69Ua3ceoimsbIzvkcPzzZvt1QDxNkenMht+5//V3JvLQ==", + "license": "MIT", "dependencies": { - "@intlify/shared": "11.1.7", + "@intlify/shared": "11.1.10", "source-map-js": "^1.0.2" }, "engines": { @@ -1693,9 +1695,10 @@ } }, "node_modules/@intlify/shared": { - "version": "11.1.7", - "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-11.1.7.tgz", - "integrity": "sha512-4yZeMt2Aa/7n5Ehy4KalUlvt3iRLcg1tq9IBVfOgkyWFArN4oygn6WxgGIFibP3svpaH8DarbNaottq+p0gUZQ==", + "version": "11.1.10", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-11.1.10.tgz", + "integrity": "sha512-6ZW/f3Zzjxfa1Wh0tYQI5pLKUtU+SY7l70pEG+0yd0zjcsYcK0EBt6Fz30Dy0tZhEqemziQQy2aNU3GJzyrMUA==", + "license": "MIT", "engines": { "node": ">= 16" }, @@ -1836,6 +1839,13 @@ "@codemirror/view": "^6.0.0" } }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.19", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.19.tgz", + "integrity": "sha512-3FL3mnMbPu0muGOCaKAhhFEYmqv9eTfPSJRJmANrCwtgK8VuxpsZDGK+m0LYAGoyO8+0j5uRe4PeyPDK1yA/hA==", + "dev": true, + "license": "MIT" + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.44.1.tgz", @@ -2205,15 +2215,19 @@ "integrity": "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==" }, "node_modules/@vitejs/plugin-vue": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz", - "integrity": "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.0.tgz", + "integrity": "sha512-iAliE72WsdhjzTOp2DtvKThq1VBC4REhwRcaA+zPAAph6I+OQhUXv+Xu2KS7ElxYtb7Zc/3R30Hwv1DxEo7NXQ==", "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "1.0.0-beta.19" + }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^20.19.0 || >=22.12.0" }, "peerDependencies": { - "vite": "^5.0.0 || ^6.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0", "vue": "^3.2.25" } }, @@ -2262,9 +2276,9 @@ } }, "node_modules/@viur/vue-utils": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@viur/vue-utils/-/vue-utils-3.1.4.tgz", - "integrity": "sha512-NW/4fhZN01UMwOYINEL4C5tuEj+YWInV3RrarADK28xJX6UhMc6XGulEVASkTyWWOUob8R1V3CeJe/IId4cZBQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@viur/vue-utils/-/vue-utils-3.1.5.tgz", + "integrity": "sha512-59EIDB8Q3z0ai3veND1N9WSOFIy0UeT9oC7wfeJ9b1CwKjuqnLGtV9L/kKirvTfh9cPMYsyFTkzumkQX4p3oQw==", "license": "MIT", "dependencies": { "@ckeditor/ckeditor5-vue": "^7.3.0", @@ -2392,13 +2406,14 @@ "integrity": "sha512-CabR+UN630VnsJO/jHWYBC1YVXyMq94KKp6iF5MQgZJs5I8cmjw6oVMO1oDbtBkENSHSSn/UadWlW/OAgdmKrg==" }, "node_modules/@vueuse/core": { - "version": "13.4.0", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-13.4.0.tgz", - "integrity": "sha512-OnK7zW3bTq/QclEk17+vDFN3tuAm8ONb9zQUIHrYQkkFesu3WeGUx/3YzpEp+ly53IfDAT9rsYXgGW6piNZC5w==", + "version": "13.5.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-13.5.0.tgz", + "integrity": "sha512-wV7z0eUpifKmvmN78UBZX8T7lMW53Nrk6JP5+6hbzrB9+cJ3jr//hUlhl9TZO/03bUkMK6gGkQpqOPWoabr72g==", + "license": "MIT", "dependencies": { "@types/web-bluetooth": "^0.0.21", - "@vueuse/metadata": "13.4.0", - "@vueuse/shared": "13.4.0" + "@vueuse/metadata": "13.5.0", + "@vueuse/shared": "13.5.0" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -2408,17 +2423,19 @@ } }, "node_modules/@vueuse/core/node_modules/@vueuse/metadata": { - "version": "13.4.0", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-13.4.0.tgz", - "integrity": "sha512-CPDQ/IgOeWbqItg1c/pS+Ulum63MNbpJ4eecjFJqgD/JUCJ822zLfpw6M9HzSvL6wbzMieOtIAW/H8deQASKHg==", + "version": "13.5.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-13.5.0.tgz", + "integrity": "sha512-euhItU3b0SqXxSy8u1XHxUCdQ8M++bsRs+TYhOLDU/OykS7KvJnyIFfep0XM5WjIFry9uAPlVSjmVHiqeshmkw==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/core/node_modules/@vueuse/shared": { - "version": "13.4.0", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-13.4.0.tgz", - "integrity": "sha512-+AxuKbw8R1gYy5T21V5yhadeNM7rJqb4cPaRI9DdGnnNl3uqXh+unvQ3uCaA2DjYLbNr1+l7ht/B4qEsRegX6A==", + "version": "13.5.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-13.5.0.tgz", + "integrity": "sha512-K7GrQIxJ/ANtucxIXbQlUHdB0TPA8c+q5i+zbrjxuhJCnJ9GtBg75sBSnvmLSxHKPg2Yo8w62PWksl9kwH0Q8g==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/antfu" }, @@ -3163,6 +3180,7 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -3380,23 +3398,24 @@ } }, "node_modules/vite": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", - "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.0.5.tgz", + "integrity": "sha512-1mncVwJxy2C9ThLwz0+2GKZyEXuC3MyWtAAlNftlZZXZDP3AJt5FmwcMit/IGGaNZ8ZOB2BNO/HFUB+CpN0NQw==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.25.0", - "fdir": "^6.4.4", + "fdir": "^6.4.6", "picomatch": "^4.0.2", - "postcss": "^8.5.3", - "rollup": "^4.34.9", - "tinyglobby": "^0.2.13" + "postcss": "^8.5.6", + "rollup": "^4.40.0", + "tinyglobby": "^0.2.14" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + "node": "^20.19.0 || >=22.12.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -3405,14 +3424,14 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", - "less": "*", + "less": "^4.0.0", "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" @@ -3515,12 +3534,13 @@ } }, "node_modules/vue-i18n": { - "version": "11.1.7", - "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-11.1.7.tgz", - "integrity": "sha512-CDrU7Cmyh1AxJjerQmipV9nVa//exVBdhTcWGlbfcDCN8bKp/uAe7Le6IoN4//5emIikbsSKe9Uofmf/xXkhOA==", + "version": "11.1.10", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-11.1.10.tgz", + "integrity": "sha512-C+IwnSg8QDSOAox0gdFYP5tsKLx5jNWxiawNoiNB/Tw4CReXmM1VJMXbduhbrEzAFLhreqzfDocuSVjGbxQrag==", + "license": "MIT", "dependencies": { - "@intlify/core-base": "11.1.7", - "@intlify/shared": "11.1.7", + "@intlify/core-base": "11.1.10", + "@intlify/shared": "11.1.10", "@vue/devtools-api": "^6.5.0" }, "engines": { diff --git a/package.json b/package.json index f24df98..8c15b67 100644 --- a/package.json +++ b/package.json @@ -20,23 +20,25 @@ "main": "src/main.js", "scripts": { "build": "vite build", - "watch": "vite build --watch" + "watch": "vite build --watch", + "format": "prettier --write .", + "format:check": "prettier --check ." }, "dependencies": { "@viur/ignite": "^5.1.2", "@viur/shoelace": "^1.0.10-v2.20.0", - "@viur/vue-utils": "^3.1.4", - "@vueuse/core": "^13.1.0", + "@viur/vue-utils": "^3.1.5", + "@vueuse/core": "^13.5.0", "pinia": "^2.3.1", - "vue": "^3.5.13", - "vue-i18n": "^11.1.3", - "vue-router": "^4.5.0" + "vue": "^3.5.17", + "vue-i18n": "^11.1.10", + "vue-router": "^4.5.1" }, "devDependencies": { - "@vitejs/plugin-vue": "^5.2.3", - "postcss-custom-media": "^11.0.5", - "postcss-nesting": "^13.0.1", - "prettier": "^3.5.3", - "vite": "^6.2.6" + "@vitejs/plugin-vue": "^6.0.0", + "postcss-custom-media": "^11.0.6", + "postcss-nesting": "^13.0.2", + "prettier": "^3.6.2", + "vite": "^7.0.5" } } diff --git a/src/Shop.vue b/src/Shop.vue index 3880aaf..6a27a2b 100644 --- a/src/Shop.vue +++ b/src/Shop.vue @@ -1,161 +1,166 @@ - diff --git a/src/ShopOrderStepper.vue b/src/ShopOrderStepper.vue index d20efd5..7eec500 100644 --- a/src/ShopOrderStepper.vue +++ b/src/ShopOrderStepper.vue @@ -1,105 +1,132 @@