@pallasoft/ps-mobile-components 1.10.0 → 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.
- package/dist/components/ps-header-menu/ps-header-menu.js +2 -0
- package/dist/components/ps-search-field/ps-search-field.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/services/ps-search-field-service.d.ts +3 -0
- package/dist/services/ps-search-field-service.js +5 -0
- package/jest-setup.js +4 -0
- package/package.json +2 -2
|
@@ -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;
|
|
@@ -9,12 +9,13 @@ import { usePsFocus } from '../../hooks/use-ps-focus';
|
|
|
9
9
|
import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
|
|
10
10
|
import { PsControlStyleService } from '../../services/ps-control-style-service';
|
|
11
11
|
import { PsRippleService } from '../../services/ps-ripple-service';
|
|
12
|
+
import { PsSearchFieldService } from '../../services/ps-search-field-service';
|
|
12
13
|
import { PsIcon } from '../ps-icon/ps-icon';
|
|
13
14
|
import { PsSkeleton } from '../ps-skeleton/ps-skeleton';
|
|
14
15
|
export const PsSearchField = ({ clearLabel, isLoading = false, onChange, placeholder, value, }) => {
|
|
15
16
|
const theme = usePsMobileTheme();
|
|
16
17
|
const focus = usePsFocus();
|
|
17
|
-
if (isLoading)
|
|
18
|
+
if (PsSearchFieldService.isSkeleton(isLoading, value, focus.isFocused))
|
|
18
19
|
return _jsx(PsSkeleton, { shape: PsSkeletonShape.Control });
|
|
19
20
|
return (_jsxs(View, { style: [
|
|
20
21
|
PsControlStyleService.container(theme, {
|
package/dist/index.d.ts
CHANGED
|
@@ -188,3 +188,4 @@ export * from './interfaces/ps-infinite-data-options';
|
|
|
188
188
|
export * from './interfaces/ps-infinite-data-result';
|
|
189
189
|
export * from './interfaces/ps-infinite-data-update';
|
|
190
190
|
export * from './interfaces/ps-infinite-page';
|
|
191
|
+
export { usePsDebouncedValue } from '@pallasoft/ps-utilities/react';
|
package/dist/index.js
CHANGED
|
@@ -183,3 +183,4 @@ export * from './interfaces/ps-infinite-data-options';
|
|
|
183
183
|
export * from './interfaces/ps-infinite-data-result';
|
|
184
184
|
export * from './interfaces/ps-infinite-data-update';
|
|
185
185
|
export * from './interfaces/ps-infinite-page';
|
|
186
|
+
export { usePsDebouncedValue } from '@pallasoft/ps-utilities/react';
|
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.
|
|
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",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@pallasoft/ps-design-system": "^1.19.0",
|
|
38
38
|
"@pallasoft/ps-icons": "^1.12.0",
|
|
39
|
-
"@pallasoft/ps-utilities": "^2.
|
|
39
|
+
"@pallasoft/ps-utilities": "^2.29.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@expo/ui": "~58.0.0",
|