@viur/shop-components 0.0.1-dev.6 → 0.0.1-dev.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/.editorconfig +16 -0
  2. package/.github/workflows/npm-publish.yml +42 -0
  3. package/.gitmodules +3 -0
  4. package/LICENSE +21 -0
  5. package/README.md +13 -2
  6. package/old/client/HttpClient.js +111 -0
  7. package/old/client/ViURShopClient.js +472 -0
  8. package/old/client/index.js +23 -0
  9. package/old/client/types.js +10 -0
  10. package/old/components/ExampleUsage.vue +95 -0
  11. package/old/components/ShopCart.vue +91 -0
  12. package/old/components/ShopOrderComplete.vue +73 -0
  13. package/old/components/ShopOrderConfirm.vue +311 -0
  14. package/old/components/ShopOrderStepper.vue +352 -0
  15. package/old/components/ShopPaymentProvider.vue +113 -0
  16. package/old/components/ShopShippingMethod.vue +52 -0
  17. package/old/components/ShopSummary.vue +138 -0
  18. package/old/components/ShopUserData.vue +218 -0
  19. package/old/components/cart/CartLeaf.vue +277 -0
  20. package/old/components/cart/CartLeafModel.vue +312 -0
  21. package/old/components/cart/CartNode.vue +26 -0
  22. package/old/components/cart/CartTree.vue +67 -0
  23. package/old/components/cart/CartTreeWrapper.vue +73 -0
  24. package/old/components/cart/CartView.vue +82 -0
  25. package/old/components/cart/Discount.vue +91 -0
  26. package/old/components/generic/loadinghandler.vue +76 -0
  27. package/old/components/paymentProvider/paypalplus.vue +0 -0
  28. package/old/components/paymentProvider/prepayment.vue +0 -0
  29. package/old/components/paymentProvider/unzerPayment.vue +140 -0
  30. package/old/components/simple/ShopUserData.vue +161 -0
  31. package/old/components/simple/SimpleDefaultLayout.vue +116 -0
  32. package/old/components/ui/generic/CardSelector.vue +52 -0
  33. package/old/components/ui/generic/CartList.vue +69 -0
  34. package/old/components/ui/generic/ShippingInfo.vue +56 -0
  35. package/old/components/ui/generic/ShopPriceFormatter.vue +41 -0
  36. package/old/components/ui/generic/alerts/ShopAlert.vue +30 -0
  37. package/old/components/ui/payment/PaymentOption.vue +79 -0
  38. package/old/components/ui/payment/PaymentSelector.vue +158 -0
  39. package/old/components/ui/stepper/StepperItem.vue +90 -0
  40. package/old/components/ui/stepper/StepperTab.vue +161 -0
  41. package/old/components/ui/stepper/StepperTrigger.vue +69 -0
  42. package/old/components/ui/userdata/AddForm.vue +160 -0
  43. package/old/components/ui/userdata/AddressBox.vue +137 -0
  44. package/old/components/ui/userdata/BaseLayout.vue +77 -0
  45. package/old/components/ui/userdata/CustomBooleanBone.vue +58 -0
  46. package/old/components/ui/userdata/CustomSelectBone.vue +91 -0
  47. package/old/components/ui/userdata/CustomStringBone.vue +71 -0
  48. package/old/components/ui/userdata/DefaultLayout.vue +126 -0
  49. package/old/components/ui/userdata/SelectAddress.vue +21 -0
  50. package/old/components/ui/userdata/multi/ActionBar.vue +38 -0
  51. package/old/components/ui/userdata/multi/CartSelection.vue +42 -0
  52. package/old/ignite/.editorconfig +20 -0
  53. package/old/ignite/.github/workflows/ignite.yml +64 -0
  54. package/old/ignite/.github/workflows/node.yml +30 -0
  55. package/old/ignite/.postcssrc.cjs +25 -0
  56. package/old/ignite/CHANGELOG.md +244 -0
  57. package/old/ignite/LICENSE +21 -0
  58. package/old/ignite/README.md +92 -0
  59. package/old/ignite/dist/ignite.css +2019 -0
  60. package/old/ignite/dist/ignite.min.css +4 -0
  61. package/old/ignite/foundation/basic.css +371 -0
  62. package/old/ignite/foundation/color.css +323 -0
  63. package/old/ignite/foundation/config.css +188 -0
  64. package/old/ignite/foundation/grid.css +78 -0
  65. package/old/ignite/foundation/mediaqueries.css +71 -0
  66. package/old/ignite/foundation/reset.css +261 -0
  67. package/old/ignite/ignite.css +29 -0
  68. package/old/ignite/ignite.css.map +1 -0
  69. package/old/ignite/package-lock.json +5530 -0
  70. package/old/ignite/package.json +58 -0
  71. package/old/ignite/shoelace.css +19 -0
  72. package/old/ignite/themes/dark.css +12 -0
  73. package/old/ignite/themes/light.css +11 -0
  74. package/old/ignite/utilities/shoelace.css +537 -0
  75. package/old/ignite/utilities/utilities.css +24 -0
  76. package/old/stores/address.js +122 -0
  77. package/old/stores/cart.js +266 -0
  78. package/old/stores/message.js +21 -0
  79. package/old/stores/order.js +202 -0
  80. package/old/stores/payment.js +79 -0
  81. package/old/stores/shipping.js +78 -0
  82. package/package.json +23 -23
  83. package/src/Shop.vue +212 -0
  84. package/src/ShopOrderStepper.vue +89 -0
  85. package/src/ShopSummary.vue +170 -0
  86. package/src/Steps/ShopCart.vue +60 -0
  87. package/src/Steps/ShopOrderComplete.vue +24 -0
  88. package/src/Steps/ShopOrderConfirm.vue +295 -0
  89. package/src/Steps/ShopPaymentProvider.vue +53 -0
  90. package/src/Steps/ShopShippingMethod.vue +53 -0
  91. package/src/Steps/ShopUserDataGuest.vue +78 -0
  92. package/src/Steps/index.js +15 -0
  93. package/src/components/AddressForm.vue +84 -0
  94. package/src/components/AddressFormLayout.vue +107 -0
  95. package/src/components/CardSelector.vue +68 -0
  96. package/src/components/CartItem.vue +325 -0
  97. package/src/components/CartItemSmall.vue +257 -0
  98. package/src/components/LoadingHandler.vue +76 -0
  99. package/src/components/PaymentOption.vue +78 -0
  100. package/src/components/PaymentProviderUnzer.vue +201 -0
  101. package/src/components/PaymentSelector.vue +55 -0
  102. package/src/components/ShopAlert.vue +30 -0
  103. package/src/components/StepperTab.vue +132 -0
  104. package/src/components/dialogButton.vue +49 -0
  105. package/src/composables/address.js +95 -0
  106. package/src/composables/cart.js +132 -0
  107. package/src/composables/order.js +80 -0
  108. package/src/composables/payment.js +75 -0
  109. package/src/composables/shipping.js +32 -0
  110. package/src/main.js +44 -0
  111. package/src/shop.js +251 -0
  112. package/src/translations/de.js +15 -0
  113. package/src/translations/en.js +5 -0
  114. package/src/utils.js +49 -0
  115. package/vite.config.js +51 -0
  116. package/src/components/cart/CartView.vue +0 -692
  117. package/src/components/cart/ConfirmView.vue +0 -314
  118. package/src/components/order/category/CategoryList.vue +0 -83
  119. package/src/components/order/category/CategoryView.vue +0 -143
  120. package/src/components/order/information/UserInfoMulti.vue +0 -427
  121. package/src/components/order/information/UserInformation.vue +0 -332
  122. package/src/components/order/information/adress/ShippingAdress.vue +0 -143
  123. package/src/components/order/item/ItemCard.vue +0 -168
  124. package/src/components/order/item/ItemView.vue +0 -233
  125. package/src/components/order/process/ExampleUsage.vue +0 -100
  126. package/src/components/order/process/OrderComplete.vue +0 -41
  127. package/src/components/order/process/OrderTabHeader.vue +0 -7
  128. package/src/components/order/process/OrderView.vue +0 -210
  129. package/src/router/index.js +0 -103
  130. package/src/stores/cart.js +0 -111
  131. package/src/views/ViewMissing.vue +0 -20
