@ikas/storefront 4.12.0-beta.73 → 4.12.0-beta.75

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.
@@ -1 +1 @@
1
- import*as o from"react";import{observer as r}from"mobx-react-lite";import t from"../../notification-box/index.js";import"@ikas/storefront-config";import{useTranslation as e}from"../../../../../utils/i18n.js";var i=r((function(r){r.vm;var i=r.onClose,n=e().t;return o.createElement(t,{type:"warning",content:o.createElement("div",null,n("checkout-page:errorCustomerRequired")),onClose:i})}));export{i as CustomerLoginRequiredError};
1
+ import*as o from"react";import{observer as r}from"mobx-react-lite";import t from"../../notification-box/index.js";import"@ikas/storefront-config";import{useTranslation as e}from"../../../../../utils/i18n.js";var i=r((function(r){r.vm;var i=r.onClose,n=e().t;return o.createElement(t,{type:"warning",content:o.createElement("div",null,n("checkout-page:errorCustomerRequired")),onClose:i,scrollTop:!0})}));export{i as CustomerLoginRequiredError};
@@ -5,6 +5,7 @@ declare type Props = {
5
5
  content: string | React.ReactElement;
6
6
  onClose?: () => void;
7
7
  ignoreScroll?: boolean;
8
+ scrollTop?: boolean;
8
9
  };
9
10
  declare const _default: React.FunctionComponent<Props>;
10
11
  export default _default;
@@ -1 +1 @@
1
- import*as e from"react";import{observer as t}from"mobx-react-lite";import r from"./style.module.scss.js";import s from"../svg/warning.js";import c from"../svg/cross.js";var n=t((function(t){var n=t.type,a=t.title,o=t.content,l=t.onClose,i=t.ignoreScroll,m=e.useRef(null),u=e.useMemo((function(){var e=[r.NotificationBox];switch(n){case"error":e.push(r.Error);break;case"warning":e.push(r.Warning);break;case"success":e.push(r.Success)}return e.join(" ")}),[n]);return e.useEffect((function(){if(m&&m.current){!i&&m.current.scrollIntoView();var e=document.getElementById("Checkout");e&&e.offsetWidth<1e3&&e.scrollBy(0,-48)}}),[m]),e.createElement("div",{className:u,ref:m},e.createElement("div",{className:r.Left},e.createElement(s,null)),e.createElement("div",{className:r.Center},!!a&&e.createElement("div",{className:r.Title},a),e.createElement("div",{className:r.Content},o)),l&&e.createElement("div",{className:r.Right,onClick:l},e.createElement(c,null)))}));export{n as default};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import r from"./style.module.scss.js";import s from"../svg/warning.js";import c from"../svg/cross.js";var o=t((function(t){var o=t.type,n=t.title,l=t.content,a=t.onClose,i=t.ignoreScroll,m=t.scrollTop,u=e.useRef(null),f=e.useMemo((function(){var e=[r.NotificationBox];switch(o){case"error":e.push(r.Error);break;case"warning":e.push(r.Warning);break;case"success":e.push(r.Success)}return e.join(" ")}),[o]);return e.useEffect((function(){if(u&&u.current){!i&&u.current.scrollIntoView();var e=document.getElementById("Checkout");e&&e.offsetWidth<1e3&&(m?e.scrollTo({top:0}):e.scrollBy(0,-48))}}),[u]),e.createElement("div",{className:f,ref:u},e.createElement("div",{className:r.Left},e.createElement(s,null)),e.createElement("div",{className:r.Center},!!n&&e.createElement("div",{className:r.Title},n),e.createElement("div",{className:r.Content},l)),a&&e.createElement("div",{className:r.Right,onClick:a},e.createElement(c,null)))}));export{o as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "4.12.0-beta.73",
3
+ "version": "4.12.0-beta.75",
4
4
  "description": "Storefront functionality for ikas storefront themes.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -17,11 +17,11 @@
17
17
  "build": "rm -rf build && rollup -c"
18
18
  },
19
19
  "devDependencies": {
20
- "@ikas/storefront-api": "^4.12.0-beta.73",
21
- "@ikas/storefront-config": "^4.12.0-beta.73",
22
- "@ikas/storefront-model-functions": "^4.12.0-beta.73",
23
- "@ikas/storefront-models": "^4.12.0-beta.73",
24
- "@ikas/storefront-providers": "^4.12.0-beta.73",
20
+ "@ikas/storefront-api": "^4.12.0-beta.75",
21
+ "@ikas/storefront-config": "^4.12.0-beta.75",
22
+ "@ikas/storefront-model-functions": "^4.12.0-beta.75",
23
+ "@ikas/storefront-models": "^4.12.0-beta.75",
24
+ "@ikas/storefront-providers": "^4.12.0-beta.75",
25
25
  "@ikas/localized-address": "1.0.0-beta.3",
26
26
  "@adyen/adyen-web": "^5.28.2",
27
27
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -55,11 +55,11 @@
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@ikas/localized-address": "1.0.0-beta.3",
58
- "@ikas/storefront-api": "^4.12.0-beta.73",
59
- "@ikas/storefront-config": "^4.12.0-beta.73",
60
- "@ikas/storefront-model-functions": "^4.12.0-beta.73",
61
- "@ikas/storefront-models": "^4.12.0-beta.73",
62
- "@ikas/storefront-providers": "^4.12.0-beta.73",
58
+ "@ikas/storefront-api": "^4.12.0-beta.75",
59
+ "@ikas/storefront-config": "^4.12.0-beta.75",
60
+ "@ikas/storefront-model-functions": "^4.12.0-beta.75",
61
+ "@ikas/storefront-models": "^4.12.0-beta.75",
62
+ "@ikas/storefront-providers": "^4.12.0-beta.75",
63
63
  "mobx": "^6.1.3",
64
64
  "mobx-react-lite": "^3.1.5",
65
65
  "next": "12.2.0",