@rocapine/react-native-onboarding 1.11.1 → 1.13.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/evaluateCondition.d.ts +6 -0
- package/dist/evaluateCondition.d.ts.map +1 -0
- package/dist/evaluateCondition.js +48 -0
- package/dist/evaluateCondition.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/infra/provider/OnboardingProvider.d.ts +2 -0
- package/dist/infra/provider/OnboardingProvider.d.ts.map +1 -1
- package/dist/infra/provider/OnboardingProvider.js +8 -0
- package/dist/infra/provider/OnboardingProvider.js.map +1 -1
- package/dist/onboarding-example.d.ts +174 -0
- package/dist/onboarding-example.d.ts.map +1 -1
- package/dist/onboarding-example.js +50 -0
- package/dist/onboarding-example.js.map +1 -1
- package/dist/resolveNextStepNumber.d.ts +11 -0
- package/dist/resolveNextStepNumber.d.ts.map +1 -0
- package/dist/resolveNextStepNumber.js +39 -0
- package/dist/resolveNextStepNumber.js.map +1 -0
- package/dist/steps/Carousel/types.d.ts +29 -8
- package/dist/steps/Carousel/types.d.ts.map +1 -1
- package/dist/steps/Carousel/types.js +1 -8
- package/dist/steps/Carousel/types.js.map +1 -1
- package/dist/steps/Commitment/types.d.ts +29 -8
- package/dist/steps/Commitment/types.d.ts.map +1 -1
- package/dist/steps/Commitment/types.js +1 -8
- package/dist/steps/Commitment/types.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.d.ts +67 -0
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.js +15 -1
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts +28 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/CarouselElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/CarouselElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/DatePickerElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/DatePickerElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/IconElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/IconElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ImageElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/ImageElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/InputElement.d.ts +30 -3
- package/dist/steps/ComposableScreen/elements/InputElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/LottieElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/LottieElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RiveElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/RiveElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/StackElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/StackElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/TextElement.d.ts +28 -1
- package/dist/steps/ComposableScreen/elements/TextElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/VideoElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/VideoElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/types.d.ts +31 -6
- package/dist/steps/ComposableScreen/types.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/types.js +3 -8
- package/dist/steps/ComposableScreen/types.js.map +1 -1
- package/dist/steps/Loader/types.d.ts +29 -8
- package/dist/steps/Loader/types.d.ts.map +1 -1
- package/dist/steps/Loader/types.js +1 -8
- package/dist/steps/Loader/types.js.map +1 -1
- package/dist/steps/MediaContent/types.d.ts +29 -8
- package/dist/steps/MediaContent/types.d.ts.map +1 -1
- package/dist/steps/MediaContent/types.js +1 -8
- package/dist/steps/MediaContent/types.js.map +1 -1
- package/dist/steps/Picker/types.d.ts +30 -8
- package/dist/steps/Picker/types.d.ts.map +1 -1
- package/dist/steps/Picker/types.js +2 -8
- package/dist/steps/Picker/types.js.map +1 -1
- package/dist/steps/Question/types.d.ts +30 -8
- package/dist/steps/Question/types.d.ts.map +1 -1
- package/dist/steps/Question/types.js +2 -8
- package/dist/steps/Question/types.js.map +1 -1
- package/dist/steps/Ratings/types.d.ts +29 -8
- package/dist/steps/Ratings/types.d.ts.map +1 -1
- package/dist/steps/Ratings/types.js +1 -8
- package/dist/steps/Ratings/types.js.map +1 -1
- package/dist/steps/common.types.d.ts +109 -0
- package/dist/steps/common.types.d.ts.map +1 -1
- package/dist/steps/common.types.js +52 -1
- package/dist/steps/common.types.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/__tests__/evaluateCondition.test.ts +167 -0
- package/src/__tests__/resolveNextStepNumber.test.ts +309 -0
- package/src/evaluateCondition.ts +50 -0
- package/src/index.ts +19 -0
- package/src/infra/provider/OnboardingProvider.tsx +11 -1
- package/src/onboarding-example.ts +50 -0
- package/src/resolveNextStepNumber.ts +41 -0
- package/src/steps/Carousel/types.ts +2 -9
- package/src/steps/Commitment/types.ts +2 -9
- package/src/steps/ComposableScreen/elements/BaseBoxProps.ts +42 -0
- package/src/steps/ComposableScreen/types.ts +4 -10
- package/src/steps/Loader/types.ts +2 -9
- package/src/steps/MediaContent/types.ts +2 -14
- package/src/steps/Picker/types.ts +3 -9
- package/src/steps/Question/types.ts +3 -9
- package/src/steps/Ratings/types.ts +2 -9
- package/src/steps/common.types.ts +72 -0
- package/src/types.ts +3 -0
|
@@ -17,15 +17,9 @@ exports.PickerStepPayloadSchema = zod_1.z.object({
|
|
|
17
17
|
description: zod_1.z.string().nullish(),
|
|
18
18
|
pickerType: zod_1.z.union([exports.PickerTypeEnum, zod_1.z.string()]),
|
|
19
19
|
});
|
|
20
|
-
exports.PickerStepTypeSchema =
|
|
21
|
-
id: zod_1.z.string(),
|
|
20
|
+
exports.PickerStepTypeSchema = common_types_1.BaseStepTypeSchema.extend({
|
|
22
21
|
type: zod_1.z.literal("Picker"),
|
|
23
|
-
name: zod_1.z.string(),
|
|
24
|
-
displayProgressHeader: zod_1.z.boolean(),
|
|
25
22
|
payload: exports.PickerStepPayloadSchema,
|
|
26
|
-
|
|
27
|
-
continueButtonLabel: zod_1.z.string().optional().default("Continue"),
|
|
28
|
-
buttonSection: common_types_1.ButtonSectionSchema.optional(),
|
|
29
|
-
figmaUrl: zod_1.z.string().nullish(),
|
|
23
|
+
variableName: zod_1.z.string().min(1).optional(),
|
|
30
24
|
});
|
|
31
25
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/steps/Picker/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/steps/Picker/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AAExC,QAAA,cAAc,GAAG,OAAC,CAAC,IAAI,CAAC;IACnC,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,MAAM;IACN,QAAQ;IACR,OAAO;IACP,MAAM;CACP,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACjC,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,sBAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAClD,CAAC,CAAC;AAEU,QAAA,oBAAoB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAC5D,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACzB,OAAO,EAAE,+BAAuB;IAChC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC"}
|
|
@@ -22,9 +22,37 @@ export declare const QuestionStepPayloadSchema: z.ZodObject<{
|
|
|
22
22
|
}, z.core.$strip>;
|
|
23
23
|
export declare const QuestionStepTypeSchema: z.ZodObject<{
|
|
24
24
|
id: z.ZodString;
|
|
25
|
-
type: z.ZodLiteral<"Question">;
|
|
26
25
|
name: z.ZodString;
|
|
27
26
|
displayProgressHeader: z.ZodBoolean;
|
|
27
|
+
customPayload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
28
|
+
continueButtonLabel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
29
|
+
buttonSection: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
label: z.ZodOptional<z.ZodString>;
|
|
31
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
figmaUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
nextStep: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
35
|
+
defaultTargetStepId: z.ZodString;
|
|
36
|
+
branches: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
37
|
+
condition: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
38
|
+
variable: z.ZodString;
|
|
39
|
+
operator: z.ZodEnum<{
|
|
40
|
+
eq: "eq";
|
|
41
|
+
neq: "neq";
|
|
42
|
+
gt: "gt";
|
|
43
|
+
lt: "lt";
|
|
44
|
+
gte: "gte";
|
|
45
|
+
lte: "lte";
|
|
46
|
+
contains: "contains";
|
|
47
|
+
in: "in";
|
|
48
|
+
not_in: "not_in";
|
|
49
|
+
}>;
|
|
50
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
51
|
+
}, z.core.$strip>, z.ZodType<import("../common.types").ConditionGroup, unknown, z.core.$ZodTypeInternals<import("../common.types").ConditionGroup, unknown>>]>>>;
|
|
52
|
+
targetStepId: z.ZodString;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
}, z.core.$strip>>>;
|
|
55
|
+
type: z.ZodLiteral<"Question">;
|
|
28
56
|
payload: z.ZodObject<{
|
|
29
57
|
answers: z.ZodArray<z.ZodObject<{
|
|
30
58
|
label: z.ZodString;
|
|
@@ -40,13 +68,7 @@ export declare const QuestionStepTypeSchema: z.ZodObject<{
|
|
|
40
68
|
content: z.ZodString;
|
|
41
69
|
}, z.core.$strip>>>;
|
|
42
70
|
}, z.core.$strip>;
|
|
43
|
-
|
|
44
|
-
continueButtonLabel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
45
|
-
buttonSection: z.ZodOptional<z.ZodObject<{
|
|
46
|
-
label: z.ZodOptional<z.ZodString>;
|
|
47
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
|
-
}, z.core.$strip>>;
|
|
49
|
-
figmaUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
variableName: z.ZodOptional<z.ZodString>;
|
|
50
72
|
}, z.core.$strip>;
|
|
51
73
|
export type QuestionStepType = z.infer<typeof QuestionStepTypeSchema>;
|
|
52
74
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/steps/Question/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;iBAKvB,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;iBAMpC,CAAC;AAEH,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/steps/Question/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;iBAKvB,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;iBAMpC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -16,15 +16,9 @@ exports.QuestionStepPayloadSchema = zod_1.z.object({
|
|
|
16
16
|
multipleAnswer: zod_1.z.boolean(),
|
|
17
17
|
infoBox: common_types_1.InfoBoxSchema.nullish(),
|
|
18
18
|
});
|
|
19
|
-
exports.QuestionStepTypeSchema =
|
|
20
|
-
id: zod_1.z.string(),
|
|
19
|
+
exports.QuestionStepTypeSchema = common_types_1.BaseStepTypeSchema.extend({
|
|
21
20
|
type: zod_1.z.literal("Question"),
|
|
22
|
-
name: zod_1.z.string(),
|
|
23
|
-
displayProgressHeader: zod_1.z.boolean(),
|
|
24
21
|
payload: exports.QuestionStepPayloadSchema,
|
|
25
|
-
|
|
26
|
-
continueButtonLabel: zod_1.z.string().optional().default("Continue"),
|
|
27
|
-
buttonSection: common_types_1.ButtonSectionSchema.optional(),
|
|
28
|
-
figmaUrl: zod_1.z.string().nullish(),
|
|
22
|
+
variableName: zod_1.z.string().min(1).optional(),
|
|
29
23
|
});
|
|
30
24
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/steps/Question/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/steps/Question/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAoE;AAEvD,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC1B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;CAClC,CAAC,CAAC;AAEU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,oBAAY,CAAC;IAC9B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC9B,cAAc,EAAE,OAAC,CAAC,OAAO,EAAE;IAC3B,OAAO,EAAE,4BAAa,CAAC,OAAO,EAAE;CACjC,CAAC,CAAC;AAEU,QAAA,sBAAsB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAC9D,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,OAAO,EAAE,iCAAyB;IAClC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC"}
|
|
@@ -11,9 +11,37 @@ export declare const RatingsStepPayloadSchema: z.ZodObject<{
|
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export declare const RatingsStepTypeSchema: z.ZodObject<{
|
|
13
13
|
id: z.ZodString;
|
|
14
|
-
type: z.ZodLiteral<"Ratings">;
|
|
15
14
|
name: z.ZodString;
|
|
16
15
|
displayProgressHeader: z.ZodBoolean;
|
|
16
|
+
customPayload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
17
|
+
continueButtonLabel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
18
|
+
buttonSection: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
label: z.ZodOptional<z.ZodString>;
|
|
20
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
figmaUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
nextStep: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
24
|
+
defaultTargetStepId: z.ZodString;
|
|
25
|
+
branches: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
26
|
+
condition: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
27
|
+
variable: z.ZodString;
|
|
28
|
+
operator: z.ZodEnum<{
|
|
29
|
+
eq: "eq";
|
|
30
|
+
neq: "neq";
|
|
31
|
+
gt: "gt";
|
|
32
|
+
lt: "lt";
|
|
33
|
+
gte: "gte";
|
|
34
|
+
lte: "lte";
|
|
35
|
+
contains: "contains";
|
|
36
|
+
in: "in";
|
|
37
|
+
not_in: "not_in";
|
|
38
|
+
}>;
|
|
39
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
40
|
+
}, z.core.$strip>, z.ZodType<import("../common.types").ConditionGroup, unknown, z.core.$ZodTypeInternals<import("../common.types").ConditionGroup, unknown>>]>>>;
|
|
41
|
+
targetStepId: z.ZodString;
|
|
42
|
+
}, z.core.$strip>>>;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
type: z.ZodLiteral<"Ratings">;
|
|
17
45
|
payload: z.ZodObject<{
|
|
18
46
|
title: z.ZodString;
|
|
19
47
|
subtitle: z.ZodString;
|
|
@@ -24,13 +52,6 @@ export declare const RatingsStepTypeSchema: z.ZodObject<{
|
|
|
24
52
|
}, z.core.$strip>>;
|
|
25
53
|
rateTheAppButtonLabel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
26
54
|
}, z.core.$strip>;
|
|
27
|
-
customPayload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
28
|
-
continueButtonLabel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
29
|
-
buttonSection: z.ZodOptional<z.ZodObject<{
|
|
30
|
-
label: z.ZodOptional<z.ZodString>;
|
|
31
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
-
}, z.core.$strip>>;
|
|
33
|
-
figmaUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
55
|
}, z.core.$strip>;
|
|
35
56
|
export type RatingsStepType = z.infer<typeof RatingsStepTypeSchema>;
|
|
36
57
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/steps/Ratings/types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,wBAAwB;;;;;;;;;iBAKnC,CAAC;AAEH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/steps/Ratings/types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,wBAAwB;;;;;;;;;iBAKnC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -12,15 +12,8 @@ exports.RatingsStepPayloadSchema = zod_1.default.object({
|
|
|
12
12
|
socialProofs: zod_1.default.array(common_types_1.SocialProofSchema),
|
|
13
13
|
rateTheAppButtonLabel: zod_1.default.string().optional().default("Rate the app"),
|
|
14
14
|
});
|
|
15
|
-
exports.RatingsStepTypeSchema =
|
|
16
|
-
id: zod_1.default.string(),
|
|
15
|
+
exports.RatingsStepTypeSchema = common_types_1.BaseStepTypeSchema.extend({
|
|
17
16
|
type: zod_1.default.literal("Ratings"),
|
|
18
|
-
name: zod_1.default.string(),
|
|
19
|
-
displayProgressHeader: zod_1.default.boolean(),
|
|
20
17
|
payload: exports.RatingsStepPayloadSchema,
|
|
21
|
-
customPayload: common_types_1.CustomPayloadSchema,
|
|
22
|
-
continueButtonLabel: zod_1.default.string().optional().default("Continue"),
|
|
23
|
-
buttonSection: common_types_1.ButtonSectionSchema.optional(),
|
|
24
|
-
figmaUrl: zod_1.default.string().nullish(),
|
|
25
18
|
});
|
|
26
19
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/steps/Ratings/types.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/steps/Ratings/types.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAwE;AAE3D,QAAA,wBAAwB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE;IACjB,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,aAAC,CAAC,KAAK,CAAC,gCAAiB,CAAC;IACxC,qBAAqB,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC;CACrE,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAC7D,IAAI,EAAE,aAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,gCAAwB;CAClC,CAAC,CAAC"}
|
|
@@ -20,4 +20,113 @@ export declare const ButtonSectionSchema: z.ZodObject<{
|
|
|
20
20
|
label: z.ZodOptional<z.ZodString>;
|
|
21
21
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
22
|
}, z.core.$strip>;
|
|
23
|
+
export declare const ConditionOperatorSchema: z.ZodEnum<{
|
|
24
|
+
eq: "eq";
|
|
25
|
+
neq: "neq";
|
|
26
|
+
gt: "gt";
|
|
27
|
+
lt: "lt";
|
|
28
|
+
gte: "gte";
|
|
29
|
+
lte: "lte";
|
|
30
|
+
contains: "contains";
|
|
31
|
+
in: "in";
|
|
32
|
+
not_in: "not_in";
|
|
33
|
+
}>;
|
|
34
|
+
export type ConditionOperator = z.infer<typeof ConditionOperatorSchema>;
|
|
35
|
+
export declare const ConditionValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
36
|
+
export type ConditionValue = z.infer<typeof ConditionValueSchema>;
|
|
37
|
+
export declare const LeafConditionSchema: z.ZodObject<{
|
|
38
|
+
variable: z.ZodString;
|
|
39
|
+
operator: z.ZodEnum<{
|
|
40
|
+
eq: "eq";
|
|
41
|
+
neq: "neq";
|
|
42
|
+
gt: "gt";
|
|
43
|
+
lt: "lt";
|
|
44
|
+
gte: "gte";
|
|
45
|
+
lte: "lte";
|
|
46
|
+
contains: "contains";
|
|
47
|
+
in: "in";
|
|
48
|
+
not_in: "not_in";
|
|
49
|
+
}>;
|
|
50
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type LeafCondition = z.infer<typeof LeafConditionSchema>;
|
|
53
|
+
export type ConditionGroup = {
|
|
54
|
+
logic: "and" | "or";
|
|
55
|
+
conditions: Array<LeafCondition | ConditionGroup>;
|
|
56
|
+
};
|
|
57
|
+
export declare const ConditionGroupSchema: z.ZodType<ConditionGroup>;
|
|
58
|
+
export declare const BranchSchema: z.ZodObject<{
|
|
59
|
+
condition: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
60
|
+
variable: z.ZodString;
|
|
61
|
+
operator: z.ZodEnum<{
|
|
62
|
+
eq: "eq";
|
|
63
|
+
neq: "neq";
|
|
64
|
+
gt: "gt";
|
|
65
|
+
lt: "lt";
|
|
66
|
+
gte: "gte";
|
|
67
|
+
lte: "lte";
|
|
68
|
+
contains: "contains";
|
|
69
|
+
in: "in";
|
|
70
|
+
not_in: "not_in";
|
|
71
|
+
}>;
|
|
72
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
73
|
+
}, z.core.$strip>, z.ZodType<ConditionGroup, unknown, z.core.$ZodTypeInternals<ConditionGroup, unknown>>]>>>;
|
|
74
|
+
targetStepId: z.ZodString;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export type Branch = z.infer<typeof BranchSchema>;
|
|
77
|
+
export declare const NextStepSchema: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
78
|
+
defaultTargetStepId: z.ZodString;
|
|
79
|
+
branches: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
80
|
+
condition: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
81
|
+
variable: z.ZodString;
|
|
82
|
+
operator: z.ZodEnum<{
|
|
83
|
+
eq: "eq";
|
|
84
|
+
neq: "neq";
|
|
85
|
+
gt: "gt";
|
|
86
|
+
lt: "lt";
|
|
87
|
+
gte: "gte";
|
|
88
|
+
lte: "lte";
|
|
89
|
+
contains: "contains";
|
|
90
|
+
in: "in";
|
|
91
|
+
not_in: "not_in";
|
|
92
|
+
}>;
|
|
93
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
94
|
+
}, z.core.$strip>, z.ZodType<ConditionGroup, unknown, z.core.$ZodTypeInternals<ConditionGroup, unknown>>]>>>;
|
|
95
|
+
targetStepId: z.ZodString;
|
|
96
|
+
}, z.core.$strip>>>;
|
|
97
|
+
}, z.core.$strip>>>;
|
|
98
|
+
export type NextStep = z.infer<typeof NextStepSchema>;
|
|
99
|
+
export declare const BaseStepTypeSchema: z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
displayProgressHeader: z.ZodBoolean;
|
|
103
|
+
customPayload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
104
|
+
continueButtonLabel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
105
|
+
buttonSection: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
label: z.ZodOptional<z.ZodString>;
|
|
107
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
figmaUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
+
nextStep: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
111
|
+
defaultTargetStepId: z.ZodString;
|
|
112
|
+
branches: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
113
|
+
condition: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
114
|
+
variable: z.ZodString;
|
|
115
|
+
operator: z.ZodEnum<{
|
|
116
|
+
eq: "eq";
|
|
117
|
+
neq: "neq";
|
|
118
|
+
gt: "gt";
|
|
119
|
+
lt: "lt";
|
|
120
|
+
gte: "gte";
|
|
121
|
+
lte: "lte";
|
|
122
|
+
contains: "contains";
|
|
123
|
+
in: "in";
|
|
124
|
+
not_in: "not_in";
|
|
125
|
+
}>;
|
|
126
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>;
|
|
127
|
+
}, z.core.$strip>, z.ZodType<ConditionGroup, unknown, z.core.$ZodTypeInternals<ConditionGroup, unknown>>]>>>;
|
|
128
|
+
targetStepId: z.ZodString;
|
|
129
|
+
}, z.core.$strip>>>;
|
|
130
|
+
}, z.core.$strip>>>;
|
|
131
|
+
}, z.core.$strip>;
|
|
23
132
|
//# sourceMappingURL=common.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../src/steps/common.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,kEAA0C,CAAC;AAE3E,eAAO,MAAM,iBAAiB;;;;;;mBAS5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AAEH,eAAO,MAAM,aAAa;;;iBAGxB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAC"}
|
|
1
|
+
{"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../src/steps/common.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,kEAA0C,CAAC;AAE3E,eAAO,MAAM,iBAAiB;;;;;;mBAS5B,CAAC;AAEH,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ema = exports.MediaSourceSchema = exports.CustomPayloadSchema = void 0;
|
|
3
|
+
exports.BaseStepTypeSchema = exports.NextStepSchema = exports.BranchSchema = exports.ConditionGroupSchema = exports.LeafConditionSchema = exports.ConditionValueSchema = exports.ConditionOperatorSchema = exports.ButtonSectionSchema = exports.InfoBoxSchema = exports.SocialProofSchema = exports.MediaSourceSchema = exports.CustomPayloadSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.CustomPayloadSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullish();
|
|
6
6
|
exports.MediaSourceSchema = zod_1.z.union([
|
|
@@ -26,4 +26,55 @@ exports.ButtonSectionSchema = zod_1.z.object({
|
|
|
26
26
|
label: zod_1.z.string().optional(),
|
|
27
27
|
icon: zod_1.z.string().nullish(),
|
|
28
28
|
});
|
|
29
|
+
// ── Branching / nextStep schemas ─────────────────────────────────────────────
|
|
30
|
+
exports.ConditionOperatorSchema = zod_1.z.enum([
|
|
31
|
+
"eq",
|
|
32
|
+
"neq",
|
|
33
|
+
"gt",
|
|
34
|
+
"lt",
|
|
35
|
+
"gte",
|
|
36
|
+
"lte",
|
|
37
|
+
"contains",
|
|
38
|
+
"in",
|
|
39
|
+
"not_in",
|
|
40
|
+
]);
|
|
41
|
+
exports.ConditionValueSchema = zod_1.z.union([
|
|
42
|
+
zod_1.z.string(),
|
|
43
|
+
zod_1.z.number(),
|
|
44
|
+
zod_1.z.boolean(),
|
|
45
|
+
zod_1.z.array(zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean()])),
|
|
46
|
+
]);
|
|
47
|
+
exports.LeafConditionSchema = zod_1.z.object({
|
|
48
|
+
variable: zod_1.z.string().min(1),
|
|
49
|
+
operator: exports.ConditionOperatorSchema,
|
|
50
|
+
value: exports.ConditionValueSchema,
|
|
51
|
+
});
|
|
52
|
+
exports.ConditionGroupSchema = zod_1.z.lazy(() => zod_1.z.object({
|
|
53
|
+
logic: zod_1.z.enum(["and", "or"]),
|
|
54
|
+
conditions: zod_1.z
|
|
55
|
+
.array(zod_1.z.union([exports.LeafConditionSchema, exports.ConditionGroupSchema]))
|
|
56
|
+
.min(1),
|
|
57
|
+
}));
|
|
58
|
+
exports.BranchSchema = zod_1.z.object({
|
|
59
|
+
condition: zod_1.z.union([exports.LeafConditionSchema, exports.ConditionGroupSchema]).nullable().default(null),
|
|
60
|
+
targetStepId: zod_1.z.string().min(1),
|
|
61
|
+
});
|
|
62
|
+
exports.NextStepSchema = zod_1.z
|
|
63
|
+
.object({
|
|
64
|
+
defaultTargetStepId: zod_1.z.string().min(1),
|
|
65
|
+
branches: zod_1.z.array(exports.BranchSchema).default([]),
|
|
66
|
+
})
|
|
67
|
+
.nullable()
|
|
68
|
+
.default(null);
|
|
69
|
+
// ── Base step schema ──────────────────────────────────────────────────────────
|
|
70
|
+
exports.BaseStepTypeSchema = zod_1.z.object({
|
|
71
|
+
id: zod_1.z.string(),
|
|
72
|
+
name: zod_1.z.string(),
|
|
73
|
+
displayProgressHeader: zod_1.z.boolean(),
|
|
74
|
+
customPayload: exports.CustomPayloadSchema,
|
|
75
|
+
continueButtonLabel: zod_1.z.string().optional().default("Continue"),
|
|
76
|
+
buttonSection: exports.ButtonSectionSchema.optional(),
|
|
77
|
+
figmaUrl: zod_1.z.string().nullish(),
|
|
78
|
+
nextStep: exports.NextStepSchema,
|
|
79
|
+
});
|
|
29
80
|
//# sourceMappingURL=common.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.types.js","sourceRoot":"","sources":["../../src/steps/common.types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;AAE9D,QAAA,iBAAiB,GAAG,OAAC,CAAC,KAAK,CAAC;IACvC,OAAC,CAAC,MAAM,CA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,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,2BAAmB,EAAE,4BAAoB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACxF,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAChC,CAAC,CAAC;AAGU,QAAA,cAAc,GAAG,OAAC;KAC5B,MAAM,CAAC;IACN,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,oBAAY,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC5C,CAAC;KACD,QAAQ,EAAE;KACV,OAAO,CAAC,IAAI,CAAC,CAAC;AAGjB,iFAAiF;AAEpE,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,qBAAqB,EAAE,OAAC,CAAC,OAAO,EAAE;IAClC,aAAa,EAAE,2BAAmB;IAClC,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;IAC9D,aAAa,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IAC7C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC9B,QAAQ,EAAE,sBAAc;CACzB,CAAC,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NextStep } from "./steps/common.types";
|
|
1
2
|
/**
|
|
2
3
|
* Base step type that all onboarding steps must conform to.
|
|
3
4
|
* This is the minimal interface required by the headless SDK.
|
|
@@ -11,6 +12,7 @@ export type BaseStepType = {
|
|
|
11
12
|
customPayload?: any;
|
|
12
13
|
continueButtonLabel?: string;
|
|
13
14
|
figmaUrl?: string | null;
|
|
15
|
+
nextStep?: NextStep;
|
|
14
16
|
};
|
|
15
17
|
export type OnboardingStudioClientOptions<StepType extends BaseStepType = BaseStepType> = {
|
|
16
18
|
appVersion?: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,6BAA6B,CACvC,QAAQ,SAAS,YAAY,GAAG,YAAY,IAC1C;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,UAAU,CAAC,QAAQ,SAAS,YAAY,GAAG,YAAY;IACtE,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,aAAa,EAAE,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocapine/react-native-onboarding",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Headless React Native SDK for Rocapine Onboarding Studio - Data fetching, state management, and hooks",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"build": "tsc",
|
|
9
9
|
"watch": "tsc --watch",
|
|
10
10
|
"type:check": "tsc --noEmit",
|
|
11
|
+
"test": "vitest run",
|
|
12
|
+
"test:watch": "vitest",
|
|
11
13
|
"patch": "npm version patch && npm run build && npm publish"
|
|
12
14
|
},
|
|
13
15
|
"keywords": [
|
|
@@ -29,7 +31,8 @@
|
|
|
29
31
|
"@types/react": "^19.0.0",
|
|
30
32
|
"react": "19.2.0",
|
|
31
33
|
"react-native": "0.83.4",
|
|
32
|
-
"typescript": "^5.0.0"
|
|
34
|
+
"typescript": "^5.0.0",
|
|
35
|
+
"vitest": "^4.1.5"
|
|
33
36
|
},
|
|
34
37
|
"peerDependencies": {
|
|
35
38
|
"react": "*",
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { evaluateLeaf, evaluateCondition } from "../evaluateCondition";
|
|
3
|
+
import type { Condition } from "../evaluateCondition";
|
|
4
|
+
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// evaluateLeaf — operator coverage
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
describe("evaluateLeaf — eq", () => {
|
|
10
|
+
it("matches equal strings", () => expect(evaluateLeaf({ variable: "x", operator: "eq", value: "male" }, { x: "male" })).toBe(true));
|
|
11
|
+
it("rejects unequal strings", () => expect(evaluateLeaf({ variable: "x", operator: "eq", value: "male" }, { x: "female" })).toBe(false));
|
|
12
|
+
it("coerces number to string for comparison", () => expect(evaluateLeaf({ variable: "x", operator: "eq", value: "42" }, { x: 42 })).toBe(true));
|
|
13
|
+
it("undefined variable yields false", () => expect(evaluateLeaf({ variable: "x", operator: "eq", value: "foo" }, {})).toBe(false));
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
describe("evaluateLeaf — neq", () => {
|
|
17
|
+
it("passes when values differ", () => expect(evaluateLeaf({ variable: "x", operator: "neq", value: "male" }, { x: "female" })).toBe(true));
|
|
18
|
+
it("fails when values equal", () => expect(evaluateLeaf({ variable: "x", operator: "neq", value: "male" }, { x: "male" })).toBe(false));
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
describe("evaluateLeaf — gt", () => {
|
|
22
|
+
it("passes when variable greater", () => expect(evaluateLeaf({ variable: "age", operator: "gt", value: 18 }, { age: 25 })).toBe(true));
|
|
23
|
+
it("fails when equal", () => expect(evaluateLeaf({ variable: "age", operator: "gt", value: 18 }, { age: 18 })).toBe(false));
|
|
24
|
+
it("fails when less", () => expect(evaluateLeaf({ variable: "age", operator: "gt", value: 18 }, { age: 10 })).toBe(false));
|
|
25
|
+
it("coerces string variable", () => expect(evaluateLeaf({ variable: "age", operator: "gt", value: 18 }, { age: "25" })).toBe(true));
|
|
26
|
+
it("coerces string value", () => expect(evaluateLeaf({ variable: "age", operator: "gt", value: "18" }, { age: 25 })).toBe(true));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
describe("evaluateLeaf — lt", () => {
|
|
30
|
+
it("passes when variable less", () => expect(evaluateLeaf({ variable: "age", operator: "lt", value: 18 }, { age: 10 })).toBe(true));
|
|
31
|
+
it("fails when equal", () => expect(evaluateLeaf({ variable: "age", operator: "lt", value: 18 }, { age: 18 })).toBe(false));
|
|
32
|
+
it("fails when greater", () => expect(evaluateLeaf({ variable: "age", operator: "lt", value: 18 }, { age: 25 })).toBe(false));
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
describe("evaluateLeaf — gte", () => {
|
|
36
|
+
it("passes when greater", () => expect(evaluateLeaf({ variable: "x", operator: "gte", value: 5 }, { x: 6 })).toBe(true));
|
|
37
|
+
it("passes when equal", () => expect(evaluateLeaf({ variable: "x", operator: "gte", value: 5 }, { x: 5 })).toBe(true));
|
|
38
|
+
it("fails when less", () => expect(evaluateLeaf({ variable: "x", operator: "gte", value: 5 }, { x: 4 })).toBe(false));
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
describe("evaluateLeaf — lte", () => {
|
|
42
|
+
it("passes when less", () => expect(evaluateLeaf({ variable: "x", operator: "lte", value: 5 }, { x: 4 })).toBe(true));
|
|
43
|
+
it("passes when equal", () => expect(evaluateLeaf({ variable: "x", operator: "lte", value: 5 }, { x: 5 })).toBe(true));
|
|
44
|
+
it("fails when greater", () => expect(evaluateLeaf({ variable: "x", operator: "lte", value: 5 }, { x: 6 })).toBe(false));
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
describe("evaluateLeaf — contains (string)", () => {
|
|
48
|
+
it("passes when substring found", () => expect(evaluateLeaf({ variable: "bio", operator: "contains", value: "run" }, { bio: "I love running" })).toBe(true));
|
|
49
|
+
it("fails when substring absent", () => expect(evaluateLeaf({ variable: "bio", operator: "contains", value: "swim" }, { bio: "I love running" })).toBe(false));
|
|
50
|
+
it("coerces number variable to string", () => expect(evaluateLeaf({ variable: "code", operator: "contains", value: "4" }, { code: 42 })).toBe(true));
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
describe("evaluateLeaf — contains (array)", () => {
|
|
54
|
+
it("passes when element in array", () => expect(evaluateLeaf({ variable: "tags", operator: "contains", value: "sport" }, { tags: ["health", "sport"] })).toBe(true));
|
|
55
|
+
it("fails when element absent", () => expect(evaluateLeaf({ variable: "tags", operator: "contains", value: "music" }, { tags: ["health", "sport"] })).toBe(false));
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
describe("evaluateLeaf — in", () => {
|
|
59
|
+
it("passes when variable is in list", () => expect(evaluateLeaf({ variable: "gender", operator: "in", value: ["male", "female"] }, { gender: "male" })).toBe(true));
|
|
60
|
+
it("fails when variable not in list", () => expect(evaluateLeaf({ variable: "gender", operator: "in", value: ["male", "female"] }, { gender: "other" })).toBe(false));
|
|
61
|
+
it("returns false when value is not array", () => expect(evaluateLeaf({ variable: "x", operator: "in", value: "male" as any }, { x: "male" })).toBe(false));
|
|
62
|
+
it("empty list always false", () => expect(evaluateLeaf({ variable: "x", operator: "in", value: [] }, { x: "male" })).toBe(false));
|
|
63
|
+
it("coerces numeric raw to string before comparison", () => expect(evaluateLeaf({ variable: "age", operator: "in", value: ["18", "25"] }, { age: 18 })).toBe(true));
|
|
64
|
+
it("numeric raw not in string list returns false", () => expect(evaluateLeaf({ variable: "age", operator: "in", value: ["30", "40"] }, { age: 18 })).toBe(false));
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
describe("evaluateLeaf — not_in", () => {
|
|
68
|
+
it("passes when variable not in list", () => expect(evaluateLeaf({ variable: "gender", operator: "not_in", value: ["male", "female"] }, { gender: "other" })).toBe(true));
|
|
69
|
+
it("fails when variable is in list", () => expect(evaluateLeaf({ variable: "gender", operator: "not_in", value: ["male", "female"] }, { gender: "male" })).toBe(false));
|
|
70
|
+
it("returns true when value is not array (safe default)", () => expect(evaluateLeaf({ variable: "x", operator: "not_in", value: "male" as any }, { x: "male" })).toBe(true));
|
|
71
|
+
it("coerces numeric raw to string before comparison", () => expect(evaluateLeaf({ variable: "age", operator: "not_in", value: ["18", "25"] }, { age: 30 })).toBe(true));
|
|
72
|
+
it("numeric raw in string list returns false", () => expect(evaluateLeaf({ variable: "age", operator: "not_in", value: ["18", "25"] }, { age: 18 })).toBe(false));
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
describe("evaluateLeaf — unknown operator", () => {
|
|
76
|
+
it("returns false for unknown operator", () => expect(evaluateLeaf({ variable: "x", operator: "xor" as any, value: "y" }, { x: "y" })).toBe(false));
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// ---------------------------------------------------------------------------
|
|
80
|
+
// evaluateCondition — logic groups
|
|
81
|
+
// ---------------------------------------------------------------------------
|
|
82
|
+
|
|
83
|
+
describe("evaluateCondition — AND group", () => {
|
|
84
|
+
const and: Condition = {
|
|
85
|
+
logic: "and",
|
|
86
|
+
conditions: [
|
|
87
|
+
{ variable: "age", operator: "gt", value: 18 },
|
|
88
|
+
{ variable: "gender", operator: "eq", value: "male" },
|
|
89
|
+
],
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
it("passes when all conditions true", () => expect(evaluateCondition(and, { age: 25, gender: "male" })).toBe(true));
|
|
93
|
+
it("fails when one condition false", () => expect(evaluateCondition(and, { age: 25, gender: "female" })).toBe(false));
|
|
94
|
+
it("fails when all conditions false", () => expect(evaluateCondition(and, { age: 10, gender: "female" })).toBe(false));
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
describe("evaluateCondition — OR group", () => {
|
|
98
|
+
const or: Condition = {
|
|
99
|
+
logic: "or",
|
|
100
|
+
conditions: [
|
|
101
|
+
{ variable: "age", operator: "lt", value: 18 },
|
|
102
|
+
{ variable: "gender", operator: "eq", value: "female" },
|
|
103
|
+
],
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
it("passes when first condition true", () => expect(evaluateCondition(or, { age: 10, gender: "male" })).toBe(true));
|
|
107
|
+
it("passes when second condition true", () => expect(evaluateCondition(or, { age: 25, gender: "female" })).toBe(true));
|
|
108
|
+
it("passes when both true", () => expect(evaluateCondition(or, { age: 10, gender: "female" })).toBe(true));
|
|
109
|
+
it("fails when all false", () => expect(evaluateCondition(or, { age: 25, gender: "male" })).toBe(false));
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
describe("evaluateCondition — nested groups", () => {
|
|
113
|
+
// (age > 18 AND gender = male) OR (vip = true)
|
|
114
|
+
const nested: Condition = {
|
|
115
|
+
logic: "or",
|
|
116
|
+
conditions: [
|
|
117
|
+
{
|
|
118
|
+
logic: "and",
|
|
119
|
+
conditions: [
|
|
120
|
+
{ variable: "age", operator: "gt", value: 18 },
|
|
121
|
+
{ variable: "gender", operator: "eq", value: "male" },
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
{ variable: "vip", operator: "eq", value: "true" },
|
|
125
|
+
],
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
it("passes via inner AND branch", () => expect(evaluateCondition(nested, { age: 25, gender: "male", vip: "false" })).toBe(true));
|
|
129
|
+
it("passes via vip branch", () => expect(evaluateCondition(nested, { age: 10, gender: "female", vip: "true" })).toBe(true));
|
|
130
|
+
it("fails when neither branch matches", () => expect(evaluateCondition(nested, { age: 10, gender: "male", vip: "false" })).toBe(false));
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
describe("evaluateCondition — deeply nested (3 levels)", () => {
|
|
134
|
+
// ((a=1 AND b=2) OR c=3) AND d=4
|
|
135
|
+
const deep: Condition = {
|
|
136
|
+
logic: "and",
|
|
137
|
+
conditions: [
|
|
138
|
+
{
|
|
139
|
+
logic: "or",
|
|
140
|
+
conditions: [
|
|
141
|
+
{
|
|
142
|
+
logic: "and",
|
|
143
|
+
conditions: [
|
|
144
|
+
{ variable: "a", operator: "eq", value: "1" },
|
|
145
|
+
{ variable: "b", operator: "eq", value: "2" },
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
{ variable: "c", operator: "eq", value: "3" },
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
{ variable: "d", operator: "eq", value: "4" },
|
|
152
|
+
],
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
it("passes via a+b path with d", () => expect(evaluateCondition(deep, { a: "1", b: "2", c: "0", d: "4" })).toBe(true));
|
|
156
|
+
it("passes via c path with d", () => expect(evaluateCondition(deep, { a: "0", b: "0", c: "3", d: "4" })).toBe(true));
|
|
157
|
+
it("fails when d missing", () => expect(evaluateCondition(deep, { a: "1", b: "2", c: "3", d: "0" })).toBe(false));
|
|
158
|
+
it("fails when inner OR fails and d present", () => expect(evaluateCondition(deep, { a: "0", b: "0", c: "0", d: "4" })).toBe(false));
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
describe("evaluateCondition — leaf passthrough", () => {
|
|
162
|
+
it("delegates to evaluateLeaf directly", () => {
|
|
163
|
+
const leaf: Condition = { variable: "x", operator: "eq", value: "yes" };
|
|
164
|
+
expect(evaluateCondition(leaf, { x: "yes" })).toBe(true);
|
|
165
|
+
expect(evaluateCondition(leaf, { x: "no" })).toBe(false);
|
|
166
|
+
});
|
|
167
|
+
});
|