@makroz/mobile 1.1.1 → 1.2.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/dist/components/MkIcons.d.ts +6 -6
- package/dist/components/MkInfiniteList.d.ts +1 -1
- package/dist/components/MkTable.d.ts +1 -1
- package/dist/components/MkWindowList.d.ts +4 -3
- package/dist/context/MkApiContext.d.ts +1 -2
- package/dist/context/MkAuthContext.d.ts +1 -1
- package/dist/context/MkConfirmContext.d.ts +1 -1
- package/dist/context/MkToastContext.d.ts +1 -1
- package/dist/hooks/useApi.d.ts +1 -1
- package/dist/hooks/useMkCrud.d.ts +1 -1
- package/dist/hooks/useMkEvent.d.ts +1 -1
- package/dist/hooks/useMkForm.d.ts +1 -1
- package/dist/hooks/useMkList.d.ts +7 -7
- package/dist/theme/MkThemeProvider.d.ts +1 -1
- package/package.json +7 -7
|
@@ -6,10 +6,10 @@ export interface MkIconProps extends SvgProps {
|
|
|
6
6
|
variant?: 'primary' | 'muted' | 'error' | string;
|
|
7
7
|
}
|
|
8
8
|
export declare const MkIconWrap: React.FC<MkIconProps>;
|
|
9
|
-
export declare const IconArrowDown: (props: MkIconProps) =>
|
|
10
|
-
export declare const IconCheck: (props: MkIconProps) =>
|
|
11
|
-
export declare const IconTrash: (props: MkIconProps) =>
|
|
12
|
-
export declare const IconEdit: (props: MkIconProps) =>
|
|
13
|
-
export declare const IconClose: (props: MkIconProps) =>
|
|
14
|
-
export declare const Icon3Dots: (props: MkIconProps) =>
|
|
9
|
+
export declare const IconArrowDown: (props: MkIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const IconCheck: (props: MkIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const IconTrash: (props: MkIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const IconEdit: (props: MkIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const IconClose: (props: MkIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const Icon3Dots: (props: MkIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
//# sourceMappingURL=MkIcons.d.ts.map
|
|
@@ -18,5 +18,5 @@ export interface MkInfiniteListProps<T> {
|
|
|
18
18
|
* Optimized for React Native using best practices:
|
|
19
19
|
* Virtualization, memory management, and Batching.
|
|
20
20
|
*/
|
|
21
|
-
export declare function MkInfiniteList<T>({ items, renderItem, loading, isRefreshing, hasMore, onLoadMore, onRefresh, emptyMessage, estimatedItemSize }: MkInfiniteListProps<T>):
|
|
21
|
+
export declare function MkInfiniteList<T>({ items, renderItem, loading, isRefreshing, hasMore, onLoadMore, onRefresh, emptyMessage, estimatedItemSize }: MkInfiniteListProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
//# sourceMappingURL=MkInfiniteList.d.ts.map
|
|
@@ -34,6 +34,6 @@ interface MkTableProps<T> {
|
|
|
34
34
|
refreshing?: boolean;
|
|
35
35
|
style?: ViewStyle;
|
|
36
36
|
}
|
|
37
|
-
export declare function MkTable<T>({ data, columns, loading, onSort, sortField, sortOrder, pagination, onPageChange, actions, onAction, emptyMessage, keyExtractor, onRefresh, refreshing, style, }: MkTableProps<T>):
|
|
37
|
+
export declare function MkTable<T>({ data, columns, loading, onSort, sortField, sortOrder, pagination, onPageChange, actions, onAction, emptyMessage, keyExtractor, onRefresh, refreshing, style, }: MkTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
38
38
|
export {};
|
|
39
39
|
//# sourceMappingURL=MkTable.d.ts.map
|
|
@@ -27,8 +27,9 @@ import type { ViewStyle } from 'react-native';
|
|
|
27
27
|
export interface MkWindowListProps<T> {
|
|
28
28
|
items: T[];
|
|
29
29
|
renderItem: (item: T, index: number) => React.ReactElement;
|
|
30
|
-
/**
|
|
31
|
-
|
|
30
|
+
/** Item height. Kept for backwards compatibility with v1 callers; v2 no longer
|
|
31
|
+
* requires it because FlashList v2 automatically handles all sizing. */
|
|
32
|
+
itemHeight?: number;
|
|
32
33
|
/** Container height — in mobile this is typically flex-auto. Can pass explicit value. */
|
|
33
34
|
containerHeight?: number;
|
|
34
35
|
/** Extra items to render outside viewport. Default 5. */
|
|
@@ -43,5 +44,5 @@ export interface MkWindowListProps<T> {
|
|
|
43
44
|
keyExtractor?: (item: T, index: number) => string;
|
|
44
45
|
style?: ViewStyle;
|
|
45
46
|
}
|
|
46
|
-
export declare function MkWindowList<T>({ items, renderItem, itemHeight, containerHeight, overscan, loading, hasMore, onLoadMore, emptyMessage, onRefresh, refreshing, keyExtractor, style, }: MkWindowListProps<T>):
|
|
47
|
+
export declare function MkWindowList<T>({ items, renderItem, itemHeight, containerHeight, overscan, loading, hasMore, onLoadMore, emptyMessage, onRefresh, refreshing, keyExtractor, style, }: MkWindowListProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
47
48
|
//# sourceMappingURL=MkWindowList.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
export interface MkApiContextType {
|
|
4
3
|
waiting: number;
|
|
5
4
|
setWaiting: (change: number, origin?: string) => void;
|
|
@@ -10,6 +9,6 @@ export declare function MkApiProvider({ children, baseUrl, initialHeaders }: {
|
|
|
10
9
|
children: ReactNode;
|
|
11
10
|
baseUrl?: string;
|
|
12
11
|
initialHeaders?: Record<string, string>;
|
|
13
|
-
}):
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export declare function useMkApiContext(): MkApiContextType;
|
|
15
14
|
//# sourceMappingURL=MkApiContext.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { MkConfirmContextValue } from '@
|
|
3
|
+
import type { MkConfirmContextValue } from '@makroz/core';
|
|
4
4
|
export declare const MkConfirmProvider: React.FC<{
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { MkToastOptions, MkToastContextValue } from '@
|
|
3
|
+
import type { MkToastOptions, MkToastContextValue } from '@makroz/core';
|
|
4
4
|
export interface MkToastProviderProps {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
/** Default position for toasts. Default: 'top-right'. */
|
package/dist/hooks/useApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MkCrudConfig, MkCrudAction, MkCrudReturn } from '@
|
|
1
|
+
import type { MkCrudConfig, MkCrudAction, MkCrudReturn } from '@makroz/core';
|
|
2
2
|
/**
|
|
3
3
|
* @module useMkCrud
|
|
4
4
|
* @description Full CRUD operations hook with form management, validation, and API integration.
|
|
@@ -26,7 +26,7 @@ export declare function useMkEvent<T = any>(eventName: string, handler?: (data:
|
|
|
26
26
|
/**
|
|
27
27
|
* Imperative event API — for use outside React components (services, callbacks).
|
|
28
28
|
* @example
|
|
29
|
-
* import { MkEventBus } from '@
|
|
29
|
+
* import { MkEventBus } from '@makroz/mobile';
|
|
30
30
|
* MkEventBus.emit('notification:received', payload);
|
|
31
31
|
*/
|
|
32
32
|
export declare const MkEventBus: {
|
|
@@ -44,18 +44,18 @@ export declare function useMkList(endpoint: string, options?: MkListOptions): {
|
|
|
44
44
|
setSort: (sort: string) => void;
|
|
45
45
|
setPerPage: (per_page: number) => void;
|
|
46
46
|
resetFilters: () => void;
|
|
47
|
-
refresh: (extraParams?: MkListParams) => Promise<import("@
|
|
47
|
+
refresh: (extraParams?: MkListParams) => Promise<import("@makroz/core").MkResponse<unknown>>;
|
|
48
48
|
/** Pagination meta from __extraData */
|
|
49
49
|
pagination: any;
|
|
50
|
-
status: import("@
|
|
50
|
+
status: import("@makroz/core").ApiStatus;
|
|
51
51
|
data: any;
|
|
52
52
|
error: any;
|
|
53
53
|
waiting: number;
|
|
54
54
|
loading: boolean;
|
|
55
|
-
get: (endpoint: string, params?: any) => Promise<import("@
|
|
56
|
-
post: (endpoint: string, body: any) => Promise<import("@
|
|
57
|
-
put: (endpoint: string, body: any) => Promise<import("@
|
|
58
|
-
delete: (endpoint: string) => Promise<import("@
|
|
59
|
-
remove: (endpoint: string) => Promise<import("@
|
|
55
|
+
get: (endpoint: string, params?: any) => Promise<import("@makroz/core").MkResponse<unknown>>;
|
|
56
|
+
post: (endpoint: string, body: any) => Promise<import("@makroz/core").MkResponse<unknown>>;
|
|
57
|
+
put: (endpoint: string, body: any) => Promise<import("@makroz/core").MkResponse<unknown>>;
|
|
58
|
+
delete: (endpoint: string) => Promise<import("@makroz/core").MkResponse<unknown>>;
|
|
59
|
+
remove: (endpoint: string) => Promise<import("@makroz/core").MkResponse<unknown>>;
|
|
60
60
|
};
|
|
61
61
|
//# sourceMappingURL=useMkList.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makroz/mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "React Native UI components and hooks for MK-Director mobile applications",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
"@react-native-async-storage/async-storage": "^3.0.2",
|
|
30
30
|
"@shopify/flash-list": "^2.0.0",
|
|
31
31
|
"react-native-svg": "^15.15.4",
|
|
32
|
-
"@makroz/core": "1.
|
|
32
|
+
"@makroz/core": "1.1.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@shopify/flash-list": ">=2.0.0",
|
|
36
36
|
"expo": "~56.0.0",
|
|
37
|
-
"expo-file-system": "~
|
|
38
|
-
"expo-notifications": "~0.
|
|
37
|
+
"expo-file-system": "~56.0.8",
|
|
38
|
+
"expo-notifications": "~56.0.18",
|
|
39
39
|
"expo-router": "~56.2.0",
|
|
40
|
-
"expo-secure-store": "~
|
|
41
|
-
"expo-sqlite": "~
|
|
42
|
-
"expo-updates": "~0.
|
|
40
|
+
"expo-secure-store": "~56.0.4",
|
|
41
|
+
"expo-sqlite": "~56.0.5",
|
|
42
|
+
"expo-updates": "~56.0.19",
|
|
43
43
|
"react": "^19.0.0",
|
|
44
44
|
"react-native": "0.85.x"
|
|
45
45
|
},
|