@pallasoft/ps-mobile-components 1.10.1 → 1.10.2

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.
@@ -5,6 +5,8 @@ import { usePsHaptics } from '../../hooks/use-ps-haptics';
5
5
  import { PsActionMenuService } from '../../services/ps-action-menu-service';
6
6
  export const PsHeaderMenu = ({ iconKey = PsMobileIconKey.More, items, label, }) => {
7
7
  const haptic = usePsHaptics();
8
+ if (items.length === 0)
9
+ return null;
8
10
  const entries = PsActionMenuService.consistent([{ id: 'items', items }])[0];
9
11
  if (entries === undefined)
10
12
  return null;
package/jest-setup.js CHANGED
@@ -103,6 +103,10 @@ jest.mock('expo-router', () => {
103
103
  Stack.Toolbar.Button = ({ children, disabled, onPress }) =>
104
104
  React.createElement(View, { accessibilityLabel: children, disabled, onPress });
105
105
  Stack.Toolbar.Spacer = () => null;
106
+ Stack.Toolbar.Menu = ({ accessibilityLabel, children }) =>
107
+ React.createElement(View, { accessibilityLabel, testID: 'stack-toolbar-menu' }, children);
108
+ Stack.Toolbar.MenuAction = ({ children, onPress }) =>
109
+ React.createElement(View, { accessibilityLabel: children, onPress });
106
110
 
107
111
  const ThemeProvider = ({ children }) => React.createElement(React.Fragment, null, children);
108
112
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pallasoft/ps-mobile-components",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
4
4
  "private": false,
5
5
  "description": "Native iOS (SwiftUI) and Android (Jetpack Compose) Ps components for Pallasoft mobile apps",
6
6
  "main": "./dist/index.js",