@pallasoft/ps-mobile-components 1.10.0 → 1.10.1

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.
@@ -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';
@@ -0,0 +1,3 @@
1
+ export declare class PsSearchFieldService {
2
+ static isSkeleton(isLoading: boolean, value: string, isFocused: boolean): boolean;
3
+ }
@@ -0,0 +1,5 @@
1
+ export class PsSearchFieldService {
2
+ static isSkeleton(isLoading, value, isFocused) {
3
+ return isLoading && value === '' && !isFocused;
4
+ }
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pallasoft/ps-mobile-components",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
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.28.0"
39
+ "@pallasoft/ps-utilities": "^2.29.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@expo/ui": "~58.0.0",