@plentymarkets/shop-core 1.9.2 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shop-core",
3
3
  "configKey": "shopCore",
4
- "version": "1.9.2",
4
+ "version": "1.9.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -10,11 +10,25 @@ export const useHandleError = (error) => {
10
10
  if (error instanceof ApiError) {
11
11
  const translationKey = `storefrontError.${error.key}`;
12
12
  const message = error.key && $i18n.te(translationKey) ? $i18n.t(translationKey) : error.message;
13
- send({
14
- type,
15
- message,
16
- persist
17
- });
13
+ if (error.key === "security.invalidCsrfToken") {
14
+ send({
15
+ type,
16
+ message,
17
+ persist,
18
+ action: {
19
+ text: $i18n.t("reloadPage"),
20
+ onClick: () => {
21
+ window.location.reload();
22
+ }
23
+ }
24
+ });
25
+ } else {
26
+ send({
27
+ type,
28
+ message,
29
+ persist
30
+ });
31
+ }
18
32
  } else {
19
33
  const message = $i18n.t("storefrontError.unknownError");
20
34
  send({
@@ -7,6 +7,7 @@ export const useNotification = () => {
7
7
  data: []
8
8
  }));
9
9
  const send = (notification) => {
10
+ if (import.meta.server) return;
10
11
  const id = Symbol();
11
12
  const dismiss = () => {
12
13
  const index = state.value.data.findIndex((notification2) => notification2.id === id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plentymarkets/shop-core",
3
- "version": "1.9.2",
3
+ "version": "1.9.4",
4
4
  "description": "Core module for PlentyONE Shop",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,7 +42,7 @@
42
42
  "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
43
43
  },
44
44
  "dependencies": {
45
- "@plentymarkets/shop-api": "^0.132.0",
45
+ "@plentymarkets/shop-api": "^0.133.0",
46
46
  "@vue-storefront/sdk": "^3.4.1",
47
47
  "js-sha256": "^0.11.0",
48
48
  "resolve": "^1.22.10"