@@ -1,111 +0,0 @@
1
- import { reactive } from "vue";
2
- import { Request, ListRequest } from "@viur/vue-utils";
3
- import { defineStore } from "pinia";
4
- import { ViURShopClient } from "@viur/viur-shop-client";
5
-
6
- export const useCartStore = defineStore("cartstore", () => {
7
- const shopClient = new ViURShopClient({
8
- host_url: window.location.origin === "http://localhost:8081"
9
- ? "http://localhost:8080"
10
- : window.location.origin,
11
- });
12
-
13
- const state = reactive({
14
- basket: "",
15
- carts: {},
16
- structure: { address: {}, cart: {} },
17
- });
18
-
19
- async function init() {
20
- await getCarts();
21
- }
22
-
23
- async function getCarts() {
24
- let carts = await shopClient.cart_list();
25
- carts.forEach(async (cart) => {
26
- state.carts[cart.key] = {};
27
- state.carts[cart.key].info = cart;
28
- if (cart.cart_type === "basket") {
29
- state.basket = cart.key;
30
- }
31
- await getCartItems(cart.key);
32
- });
33
- }
34
-
35
- async function getCartItems(cartKey) {
36
- let cartItems = await shopClient.cart_list({ cart_key: cartKey });
37
- state.carts[cartKey].items = cartItems;
38
- }
39
-
40
- async function addToCart(articleKey, cartKey) {
41
- let resp = await shopClient.article_add({
42
- article_key: articleKey,
43
- parent_cart_key: cartKey,
44
- });
45
-
46
- await updateCart(cartKey);
47
- console.log("addToCart", resp); //TODO: Errorhandling as soon as shop module works again
48
- }
49
-
50
- async function getArticleView(articleKey, cartKey) {
51
- let article = await shopClient.article_view({
52
- article_key: articleKey,
53
- parent_cart_key: cartKey,
54
- });
55
-
56
- console.log("getArticleView", article); // ? Talk about necessarity
57
- }
58
-
59
- async function removeItem(articleKey, cartKey) {
60
- let resp = await shopClient.article_remove({
61
- article_key: articleKey,
62
- parent_cart_key: cartKey,
63
- });
64
-
65
- await updateCart(cartKey);
66
-
67
- console.log("remove Resp", resp); //TODO: Errorhandling as soon as shop module works again
68
- }
69
-
70
- async function updateItem(articleKey, cartKey, quantity) {
71
- let resp = await shopClient.article_update({
72
- article_key: articleKey,
73
- parent_cart_key: cartKey,
74
- quantity: quantity,
75
- quantity_mode: "replace",
76
- });
77
-
78
- if (quantity === 0) {
79
- await updateCart(cartKey);
80
- }
81
- console.log("update Resp", resp); //TODO: Errorhandling as soon as shop module works again
82
- }
83
-
84
- async function updateCart(cartKey) {
85
- await getCartItems(cartKey);
86
- }
87
-
88
- async function getAdressStructure() {
89
- let addSkel = await shopClient.address_structure()
90
- state.structure.address = addSkel.addSkel
91
-
92
- console.log("adress add", state.structure.address);
93
-
94
- // Request.getStructure("shop.address").then(async (resp) => {
95
- // let data = await resp.json();
96
- // state.structure.address = data.addSkel;
97
-
98
- // console.log("adress add", state.structure.address);
99
- // });
100
- }
101
-
102
- return {
103
- state,
104
- addToCart,
105
- getArticleView,
106
- removeItem,
107
- updateItem,
108
- init,
109
- getAdressStructure,
110
- };
111
- });
@@ -1,20 +0,0 @@
1
- <template>
2
- <div class="home">View {{ route.path }} is missing.</div>
3
- </template>
4
-
5
- <script>
6
- import { defineComponent, reactive } from "vue"
7
- import { useRoute } from "vue-router"
8
-
9
- export default defineComponent({
10
- props: {},
11
- components: {},
12
- setup(props, context) {
13
- const route = useRoute()
14
- const state = reactive({})
15
- return { state, route }
16
- }
17
- })
18
- </script>
19
-
20
- <style scoped></style>