@wearejh/m2-pwa-checkout 0.45.0 → 0.50.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,57 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.50.0](https://github.com/WeareJH/mage-mono/compare/v0.49.0...v0.50.0) (2026-01-14)
7
+
8
+ **Note:** Version bump only for package @wearejh/m2-pwa-checkout
9
+
10
+
11
+
12
+
13
+
14
+ # [0.49.0](https://github.com/WeareJH/mage-mono/compare/v0.48.0...v0.49.0) (2026-01-14)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **m2-pwa-adyen:** update Card & 3DSecure payment components (WOOD-3014) ([0c05135](https://github.com/WeareJH/mage-mono/commit/0c05135bcd64af7c9314a76990ca0e518698244d))
20
+
21
+
22
+
23
+
24
+
25
+ # [0.48.0](https://github.com/WeareJH/mage-mono/compare/v0.47.0...v0.48.0) (2026-01-13)
26
+
27
+ **Note:** Version bump only for package @wearejh/m2-pwa-checkout
28
+
29
+
30
+
31
+
32
+
33
+ # [0.47.0](https://github.com/WeareJH/mage-mono/compare/v0.46.0...v0.47.0) (2026-01-13)
34
+
35
+ **Note:** Version bump only for package @wearejh/m2-pwa-checkout
36
+
37
+
38
+
39
+
40
+
41
+ # [0.46.0](https://github.com/WeareJH/mage-mono/compare/v0.45.1...v0.46.0) (2026-01-13)
42
+
43
+ **Note:** Version bump only for package @wearejh/m2-pwa-checkout
44
+
45
+
46
+
47
+
48
+
49
+ ## [0.45.1](https://github.com/WeareJH/mage-mono/compare/v0.45.0...v0.45.1) (2026-01-13)
50
+
51
+ **Note:** Version bump only for package @wearejh/m2-pwa-checkout
52
+
53
+
54
+
55
+
56
+
6
57
  # [0.45.0](https://github.com/WeareJH/mage-mono/compare/v0.44.0...v0.45.0) (2026-01-08)
7
58
 
8
59
  **Note:** Version bump only for package @wearejh/m2-pwa-checkout
@@ -5,22 +5,33 @@ import classnames from 'classnames';
5
5
  // import '@reach/dialog/styles.css';
6
6
  import classes from './Modal.scss';
7
7
 
8
- type ModalProps = {
8
+ export type ModalProps = {
9
+ /**
10
+ * Always render the modal HTML even when closed.
11
+ * This is useful when the content requires mounting
12
+ * before it's visible to the user.
13
+ */
14
+ alwaysRender?: boolean;
15
+ className?: string;
16
+ id?: string;
9
17
  isOpen?: boolean;
10
18
  onDismiss();
11
19
  variant?: 'wide';
12
20
  };
13
21
 
14
22
  export const Modal: React.FC<ModalProps> = (props) => {
15
- if (!props.isOpen) return null;
23
+ if (!props.isOpen && props.alwaysRender !== true) {
24
+ return null;
25
+ }
16
26
 
17
27
  return (
18
- <Dialog aria-label="Modal">
28
+ <Dialog id={props.id} aria-label="Modal" isOpen={props.alwaysRender ? props.isOpen : undefined}>
19
29
  <DialogOverlay allowPinchZoom={true} onDismiss={props.onDismiss} className={classes.modalOverlay}>
20
30
  <DialogContent
21
31
  className={classnames({
22
32
  [classes.modalContent]: true,
23
33
  [classes.modalContentWide]: props.variant === 'wide',
34
+ [props.className || '']: !!props.className,
24
35
  })}
25
36
  aria-label="Modal Content"
26
37
  >
@@ -3,18 +3,24 @@ import React from 'react';
3
3
  import { ModalHeader } from './ModalHeader';
4
4
  import { ModalBody } from './ModalBody';
5
5
  import { ModalFooter } from './ModalFooter';
6
- import { Modal } from './Modal';
6
+ import { Modal, ModalProps } from './Modal';
7
7
 
8
- type SimpleModalProps = {
9
- dismiss();
10
- title: string;
8
+ type SimpleModalProps = Pick<ModalProps, 'className' | 'id' | 'isOpen' | 'alwaysRender'> & {
11
9
  cancelText?: string;
10
+ dismiss();
12
11
  hideModalFooter?: boolean;
12
+ title: string;
13
13
  };
14
14
 
15
15
  export const SimpleModal: React.FunctionComponent<SimpleModalProps> = (props) => {
16
16
  return (
17
- <Modal isOpen={true} onDismiss={props.dismiss}>
17
+ <Modal
18
+ alwaysRender={props.alwaysRender}
19
+ className={props.className}
20
+ id={props.id}
21
+ isOpen={props.isOpen ?? true}
22
+ onDismiss={props.dismiss}
23
+ >
18
24
  <ModalHeader title={props.title} />
19
25
  <ModalBody>{props.children}</ModalBody>
20
26
  {!props.hideModalFooter && <ModalFooter onCancel={props.dismiss} cancelText={props.cancelText} />}
@@ -94,6 +94,7 @@ export function getAjaxMethod(
94
94
  */
95
95
  const ajaxPayload = {
96
96
  billingAddress,
97
+ cartId: String(cartId),
97
98
  paymentMethod: {
98
99
  ...(pendingPayment.paymentMethod || {}),
99
100
  method: payload.method,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wearejh/m2-pwa-checkout",
3
- "version": "0.45.0",
3
+ "version": "0.50.0",
4
4
  "description": "> TODO: description",
5
5
  "author": "Shane Osbourne <shane.osbourne8@gmail.com>",
6
6
  "homepage": "",
@@ -18,15 +18,15 @@
18
18
  ],
19
19
  "scripts": {},
20
20
  "dependencies": {
21
- "@wearejh/m2-pwa-addresses": "^0.45.0",
22
- "@wearejh/m2-pwa-cart": "^0.45.0",
23
- "@wearejh/m2-pwa-engine": "^0.45.0",
24
- "@wearejh/m2-pwa-user": "^0.45.0",
25
- "@wearejh/rx-form": "^0.45.0",
26
- "@wearejh/swagger-rxjs": "^0.45.0"
21
+ "@wearejh/m2-pwa-addresses": "^0.50.0",
22
+ "@wearejh/m2-pwa-cart": "^0.50.0",
23
+ "@wearejh/m2-pwa-engine": "^0.50.0",
24
+ "@wearejh/m2-pwa-user": "^0.50.0",
25
+ "@wearejh/rx-form": "^0.50.0",
26
+ "@wearejh/swagger-rxjs": "^0.50.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@reach/dialog": "0.8.2"
30
30
  },
31
- "gitHead": "f22c9f8583c85902860ec49590cae76752f8d227"
31
+ "gitHead": "d60d77034a7a62d49b970725d8e07c6d706f1f30"
32
32
  }