@developer_tribe/react-builder 1.2.24 → 1.2.26
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/attributes-editor/AttributesEditorFields.d.ts +1 -1
- package/dist/attributes-editor/SpecialCategorySection.d.ts +2 -1
- package/dist/attributes-editor/attributesEditorModelTypes.d.ts +2 -0
- package/dist/build-components/BIcon/BIconProps.generated.d.ts +0 -2
- package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +0 -2
- package/dist/build-components/Button/ButtonProps.generated.d.ts +0 -2
- package/dist/build-components/Carousel/CarouselProps.generated.d.ts +0 -2
- package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +0 -2
- package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +0 -2
- package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +0 -2
- package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +0 -2
- package/dist/build-components/CountDown/CountDownProps.generated.d.ts +3 -6
- package/dist/build-components/Image/ImageProps.generated.d.ts +0 -2
- package/dist/build-components/Main/MainProps.generated.d.ts +0 -2
- package/dist/build-components/NavigationBarColor/NavigationBarColorProps.generated.d.ts +0 -2
- package/dist/build-components/Onboard/OnboardProps.generated.d.ts +0 -2
- package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +0 -2
- package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +0 -2
- package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +0 -2
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +0 -2
- package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +0 -2
- package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +0 -2
- package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +0 -2
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +0 -2
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +0 -2
- package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +0 -2
- package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +0 -2
- package/dist/build-components/PaywallOptions/PaywallOptionButton.d.ts +1 -1
- package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +0 -2
- package/dist/build-components/PaywallProvider/PaywallContext.d.ts +1 -2
- package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +0 -2
- package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +0 -2
- package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +0 -2
- package/dist/build-components/Separator/SeparatorProps.generated.d.ts +0 -2
- package/dist/build-components/StatusBarColor/StatusBarColorProps.generated.d.ts +0 -2
- package/dist/build-components/Text/TextProps.generated.d.ts +0 -2
- package/dist/build-components/index.d.ts +1 -3
- package/dist/build-components/patterns.generated.d.ts +818 -1690
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.web.cjs.js +4 -4
- package/dist/index.web.cjs.js.map +1 -1
- package/dist/index.web.esm.js +3 -3
- package/dist/index.web.esm.js.map +1 -1
- package/dist/pages/ProjectPage.d.ts +2 -2
- package/dist/pages/projectPageUtils.d.ts +7 -1
- package/dist/paywall/hooks/index.d.ts +0 -1
- package/dist/styles.css +1 -1
- package/dist/types/Project.d.ts +6 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/patterns.d.ts +2 -0
- package/dist/utils/projectColors.d.ts +7 -0
- package/package.json +3 -3
- package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +11 -2
- package/src/AttributesEditor.tsx +15 -4
- package/src/DeviceMockFrame.tsx +0 -2
- package/src/RenderPage.tsx +0 -9
- package/src/assets/.DS_Store +0 -0
- package/src/assets/meta.json +1 -1
- package/src/assets/samples/paywall-1.json +0 -1
- package/src/assets/samples/paywall-2.json +2 -3
- package/src/assets/samples/paywall-app-delete-offer.json +2 -4
- package/src/assets/samples/paywall-app-open-offer.json +2 -4
- package/src/assets/samples/paywall-back-offer.json +2 -4
- package/src/assets/samples/paywall-notification-offer.json +2 -4
- package/src/assets/samples/simple-2.json +0 -1
- package/src/assets/samples/vpn-onboard-1.json +15 -15
- package/src/assets/samples/vpn-onboard-2.json +15 -15
- package/src/assets/samples/vpn-onboard-3.json +15 -15
- package/src/assets/samples/vpn-onboard-4.json +15 -15
- package/src/assets/samples/vpn-onboard-5.json +21 -21
- package/src/assets/samples/vpn-onboard-6.json +15 -15
- package/src/attributes-editor/AttributesEditorFields.tsx +0 -1
- package/src/attributes-editor/AttributesEditorView.tsx +43 -38
- package/src/attributes-editor/Field.tsx +1 -1
- package/src/attributes-editor/SpecialCategorySection.tsx +5 -4
- package/src/attributes-editor/attributesEditorModelTypes.ts +2 -0
- package/src/attributes-editor/useAttributesEditorModel.ts +24 -8
- package/src/build-components/BIcon/BIcon.tsx +1 -1
- package/src/build-components/BIcon/BIconProps.generated.ts +0 -2
- package/src/build-components/BIcon/pattern.json +2 -2
- package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +0 -2
- package/src/build-components/BackgroundImage/pattern.json +2 -2
- package/src/build-components/Button/ButtonProps.generated.ts +0 -2
- package/src/build-components/Button/pattern.json +2 -2
- package/src/build-components/Carousel/Carousel.tsx +1 -1
- package/src/build-components/Carousel/CarouselProps.generated.ts +0 -2
- package/src/build-components/Carousel/pattern.json +3 -3
- package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +0 -2
- package/src/build-components/CarouselButtons/pattern.json +2 -2
- package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +0 -2
- package/src/build-components/CarouselDots/pattern.json +2 -2
- package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +0 -2
- package/src/build-components/CarouselItem/pattern.json +3 -5
- package/src/build-components/CarouselProvider/CarouselProvider.tsx +1 -1
- package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +0 -2
- package/src/build-components/CarouselProvider/pattern.json +2 -4
- package/src/build-components/CountDown/CountDown.tsx +25 -1
- package/src/build-components/CountDown/CountDownProps.generated.ts +3 -6
- package/src/build-components/CountDown/pattern.json +10 -2
- package/src/build-components/Image/ImageProps.generated.ts +0 -2
- package/src/build-components/Image/pattern.json +5 -3
- package/src/build-components/Main/MainProps.generated.ts +0 -2
- package/src/build-components/Main/pattern.json +2 -2
- package/src/build-components/NavigationBarColor/NavigationBarColorProps.generated.ts +0 -2
- package/src/build-components/NavigationBarColor/pattern.json +2 -2
- package/src/build-components/Onboard/OnboardProps.generated.ts +0 -2
- package/src/build-components/Onboard/pattern.json +3 -5
- package/src/build-components/OnboardButton/OnboardButton.tsx +1 -4
- package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +0 -2
- package/src/build-components/OnboardButton/pattern.json +2 -2
- package/src/build-components/OnboardButtons/OnboardButtons.tsx +1 -9
- package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +0 -2
- package/src/build-components/OnboardButtons/pattern.json +2 -2
- package/src/build-components/OnboardDot/OnboardDot.tsx +2 -1
- package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +0 -2
- package/src/build-components/OnboardDot/pattern.json +2 -2
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +0 -2
- package/src/build-components/OnboardFooter/pattern.json +2 -2
- package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +0 -2
- package/src/build-components/OnboardImage/pattern.json +2 -2
- package/src/build-components/OnboardItem/OnboardItem.tsx +1 -1
- package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +0 -2
- package/src/build-components/OnboardItem/pattern.json +2 -2
- package/src/build-components/OnboardProvider/OnboardProvider.tsx +0 -1
- package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +0 -2
- package/src/build-components/OnboardProvider/pattern.json +2 -2
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +0 -2
- package/src/build-components/OnboardSubtitle/pattern.json +3 -5
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +0 -2
- package/src/build-components/OnboardTitle/pattern.json +3 -5
- package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +0 -2
- package/src/build-components/PaywallBackground/pattern.json +2 -4
- package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +0 -2
- package/src/build-components/PaywallCloseButton/pattern.json +3 -5
- package/src/build-components/PaywallOptions/PaywallOptionButton.tsx +1 -2
- package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +0 -2
- package/src/build-components/PaywallOptions/pattern.json +3 -5
- package/src/build-components/PaywallProvider/PaywallContext.ts +1 -1
- package/src/build-components/PaywallProvider/PaywallProvider.tsx +0 -10
- package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +0 -2
- package/src/build-components/PaywallProvider/pattern.json +2 -2
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButton.tsx +1 -1
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +0 -2
- package/src/build-components/PaywallSubscribeButton/pattern.json +3 -5
- package/src/build-components/RadioButton/RadioButton.tsx +1 -1
- package/src/build-components/RadioButton/RadioButtonProps.generated.ts +0 -2
- package/src/build-components/RadioButton/pattern.json +2 -2
- package/src/build-components/RenderNode.generated.tsx +0 -10
- package/src/build-components/Separator/SeparatorProps.generated.ts +0 -2
- package/src/build-components/Separator/pattern.json +2 -2
- package/src/build-components/StatusBarColor/StatusBarColorProps.generated.ts +0 -2
- package/src/build-components/StatusBarColor/pattern.json +2 -2
- package/src/build-components/Text/TextProps.generated.ts +0 -2
- package/src/build-components/Text/pattern.json +2 -3
- package/src/build-components/View/pattern.json +2 -0
- package/src/build-components/index.ts +0 -10
- package/src/build-components/patterns.generated.ts +850 -1759
- package/src/components/AttributesEditorPanel.tsx +48 -32
- package/src/components/Builder.tsx +9 -1
- package/src/components/BuilderProvider.tsx +2 -37
- package/src/hooks/useSafeAreaViewStyle.ts +1 -3
- package/src/index.ts +1 -1
- package/src/mockOS/managers/navigationManager.ts +1 -1
- package/src/pages/ProjectPage.tsx +47 -22
- package/src/pages/projectPageUtils.ts +15 -1
- package/src/pages/tabs/SideTool.tsx +1 -22
- package/src/paywall/hooks/index.ts +0 -1
- package/src/store.ts +1 -6
- package/src/styles/base/_global.scss +2 -0
- package/src/types/Project.ts +7 -0
- package/src/utils/analyseNodeByPatterns.ts +4 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/logRenderStore.ts +0 -1
- package/src/utils/novaToJson.ts +1 -5
- package/src/utils/parseColor.ts +1 -0
- package/src/utils/patterns.ts +2 -0
- package/src/utils/projectColors.ts +71 -0
- package/dist/build-components/Counter/Counter.d.ts +0 -2
- package/dist/build-components/Counter/CounterProps.generated.d.ts +0 -63
- package/dist/build-components/PaywallCounter/PaywallCounter.d.ts +0 -2
- package/dist/build-components/PaywallCounter/PaywallCounterProps.generated.d.ts +0 -63
- package/dist/paywall/hooks/useHandleGoBack.d.ts +0 -1
- package/src/build-components/Counter/Counter.tsx +0 -44
- package/src/build-components/Counter/CounterProps.generated.ts +0 -80
- package/src/build-components/Counter/pattern.json +0 -25
- package/src/build-components/PaywallCounter/PaywallCounter.tsx +0 -46
- package/src/build-components/PaywallCounter/PaywallCounterProps.generated.ts +0 -80
- package/src/build-components/PaywallCounter/pattern.json +0 -23
- package/src/paywall/hooks/useHandleGoBack.ts +0 -60
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "CountDown",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "never",
|
|
6
|
-
"extends": "
|
|
7
|
-
"attributes": {
|
|
8
|
+
"extends": "Text",
|
|
9
|
+
"attributes": {
|
|
10
|
+
"count": "number",
|
|
11
|
+
"style": {
|
|
12
|
+
"width": "never",
|
|
13
|
+
"textAlign": "never"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
8
16
|
},
|
|
9
17
|
"meta": {
|
|
10
18
|
"desiredParent": ["all"],
|
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "Image",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "never",
|
|
6
8
|
"extends": "View",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"src": "string",
|
|
11
11
|
"style": {
|
|
12
12
|
"resizeMode": ["cover", "contain", "stretch", "center"]
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"defaults": {
|
|
16
|
-
"
|
|
16
|
+
"style": {
|
|
17
|
+
"resizeMode": "contain"
|
|
18
|
+
}
|
|
17
19
|
}
|
|
18
20
|
},
|
|
19
21
|
"meta": {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "Main",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "node",
|
|
6
8
|
"extends": "View",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"useSafeAreaView": "boolean"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "NavigationBarColor",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "never",
|
|
6
8
|
"extends": "View",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"style": {
|
|
11
11
|
"backgroundColor": "color"
|
|
12
12
|
}
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "Onboard",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "node",
|
|
6
|
-
"extends": "View"
|
|
7
|
-
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description"
|
|
10
|
-
}
|
|
8
|
+
"extends": "View"
|
|
11
9
|
},
|
|
12
10
|
"meta": {
|
|
13
11
|
"desiredParent": ["=OnboardProvider"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, useId,
|
|
1
|
+
import React, { useContext, useId, useRef } from 'react';
|
|
2
2
|
import type {
|
|
3
3
|
EventObjectGenerated,
|
|
4
4
|
OnboardButtonComponentProps,
|
|
@@ -52,7 +52,6 @@ function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
52
52
|
const handleClick = () => {
|
|
53
53
|
//TODO: any ??
|
|
54
54
|
const events: EventObjectGenerated[] = attrs?.events ?? [];
|
|
55
|
-
let navigateHandled = false;
|
|
56
55
|
|
|
57
56
|
for (const e of events) {
|
|
58
57
|
// Check if event is already handled
|
|
@@ -69,13 +68,11 @@ function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
69
68
|
const eventTargetIndex = e.targetIndex;
|
|
70
69
|
if (typeof eventTargetIndex === 'number') {
|
|
71
70
|
emblaApi?.scrollTo(eventTargetIndex);
|
|
72
|
-
navigateHandled = true;
|
|
73
71
|
handledEventsRef.current.push(e);
|
|
74
72
|
//TODO: cause user to click second time
|
|
75
73
|
} else if (e.navigate_to) {
|
|
76
74
|
const eventTarget = e.navigate_to;
|
|
77
75
|
if (typeof eventTarget === 'string') {
|
|
78
|
-
navigateHandled = true;
|
|
79
76
|
handledEventsRef.current.push(e);
|
|
80
77
|
//TODO: cause user to click second time
|
|
81
78
|
if (context) {
|
|
@@ -76,8 +76,6 @@ export interface OnboardButtonPropsGenerated {
|
|
|
76
76
|
attributes: {
|
|
77
77
|
style?: OnboardButtonStyleGenerated;
|
|
78
78
|
scrollable?: boolean;
|
|
79
|
-
title?: string;
|
|
80
|
-
description?: string;
|
|
81
79
|
labelKey?: string;
|
|
82
80
|
button_text_color?: string;
|
|
83
81
|
animation?: AnimationOptionType;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "OnboardButton",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "never",
|
|
6
8
|
"extends": "View",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"labelKey": "string",
|
|
11
11
|
"button_text_color": "color",
|
|
12
12
|
"animation": [
|
|
@@ -15,11 +15,7 @@ function OnboardButtons({ node }: OnboardButtonsComponentProps) {
|
|
|
15
15
|
useLogRender('OnboardButtons');
|
|
16
16
|
node = useNode(node);
|
|
17
17
|
const attributeName = node.sourceType ?? node.type ?? 'OnboardButtons';
|
|
18
|
-
const {
|
|
19
|
-
const seperatorColorDefault =
|
|
20
|
-
appConfig?.theme === 'light'
|
|
21
|
-
? appConfig?.screenStyle?.light?.seperatorColor
|
|
22
|
-
: appConfig?.screenStyle?.dark?.seperatorColor;
|
|
18
|
+
const { previewMode, selectedKey } = useBuilderParams();
|
|
23
19
|
const ctx = useContext(onboardContext) ?? {};
|
|
24
20
|
const [selectedIndex, setSelectedIndex] = useState(ctx.selectedIndex ?? 0);
|
|
25
21
|
|
|
@@ -31,10 +27,6 @@ function OnboardButtons({ node }: OnboardButtonsComponentProps) {
|
|
|
31
27
|
|
|
32
28
|
const attrRecord = toAttributeRecord(node.attributes);
|
|
33
29
|
const styleBag = getStyleBag(node.attributes);
|
|
34
|
-
const direction =
|
|
35
|
-
(attrRecord.buttons_direction ?? styleBag?.buttons_direction) === 'column'
|
|
36
|
-
? 'column'
|
|
37
|
-
: 'row';
|
|
38
30
|
|
|
39
31
|
const children = useMemo(() => {
|
|
40
32
|
const raw = node.children as unknown;
|
|
@@ -67,8 +67,6 @@ export interface OnboardButtonsPropsGenerated {
|
|
|
67
67
|
attributes: {
|
|
68
68
|
style?: OnboardButtonsStyleGenerated;
|
|
69
69
|
scrollable?: boolean;
|
|
70
|
-
title?: string;
|
|
71
|
-
description?: string;
|
|
72
70
|
buttonType?: ButtonTypeOptionType;
|
|
73
71
|
skipNumber?: number;
|
|
74
72
|
buttons_direction?: ButtonsDirectionOptionType;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "OnboardButtons",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "node",
|
|
6
8
|
"extends": "View",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"buttonType": ["previous_button", "next_button", "skip_button"],
|
|
11
11
|
"skipNumber": "number",
|
|
12
12
|
"buttons_direction": ["row", "column"],
|
|
@@ -71,7 +71,8 @@ function OnboardDot({ node }: OnboardDotComponentProps) {
|
|
|
71
71
|
|
|
72
72
|
const extractedStyle = useExtractViewStyle(node);
|
|
73
73
|
const baseStyle = useMemo(() => {
|
|
74
|
-
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75
|
+
const { flexDirection, ...innerStyle } = extractedStyle;
|
|
75
76
|
return innerStyle;
|
|
76
77
|
}, [extractedStyle]);
|
|
77
78
|
const isSelected = isNodeSelected({
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "OnboardDot",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "never",
|
|
6
8
|
"extends": "View",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"dotType": [
|
|
11
11
|
"expanding_dot",
|
|
12
12
|
"normal_dot",
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "OnboardFooter",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "node",
|
|
6
8
|
"extends": "Text",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"textLocalizationKey": "string",
|
|
11
11
|
"linkedWordFirstLocalizationKey": "string",
|
|
12
12
|
"linkedWordFirstColor": "color",
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "OnboardImage",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "node",
|
|
6
8
|
"extends": "Image",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"video_url": "string",
|
|
11
11
|
"lottie": "string"
|
|
12
12
|
}
|
|
@@ -62,8 +62,6 @@ export interface OnboardItemPropsGenerated {
|
|
|
62
62
|
attributes: {
|
|
63
63
|
style?: OnboardItemStyleGenerated;
|
|
64
64
|
scrollable?: boolean;
|
|
65
|
-
title?: string;
|
|
66
|
-
description?: string;
|
|
67
65
|
display?: DisplayOptionType;
|
|
68
66
|
gap?: string;
|
|
69
67
|
flexDirection?: FlexDirectionOptionType;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "OnboardItem",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "node",
|
|
6
8
|
"extends": "View",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"display": ["flex", "block"],
|
|
11
11
|
"gap": "size",
|
|
12
12
|
"flexDirection": ["row", "column"],
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "OnboardProvider",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "node",
|
|
6
8
|
"extends": "View",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"theme": ["light", "dark", "all"],
|
|
11
11
|
"borderRadius": "never"
|
|
12
12
|
}
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "OnboardSubtitle",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "string",
|
|
6
|
-
"extends": "Text"
|
|
7
|
-
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description"
|
|
10
|
-
}
|
|
8
|
+
"extends": "Text"
|
|
11
9
|
},
|
|
12
10
|
"defaults": {
|
|
13
11
|
"style": {
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "OnboardTitle",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "string",
|
|
6
|
-
"extends": "Text"
|
|
7
|
-
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description"
|
|
10
|
-
}
|
|
8
|
+
"extends": "Text"
|
|
11
9
|
},
|
|
12
10
|
"defaults": {
|
|
13
11
|
"style": {
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "PaywallBackground",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "never",
|
|
6
8
|
"extends": "BackgroundImage",
|
|
7
|
-
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description"
|
|
10
|
-
},
|
|
11
9
|
"defaults": {
|
|
12
10
|
"resizeMode": "cover",
|
|
13
11
|
"style": {
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "PaywallCloseButton",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "never",
|
|
6
|
-
"extends": "BIcon"
|
|
7
|
-
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description"
|
|
10
|
-
}
|
|
8
|
+
"extends": "BIcon"
|
|
11
9
|
},
|
|
12
10
|
"meta": {
|
|
13
11
|
"desiredParent": [">PaywallProvider"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useId
|
|
1
|
+
import { useId } from 'react';
|
|
2
2
|
import type { Product } from '../../paywall/types/paywall-types';
|
|
3
3
|
import { useExtractViewStyle } from '../../attribute-analyser/style/web/useExtractViewStyle';
|
|
4
4
|
import type { NodeData } from '../../types/Node';
|
|
@@ -16,7 +16,6 @@ export type OptionsButtonProps = {
|
|
|
16
16
|
|
|
17
17
|
export function PaywallOptionButton({
|
|
18
18
|
product,
|
|
19
|
-
selected,
|
|
20
19
|
onPress,
|
|
21
20
|
node,
|
|
22
21
|
}: OptionsButtonProps) {
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "PaywallOptions",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"extends": "View",
|
|
6
|
-
"children": "node"
|
|
7
|
-
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description"
|
|
10
|
-
}
|
|
8
|
+
"children": "node"
|
|
11
9
|
},
|
|
12
10
|
"meta": {
|
|
13
11
|
"desiredParent": [">PaywallProvider"],
|
|
@@ -13,7 +13,6 @@ import { PaywallContext } from './PaywallContext';
|
|
|
13
13
|
import { useMockOSContext } from '../../mockOS/context/MockOSContextBase';
|
|
14
14
|
import type { Product } from '../../paywall/types/paywall-types';
|
|
15
15
|
import { useChangeDelayByPaywall } from '../../paywall/hooks/useChangeDelayByPaywall';
|
|
16
|
-
import { useHandleGoBack } from '../../paywall/hooks/useHandleGoBack';
|
|
17
16
|
import { useMockOSBackHandler } from '../../paywall/hooks/useMockOSBackHandler';
|
|
18
17
|
|
|
19
18
|
function PaywallProvider({ node }: PaywallProviderComponentProps) {
|
|
@@ -99,15 +98,6 @@ function PaywallProvider({ node }: PaywallProviderComponentProps) {
|
|
|
99
98
|
}
|
|
100
99
|
}, [mockOS, isBackAllowed]);
|
|
101
100
|
|
|
102
|
-
const handleGoBack = useCallback(() => {
|
|
103
|
-
if (!isBackAllowed) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
return true;
|
|
107
|
-
}, [isBackAllowed]);
|
|
108
|
-
|
|
109
|
-
useHandleGoBack(handleGoBack);
|
|
110
|
-
|
|
111
101
|
const handleSubscribe = useCallback(
|
|
112
102
|
async (product?: Product): Promise<boolean> => {
|
|
113
103
|
// Host app override wins.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "PaywallProvider",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "node",
|
|
6
8
|
"extends": "View",
|
|
7
9
|
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description",
|
|
10
10
|
"delay": "number"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useId
|
|
1
|
+
import React, { useId } from 'react';
|
|
2
2
|
import type { PaywallSubscribeButtonComponentProps } from './PaywallSubscribeButtonProps.generated';
|
|
3
3
|
import useNode from '../useNode';
|
|
4
4
|
import { useBuilderParams } from '../../components/BuilderProvider';
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"pattern": {
|
|
4
4
|
"type": "PaywallSubscribeButton",
|
|
5
|
+
"title": "title",
|
|
6
|
+
"description": "description",
|
|
5
7
|
"children": "string",
|
|
6
|
-
"extends": "Button"
|
|
7
|
-
"attributes": {
|
|
8
|
-
"title": "title",
|
|
9
|
-
"description": "description"
|
|
10
|
-
}
|
|
8
|
+
"extends": "Button"
|
|
11
9
|
},
|
|
12
10
|
"defaults": {
|
|
13
11
|
"style": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, useId
|
|
1
|
+
import React, { useContext, useId } from 'react';
|
|
2
2
|
import type { RadioButtonComponentProps } from './RadioButtonProps.generated';
|
|
3
3
|
import useNode from '../useNode';
|
|
4
4
|
import { useBuilderParams } from '../../components/BuilderProvider';
|