@umituz/react-native-ai-generation-content 1.12.41 → 1.12.43
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/package.json +6 -2
- package/src/domains/creations/domain/value-objects/CreationsConfig.ts +2 -0
- package/src/domains/creations/domain/value-objects/index.ts +0 -1
- package/src/domains/creations/index.ts +0 -1
- package/src/domains/creations/presentation/components/GalleryHeader.tsx +27 -23
- package/src/domains/creations/presentation/screens/CreationsGalleryScreen.tsx +3 -1
- package/src/infrastructure/utils/status-checker.util.ts +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.43",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -71,7 +71,9 @@
|
|
|
71
71
|
"@umituz/react-native-firebase": "^1.13.20",
|
|
72
72
|
"@umituz/react-native-haptics": "^1.0.2",
|
|
73
73
|
"@umituz/react-native-image": "*",
|
|
74
|
+
"@umituz/react-native-localization": "^3.5.36",
|
|
74
75
|
"@umituz/react-native-offline": "*",
|
|
76
|
+
"@umituz/react-native-storage": "^2.4.5",
|
|
75
77
|
"@umituz/react-native-timezone": "^1.3.4",
|
|
76
78
|
"@umituz/react-native-uuid": "*",
|
|
77
79
|
"eslint": "^8.57.0",
|
|
@@ -86,7 +88,9 @@
|
|
|
86
88
|
"expo-localization": "^17.0.8",
|
|
87
89
|
"expo-sharing": "^14.0.8",
|
|
88
90
|
"firebase": "^11.1.0",
|
|
91
|
+
"i18next": "^25.7.3",
|
|
89
92
|
"react": "19.1.0",
|
|
93
|
+
"react-i18next": "^16.5.0",
|
|
90
94
|
"react-native": "0.81.5",
|
|
91
95
|
"react-native-gesture-handler": "^2.30.0",
|
|
92
96
|
"react-native-reanimated": "^4.2.1",
|
|
@@ -98,4 +102,4 @@
|
|
|
98
102
|
"publishConfig": {
|
|
99
103
|
"access": "public"
|
|
100
104
|
}
|
|
101
|
-
}
|
|
105
|
+
}
|
|
@@ -36,6 +36,7 @@ export interface CreationsConfig {
|
|
|
36
36
|
readonly types: readonly CreationType[];
|
|
37
37
|
readonly filterCategories?: readonly FilterCategory[];
|
|
38
38
|
readonly translations: CreationsTranslations;
|
|
39
|
+
readonly showFilter?: boolean;
|
|
39
40
|
readonly maxThumbnails?: number;
|
|
40
41
|
readonly gridColumns?: number;
|
|
41
42
|
readonly documentMapper?: DocumentMapper;
|
|
@@ -58,6 +59,7 @@ export const DEFAULT_CONFIG: CreationsConfig = {
|
|
|
58
59
|
collectionName: "creations",
|
|
59
60
|
types: [],
|
|
60
61
|
translations: DEFAULT_TRANSLATIONS,
|
|
62
|
+
showFilter: true,
|
|
61
63
|
maxThumbnails: 4,
|
|
62
64
|
gridColumns: 2,
|
|
63
65
|
};
|
|
@@ -10,6 +10,7 @@ interface GalleryHeaderProps {
|
|
|
10
10
|
readonly countLabel: string;
|
|
11
11
|
readonly isFiltered: boolean;
|
|
12
12
|
readonly onFilterPress: () => void;
|
|
13
|
+
readonly showFilter?: boolean;
|
|
13
14
|
readonly filterLabel?: string;
|
|
14
15
|
readonly filterIcon?: string;
|
|
15
16
|
readonly style?: ViewStyle;
|
|
@@ -21,6 +22,7 @@ export const GalleryHeader: React.FC<GalleryHeaderProps> = ({
|
|
|
21
22
|
countLabel,
|
|
22
23
|
isFiltered,
|
|
23
24
|
onFilterPress,
|
|
25
|
+
showFilter = true,
|
|
24
26
|
filterLabel = 'Filter',
|
|
25
27
|
filterIcon = 'filter-outline',
|
|
26
28
|
style,
|
|
@@ -36,29 +38,31 @@ export const GalleryHeader: React.FC<GalleryHeaderProps> = ({
|
|
|
36
38
|
{count} {countLabel}
|
|
37
39
|
</AtomicText>
|
|
38
40
|
</View>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
41
|
+
{showFilter && (
|
|
42
|
+
<TouchableOpacity
|
|
43
|
+
onPress={() => {
|
|
44
|
+
if (__DEV__) {
|
|
45
|
+
// eslint-disable-next-line no-console
|
|
46
|
+
console.log('[GalleryHeader] Filter button pressed');
|
|
47
|
+
}
|
|
48
|
+
onFilterPress();
|
|
49
|
+
}}
|
|
50
|
+
style={[styles.filterButton, isFiltered && styles.filterButtonActive]}
|
|
51
|
+
activeOpacity={0.7}
|
|
52
|
+
>
|
|
53
|
+
<AtomicIcon
|
|
54
|
+
name={filterIcon}
|
|
55
|
+
size="sm"
|
|
56
|
+
color={isFiltered ? "primary" : "secondary"}
|
|
57
|
+
/>
|
|
58
|
+
<AtomicText style={[styles.filterText, { color: isFiltered ? tokens.colors.primary : tokens.colors.textSecondary }]}>
|
|
59
|
+
{filterLabel}
|
|
60
|
+
</AtomicText>
|
|
61
|
+
{isFiltered && (
|
|
62
|
+
<View style={styles.badge} />
|
|
63
|
+
)}
|
|
64
|
+
</TouchableOpacity>
|
|
65
|
+
)}
|
|
62
66
|
</View>
|
|
63
67
|
);
|
|
64
68
|
};
|
|
@@ -34,6 +34,7 @@ interface CreationsGalleryScreenProps {
|
|
|
34
34
|
readonly onImageEdit?: (uri: string, creationId: string) => void | Promise<void>;
|
|
35
35
|
readonly onEmptyAction?: () => void;
|
|
36
36
|
readonly emptyActionLabel?: string;
|
|
37
|
+
readonly showFilter?: boolean;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
export function CreationsGalleryScreen({
|
|
@@ -46,6 +47,7 @@ export function CreationsGalleryScreen({
|
|
|
46
47
|
onImageEdit,
|
|
47
48
|
onEmptyAction,
|
|
48
49
|
emptyActionLabel,
|
|
50
|
+
showFilter = config.showFilter ?? true,
|
|
49
51
|
}: CreationsGalleryScreenProps) {
|
|
50
52
|
const tokens = useAppDesignTokens();
|
|
51
53
|
const insets = useSafeAreaInsets();
|
|
@@ -160,6 +162,7 @@ export function CreationsGalleryScreen({
|
|
|
160
162
|
count={filtered.length}
|
|
161
163
|
countLabel={t(config.translations.photoCount) || 'photos'}
|
|
162
164
|
isFiltered={isFiltered}
|
|
165
|
+
showFilter={showFilter}
|
|
163
166
|
filterLabel={t(config.translations.filterLabel) || 'Filter'}
|
|
164
167
|
onFilterPress={() => {
|
|
165
168
|
if (__DEV__) {
|
|
@@ -199,7 +202,6 @@ export function CreationsGalleryScreen({
|
|
|
199
202
|
onIndexChange={setViewerIndex}
|
|
200
203
|
enableEditing={enableEditing}
|
|
201
204
|
onImageEdit={onImageEdit}
|
|
202
|
-
selectedCreationId={selectedCreation?.id}
|
|
203
205
|
/>
|
|
204
206
|
|
|
205
207
|
<FilterBottomSheet
|
|
@@ -31,9 +31,8 @@ export function checkStatusForErrors(
|
|
|
31
31
|
const hasStatusError = !!statusError;
|
|
32
32
|
|
|
33
33
|
// Check logs array for ERROR/FATAL level logs
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
: [];
|
|
34
|
+
const rawLogs = (status as JobStatus)?.logs;
|
|
35
|
+
const logs = Array.isArray(rawLogs) ? rawLogs : [];
|
|
37
36
|
const errorLogs = logs.filter((log) => {
|
|
38
37
|
const level = String(log?.level || "").toUpperCase();
|
|
39
38
|
return level === "ERROR" || level === "FATAL";
|