@umituz/react-native-ai-generation-content 1.58.2 → 1.58.4
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.58.
|
|
3
|
+
"version": "1.58.4",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
"@typescript-eslint/parser": "^8.0.0",
|
|
69
69
|
"@umituz/react-native-design-system": "^2.9.50",
|
|
70
70
|
"@umituz/react-native-firebase": "^1.13.87",
|
|
71
|
-
"@umituz/react-native-localization": "*",
|
|
72
71
|
"@umituz/react-native-subscription": "^2.27.23",
|
|
73
72
|
"eslint": "^9.0.0",
|
|
74
73
|
"expo-apple-authentication": "^8.0.8",
|
|
@@ -93,9 +92,7 @@
|
|
|
93
92
|
"expo-video": "^3.0.15",
|
|
94
93
|
"expo-web-browser": "^12.0.0",
|
|
95
94
|
"firebase": "^12.6.0",
|
|
96
|
-
"i18next": "^25.7.3",
|
|
97
95
|
"react": "19.1.0",
|
|
98
|
-
"react-i18next": "^16.5.0",
|
|
99
96
|
"react-native": "0.81.5",
|
|
100
97
|
"react-native-gesture-handler": "^2.30.0",
|
|
101
98
|
"react-native-purchases": "^9.7.1",
|
package/src/domains/generation/wizard/presentation/components/step-renderers/renderSelectionStep.tsx
CHANGED
|
@@ -16,6 +16,8 @@ export interface SelectionStepProps {
|
|
|
16
16
|
readonly t: (key: string) => string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
declare const __DEV__: boolean;
|
|
20
|
+
|
|
19
21
|
export function renderSelectionStep({
|
|
20
22
|
step,
|
|
21
23
|
customData,
|
|
@@ -35,6 +37,22 @@ export function renderSelectionStep({
|
|
|
35
37
|
const autoSelectValue = isRequired && options.length === 1 ? options[0].id : undefined;
|
|
36
38
|
const initialValue = existingValue ?? configDefault ?? autoSelectValue;
|
|
37
39
|
|
|
40
|
+
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
41
|
+
console.log("[renderSelectionStep] Step config:", {
|
|
42
|
+
stepId: step.id,
|
|
43
|
+
stepType: step.type,
|
|
44
|
+
hasConfig: !!step.config,
|
|
45
|
+
configType: (step.config as Record<string, unknown>)?.type,
|
|
46
|
+
hasSelectionConfig: !!selectionConfig,
|
|
47
|
+
configDefault,
|
|
48
|
+
existingValue,
|
|
49
|
+
autoSelectValue,
|
|
50
|
+
initialValue,
|
|
51
|
+
isRequired,
|
|
52
|
+
optionsCount: options.length,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
38
56
|
return (
|
|
39
57
|
<SelectionScreen
|
|
40
58
|
stepId={step.id}
|
|
@@ -23,8 +23,10 @@ export type {
|
|
|
23
23
|
SelectionScreenProps,
|
|
24
24
|
} from "./SelectionScreen.types";
|
|
25
25
|
|
|
26
|
+
declare const __DEV__: boolean;
|
|
27
|
+
|
|
26
28
|
export const SelectionScreen: React.FC<SelectionScreenProps> = ({
|
|
27
|
-
stepId
|
|
29
|
+
stepId,
|
|
28
30
|
translations,
|
|
29
31
|
options,
|
|
30
32
|
config,
|
|
@@ -34,9 +36,17 @@ export const SelectionScreen: React.FC<SelectionScreenProps> = ({
|
|
|
34
36
|
}) => {
|
|
35
37
|
const tokens = useAppDesignTokens();
|
|
36
38
|
const [selected, setSelected] = useState<string | string[]>(() => {
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
39
|
+
const initialState = initialValue ? initialValue : (config?.multiSelect ? [] : "");
|
|
40
|
+
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
41
|
+
console.log("[SelectionScreen] Initial state:", {
|
|
42
|
+
stepId,
|
|
43
|
+
initialValue,
|
|
44
|
+
initialState,
|
|
45
|
+
hasInitialValue: !!initialValue,
|
|
46
|
+
multiSelect: config?.multiSelect,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return initialState;
|
|
40
50
|
});
|
|
41
51
|
|
|
42
52
|
const isMultiSelect = config?.multiSelect ?? false;
|
|
@@ -45,6 +55,17 @@ export const SelectionScreen: React.FC<SelectionScreenProps> = ({
|
|
|
45
55
|
? isMultiSelect ? (selected as string[]).length > 0 : selected !== ""
|
|
46
56
|
: true;
|
|
47
57
|
|
|
58
|
+
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
59
|
+
console.log("[SelectionScreen] Render state:", {
|
|
60
|
+
stepId,
|
|
61
|
+
selected,
|
|
62
|
+
isRequired,
|
|
63
|
+
isMultiSelect,
|
|
64
|
+
canContinue,
|
|
65
|
+
optionIds: options.map(o => o.id),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
48
69
|
const handleSelect = useCallback((optionId: string) => {
|
|
49
70
|
if (isMultiSelect) {
|
|
50
71
|
setSelected((prev) => {
|