@wearejh/m2-pwa-user-edit 0.54.0 → 0.56.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,25 @@
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.56.0](https://github.com/WeareJH/mage-mono/compare/v0.55.0...v0.56.0) (2026-05-20)
7
+
8
+ **Note:** Version bump only for package @wearejh/m2-pwa-user-edit
9
+
10
+
11
+
12
+
13
+
14
+ # [0.55.0](https://github.com/WeareJH/mage-mono/compare/v0.54.0...v0.55.0) (2026-05-20)
15
+
16
+
17
+ ### Features
18
+
19
+ * **GQL:** Support customer features ([474bf2e](https://github.com/WeareJH/mage-mono/commit/474bf2e62fe43fe8cd08248c1ca9a0291efe2e22))
20
+
21
+
22
+
23
+
24
+
6
25
  # [0.54.0](https://github.com/WeareJH/mage-mono/compare/v0.53.0...v0.54.0) (2026-01-16)
7
26
 
8
27
  **Note:** Version bump only for package @wearejh/m2-pwa-user-edit
@@ -6,7 +6,8 @@ import { UserMsg } from '@wearejh/m2-pwa-user/lib/user.actions';
6
6
  import { catchableUnauthenticated, userData } from '@wearejh/m2-pwa-user/lib/utils/user.utils';
7
7
  import { execute } from '@wearejh/swagger-rxjs/lib/PutV1CustomersMe';
8
8
 
9
- import { Actions, EditMsg, TypeMap } from '../user-edit.register';
9
+ import { EditMsg } from '../user-edit.register';
10
+ import type { Actions, TypeMap } from '../user-edit.register';
10
11
 
11
12
  export function editEpic(action$: Observable<any>, state$: Observable<any>, deps: EpicDeps): Observable<any> {
12
13
  return action$.pipe(
@@ -6,11 +6,12 @@ import { userData } from '@wearejh/m2-pwa-user/lib/utils/user.utils';
6
6
  import { execute } from '@wearejh/swagger-rxjs/lib/PutV1CustomersMePassword';
7
7
  import { catchable } from '@wearejh/swagger-rxjs/utils/ajax-helpers';
8
8
 
9
- import { Actions, PasswordMsg, TypeMap } from '../user-password.register';
9
+ import { PasswordMsg } from '../user-password.register';
10
+ import type { PasswordActions, PasswordTypeMap } from '../user-password.register';
10
11
 
11
12
  export function passwordChange(action$: Observable<any>, state$: Observable<any>, deps: EpicDeps): Observable<any> {
12
13
  return action$.pipe(
13
- ofType<Actions, TypeMap['Password.Submit']>('Password.Submit'),
14
+ ofType<PasswordActions, PasswordTypeMap['Password.Submit']>('Password.Submit'),
14
15
  withLatestFrom(userData(state$)),
15
16
  switchMap(([{ payload }, userData]) => {
16
17
  if (!userData) {
@@ -39,7 +40,7 @@ export function passwordChange(action$: Observable<any>, state$: Observable<any>
39
40
  );
40
41
  }
41
42
 
42
- function isTest(action: TypeMap['Password.Submit']['payload']): boolean {
43
+ function isTest(action: PasswordTypeMap['Password.Submit']['payload']): boolean {
43
44
  if (action.currentPassword === '__test-error') return true;
44
45
  return false;
45
46
  }
@@ -2,7 +2,7 @@ import { useCallback, useMemo } from 'react';
2
2
  import { shallowEqual, useDispatch, useSelector } from 'react-redux';
3
3
  import { DataStatus, Message } from '@wearejh/m2-pwa-engine/lib/types';
4
4
 
5
- import { AppendState, PasswordMsg, PasswordParams } from '../user-password.register';
5
+ import { PasswordAppendState, PasswordMsg, PasswordParams } from '../user-password.register';
6
6
 
7
7
  export interface UseChangePasswordApi {
8
8
  changePassword(values: PasswordParams);
@@ -11,7 +11,7 @@ export interface UseChangePasswordApi {
11
11
  messages: Message[];
12
12
  }
13
13
 
14
- const selector = (s: AppendState) => {
14
+ const selector = (s: PasswordAppendState) => {
15
15
  return {
16
16
  messages: s['user-password'].messages,
17
17
  status: s['user-password'].status,
package/lib/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './user-edit.register';
2
+ export * from './user-password.register';
@@ -19,14 +19,14 @@ export type PasswordParams = {
19
19
  newPassword: string;
20
20
  };
21
21
 
22
- export type Messages = {
22
+ export type PasswordMessages = {
23
23
  ['Password.Submit']: PasswordParams;
24
24
  ['Password.Reset']: undefined;
25
25
  ['Password.Success']: undefined;
26
26
  ['Password.Error']: string;
27
27
  };
28
28
 
29
- export function passwordReducer(state = initialState, action: Actions): PasswordState {
29
+ export function passwordReducer(state = initialState, action: PasswordActions): PasswordState {
30
30
  switch (action.type) {
31
31
  case 'Password.Reset': {
32
32
  return { ...initialState };
@@ -48,14 +48,14 @@ export function passwordReducer(state = initialState, action: Actions): Password
48
48
  export function passwordRegister() {
49
49
  return {
50
50
  epics: [passwordChange],
51
- reducers: { [NAME]: passwordReducer },
52
- name: NAME,
51
+ reducers: { [PASSWORD_NAME]: passwordReducer },
52
+ name: PASSWORD_NAME,
53
53
  };
54
54
  }
55
55
 
56
- export const STORAGE_KEY = 'store.password';
57
- export const NAME = 'user-password';
58
- export const PasswordMsg = createMsg<Messages>();
59
- export type TypeMap = ActionMap<Messages>;
60
- export type Actions = TypeMap[keyof TypeMap];
61
- export type AppendState<T = {}> = T & { [NAME]: PasswordState };
56
+ export const PASSWORD_STORAGE_KEY = 'store.password';
57
+ export const PASSWORD_NAME = 'user-password';
58
+ export const PasswordMsg = createMsg<PasswordMessages>();
59
+ export type PasswordTypeMap = ActionMap<PasswordMessages>;
60
+ export type PasswordActions = PasswordTypeMap[keyof PasswordTypeMap];
61
+ export type PasswordAppendState<T = {}> = T & { [PASSWORD_NAME]: PasswordState };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wearejh/m2-pwa-user-edit",
3
- "version": "0.54.0",
3
+ "version": "0.56.0",
4
4
  "description": "> TODO: description",
5
5
  "author": "Shane Osbourne <shane.osbourne8@gmail.com>",
6
6
  "homepage": "",
@@ -14,9 +14,9 @@
14
14
  "test": "__tests__"
15
15
  },
16
16
  "dependencies": {
17
- "@wearejh/m2-pwa-engine": "^0.54.0",
18
- "@wearejh/m2-pwa-user": "^0.54.0",
19
- "@wearejh/swagger-rxjs": "^0.54.0"
17
+ "@wearejh/m2-pwa-engine": "^0.56.0",
18
+ "@wearejh/m2-pwa-user": "^0.56.0",
19
+ "@wearejh/swagger-rxjs": "^0.56.0"
20
20
  },
21
- "gitHead": "9e6202ca5c5756d48349c80373877e7048d1ed7f"
21
+ "gitHead": "46a0245a580739e43e75d77124a0fbec16be0aee"
22
22
  }