@developer_tribe/react-builder 1.2.14 → 1.2.15
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/build-components/BIcon/BIconProps.generated.d.ts +2 -0
- package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +2 -0
- package/dist/build-components/Button/ButtonProps.generated.d.ts +2 -0
- package/dist/build-components/Carousel/CarouselProps.generated.d.ts +2 -0
- package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +2 -0
- package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +2 -0
- package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +2 -0
- package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +2 -0
- package/dist/build-components/CountDown/CountDown.d.ts +2 -0
- package/dist/build-components/CountDown/CountDownProps.generated.d.ts +61 -0
- package/dist/build-components/CountDown/formatCountdownTime.d.ts +1 -0
- package/dist/build-components/Counter/Counter.d.ts +2 -0
- package/dist/build-components/Counter/CounterProps.generated.d.ts +61 -0
- package/dist/build-components/Image/ImageProps.generated.d.ts +2 -0
- package/dist/build-components/Main/MainProps.generated.d.ts +2 -0
- package/dist/build-components/Onboard/OnboardProps.generated.d.ts +2 -0
- package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +2 -0
- package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +2 -0
- package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +2 -0
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +2 -0
- package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +2 -0
- package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +2 -0
- package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +2 -0
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +2 -0
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +2 -0
- package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +2 -0
- package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +2 -0
- package/dist/build-components/PaywallCounter/PaywallCounter.d.ts +2 -0
- package/dist/build-components/PaywallCounter/PaywallCounterProps.generated.d.ts +61 -0
- package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +2 -0
- package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +2 -0
- package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +2 -0
- package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +2 -0
- package/dist/build-components/Text/TextProps.generated.d.ts +2 -0
- package/dist/build-components/View/ViewProps.generated.d.ts +2 -0
- package/dist/build-components/index.d.ts +4 -1
- package/dist/build-components/patterns.generated.d.ts +2961 -1552
- package/dist/components/BuilderProvider.d.ts +0 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.d.ts +7 -0
- package/dist/index.web.cjs.js +7 -5
- package/dist/index.web.cjs.js.map +1 -1
- package/dist/index.web.esm.js +7 -5
- package/dist/index.web.esm.js.map +1 -1
- package/dist/utils/getDefaultProject.d.ts +4 -0
- package/dist/utils/patterns.d.ts +3 -0
- package/package.json +2 -1
- package/scripts/prebuild/utils/createComponentTsx.js +1 -1
- package/scripts/prebuild/utils/createGeneratedProps.js +6 -2
- package/scripts/prebuild/utils/createRenderNodeGenerated.js +26 -5
- package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +17 -5
- package/scripts/prebuild/utils/validateExistingComponentTsx.js +12 -8
- package/src/AttributesEditor.tsx +7 -2
- package/src/RenderPage.tsx +34 -3
- package/src/assets/meta.json +1 -1
- package/src/assets/samples/carousel-sample.json +44 -14
- package/src/assets/samples/getSamples.ts +3 -1
- package/src/assets/samples/paywall-1.json +73 -29
- package/src/assets/samples/paywall-2.json +338 -0
- package/src/assets/samples/simple-1.json +9 -3
- package/src/assets/samples/simple-2.json +72 -24
- package/src/assets/samples/unmigrated-builder-1.1.1.json +19 -7
- package/src/assets/samples/unmigrated-builder1.json +10 -4
- package/src/assets/samples/unvalidated-builder1.json +10 -4
- package/src/assets/samples/unvalidated-crash1.json +3 -1
- package/src/assets/samples/unvalidated-crashcomponent1.json +3 -1
- package/src/assets/samples/vpn-onboard-1.json +88 -40
- package/src/assets/samples/vpn-onboard-2.json +85 -37
- package/src/assets/samples/vpn-onboard-3.json +93 -45
- package/src/assets/samples/vpn-onboard-4.json +93 -45
- package/src/assets/samples/vpn-onboard-5.json +121 -53
- package/src/assets/samples/vpn-onboard-6.json +93 -45
- package/src/attributes-editor/AttributesEditorView.tsx +39 -1
- package/src/attributes-editor/Field.tsx +30 -0
- package/src/build-components/BIcon/BIconProps.generated.ts +2 -0
- package/src/build-components/BIcon/pattern.json +2 -0
- package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +2 -0
- package/src/build-components/BackgroundImage/pattern.json +2 -0
- package/src/build-components/Button/ButtonProps.generated.ts +2 -0
- package/src/build-components/Button/pattern.json +2 -0
- package/src/build-components/Carousel/CarouselProps.generated.ts +2 -0
- package/src/build-components/Carousel/pattern.json +2 -0
- package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +2 -0
- package/src/build-components/CarouselButtons/pattern.json +2 -0
- package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +2 -0
- package/src/build-components/CarouselDots/pattern.json +2 -0
- package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +2 -0
- package/src/build-components/CarouselItem/pattern.json +4 -1
- package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +2 -0
- package/src/build-components/CarouselProvider/pattern.json +4 -1
- package/src/build-components/CountDown/CountDown.tsx +73 -0
- package/src/build-components/CountDown/CountDownProps.generated.ts +78 -0
- package/src/build-components/CountDown/formatCountdownTime.ts +10 -0
- package/src/build-components/CountDown/pattern.json +24 -0
- package/src/build-components/Counter/Counter.tsx +44 -0
- package/src/build-components/Counter/CounterProps.generated.ts +78 -0
- package/src/build-components/Counter/pattern.json +26 -0
- package/src/build-components/Image/ImageProps.generated.ts +2 -0
- package/src/build-components/Image/pattern.json +2 -0
- package/src/build-components/Main/MainProps.generated.ts +2 -0
- package/src/build-components/Main/pattern.json +2 -0
- package/src/build-components/Onboard/OnboardProps.generated.ts +2 -0
- package/src/build-components/Onboard/pattern.json +4 -1
- package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +2 -0
- package/src/build-components/OnboardButton/pattern.json +2 -0
- package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +2 -0
- package/src/build-components/OnboardButtons/pattern.json +2 -0
- package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +2 -0
- package/src/build-components/OnboardDot/pattern.json +2 -0
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +2 -0
- package/src/build-components/OnboardFooter/pattern.json +2 -0
- package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +2 -0
- package/src/build-components/OnboardImage/pattern.json +2 -0
- package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +2 -0
- package/src/build-components/OnboardItem/pattern.json +2 -0
- package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +2 -0
- package/src/build-components/OnboardProvider/pattern.json +2 -0
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +2 -0
- package/src/build-components/OnboardSubtitle/pattern.json +4 -1
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +2 -0
- package/src/build-components/OnboardTitle/pattern.json +4 -1
- package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +2 -0
- package/src/build-components/PaywallBackground/pattern.json +4 -1
- package/src/build-components/PaywallCloseButton/PaywallCloseButton.tsx +7 -5
- package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +2 -0
- package/src/build-components/PaywallCloseButton/pattern.json +4 -1
- package/src/build-components/PaywallCounter/PaywallCounter.tsx +49 -0
- package/src/build-components/PaywallCounter/PaywallCounterProps.generated.ts +78 -0
- package/src/build-components/PaywallCounter/pattern.json +24 -0
- package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +2 -0
- package/src/build-components/PaywallOptions/pattern.json +4 -1
- package/src/build-components/PaywallProvider/PaywallProvider.tsx +8 -16
- package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +2 -0
- package/src/build-components/PaywallProvider/pattern.json +4 -1
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +2 -0
- package/src/build-components/PaywallSubscribeButton/pattern.json +4 -1
- package/src/build-components/RadioButton/RadioButtonProps.generated.ts +2 -0
- package/src/build-components/RadioButton/pattern.json +2 -0
- package/src/build-components/RenderNode.generated.tsx +17 -2
- package/src/build-components/Text/TextProps.generated.ts +2 -0
- package/src/build-components/Text/pattern.json +3 -1
- package/src/build-components/View/View.tsx +1 -1
- package/src/build-components/View/ViewProps.generated.ts +2 -0
- package/src/build-components/View/pattern.json +35 -38
- package/src/build-components/index.ts +15 -0
- package/src/build-components/patterns.generated.ts +3084 -1570
- package/src/components/BuilderButton.tsx +23 -6
- package/src/components/BuilderProvider.tsx +10 -7
- package/src/index.native.ts +7 -0
- package/src/index.ts +1 -0
- package/src/mockOS/context/MockOSContext.tsx +22 -8
- package/src/mockOS/managers/navigationManager.ts +4 -0
- package/src/pages/projectPageUtils.ts +3 -2
- package/src/utils/analyseNodeByPatterns.ts +21 -0
- package/src/utils/getDefaultProject.ts +34 -0
- package/src/utils/patterns.ts +6 -7
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* AUTO-GENERATED FILE - DO NOT EDIT */
|
|
2
|
+
|
|
3
|
+
import type { NodeData } from '../../types/Node';
|
|
4
|
+
|
|
5
|
+
export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
|
|
6
|
+
export type FlexDirectionOptionType = 'row' | 'column';
|
|
7
|
+
export type AlignItemsOptionType =
|
|
8
|
+
| 'flex-start'
|
|
9
|
+
| 'center'
|
|
10
|
+
| 'flex-end'
|
|
11
|
+
| 'stretch'
|
|
12
|
+
| 'baseline';
|
|
13
|
+
export type JustifyContentOptionType =
|
|
14
|
+
| 'flex-start'
|
|
15
|
+
| 'center'
|
|
16
|
+
| 'flex-end'
|
|
17
|
+
| 'space-between'
|
|
18
|
+
| 'space-around'
|
|
19
|
+
| 'space-evenly';
|
|
20
|
+
export type PositionOptionType = 'relative' | 'absolute';
|
|
21
|
+
|
|
22
|
+
export interface PaywallCounterStyleGenerated {
|
|
23
|
+
color?: string;
|
|
24
|
+
fontSize?: string;
|
|
25
|
+
fontFamily?: string;
|
|
26
|
+
fontWeight?: string;
|
|
27
|
+
textAlign?: TextAlignOptionType;
|
|
28
|
+
flexDirection?: FlexDirectionOptionType;
|
|
29
|
+
alignItems?: AlignItemsOptionType;
|
|
30
|
+
justifyContent?: JustifyContentOptionType;
|
|
31
|
+
gap?: string;
|
|
32
|
+
padding?: string;
|
|
33
|
+
paddingHorizontal?: string;
|
|
34
|
+
paddingVertical?: string;
|
|
35
|
+
paddingTop?: string;
|
|
36
|
+
paddingBottom?: string;
|
|
37
|
+
paddingLeft?: string;
|
|
38
|
+
paddingRight?: string;
|
|
39
|
+
margin?: string;
|
|
40
|
+
marginHorizontal?: string;
|
|
41
|
+
marginVertical?: string;
|
|
42
|
+
marginTop?: string;
|
|
43
|
+
marginBottom?: string;
|
|
44
|
+
marginLeft?: string;
|
|
45
|
+
marginRight?: string;
|
|
46
|
+
backgroundColor?: string;
|
|
47
|
+
borderRadius?: string;
|
|
48
|
+
width?: string;
|
|
49
|
+
minWidth?: string;
|
|
50
|
+
maxWidth?: string;
|
|
51
|
+
height?: string;
|
|
52
|
+
minHeight?: string;
|
|
53
|
+
maxHeight?: string;
|
|
54
|
+
flex?: number;
|
|
55
|
+
position?: PositionOptionType;
|
|
56
|
+
top?: string;
|
|
57
|
+
bottom?: string;
|
|
58
|
+
left?: string;
|
|
59
|
+
right?: string;
|
|
60
|
+
zIndex?: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface PaywallCounterPropsGenerated {
|
|
64
|
+
child: string;
|
|
65
|
+
attributes: {
|
|
66
|
+
style?: PaywallCounterStyleGenerated;
|
|
67
|
+
count?: number;
|
|
68
|
+
title?: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
adjustsFontSizeToFit?: boolean;
|
|
71
|
+
showEllipsis?: boolean;
|
|
72
|
+
scrollable?: boolean;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface PaywallCounterComponentProps {
|
|
77
|
+
node: NodeData<PaywallCounterPropsGenerated['attributes']>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 2,
|
|
3
|
+
"pattern": {
|
|
4
|
+
"type": "PaywallCounter",
|
|
5
|
+
"children": "never",
|
|
6
|
+
"extends": "Counter",
|
|
7
|
+
"attributes": {}
|
|
8
|
+
},
|
|
9
|
+
"meta": {
|
|
10
|
+
"desiredParent": ["all"],
|
|
11
|
+
"label": "Paywall Counter",
|
|
12
|
+
"description": "Displays the paywall counter value.",
|
|
13
|
+
"attributes": {
|
|
14
|
+
"count": {
|
|
15
|
+
"label": "Fallback Count",
|
|
16
|
+
"description": "Used only when the paywall counter hook returns no value.",
|
|
17
|
+
"category": "other",
|
|
18
|
+
"specialCategory": null,
|
|
19
|
+
"sort": 1
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
@@ -20,14 +20,8 @@ function PaywallProvider({ node }: PaywallProviderComponentProps) {
|
|
|
20
20
|
const attributeName = node.sourceType ?? node.type ?? 'PaywallProvider';
|
|
21
21
|
const attributeKey = node.key ?? generatedId;
|
|
22
22
|
|
|
23
|
-
const {
|
|
24
|
-
|
|
25
|
-
products,
|
|
26
|
-
onPaywallClose,
|
|
27
|
-
onPaywallSubscribe,
|
|
28
|
-
previewMode,
|
|
29
|
-
selectedKey,
|
|
30
|
-
} = useBuilderParams();
|
|
23
|
+
const { benefits, products, onPaywallSubscribe, previewMode, selectedKey } =
|
|
24
|
+
useBuilderParams();
|
|
31
25
|
const mockOS = useMockOSContext();
|
|
32
26
|
const benefitLocalizationParams = useMemo(() => {
|
|
33
27
|
const raw =
|
|
@@ -85,17 +79,15 @@ function PaywallProvider({ node }: PaywallProviderComponentProps) {
|
|
|
85
79
|
}, [products, selectedProductId]);
|
|
86
80
|
|
|
87
81
|
const handleClose = useCallback(() => {
|
|
88
|
-
// Host app override wins.
|
|
89
|
-
if (onPaywallClose) {
|
|
90
|
-
onPaywallClose();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
82
|
// Default: in MockOS go back (simulate dismissing paywall screen).
|
|
94
83
|
// TODO: at react native merge it will change
|
|
95
|
-
if (mockOS?.isEnabled
|
|
96
|
-
mockOS.goBack();
|
|
84
|
+
if (mockOS?.isEnabled) {
|
|
85
|
+
const canGoBack = mockOS.goBack();
|
|
86
|
+
if (!canGoBack) {
|
|
87
|
+
mockOS.navigation('launchscreen');
|
|
88
|
+
}
|
|
97
89
|
}
|
|
98
|
-
}, [mockOS
|
|
90
|
+
}, [mockOS]);
|
|
99
91
|
|
|
100
92
|
const handleSubscribe = useCallback(
|
|
101
93
|
async (product?: { productId?: string }) => {
|
|
@@ -21,6 +21,8 @@ import type { CarouselButtonsComponentProps } from './CarouselButtons/CarouselBu
|
|
|
21
21
|
import type { CarouselDotsComponentProps } from './CarouselDots/CarouselDotsProps.generated';
|
|
22
22
|
import type { CarouselItemComponentProps } from './CarouselItem/CarouselItemProps.generated';
|
|
23
23
|
import type { CarouselProviderComponentProps } from './CarouselProvider/CarouselProviderProps.generated';
|
|
24
|
+
import type { CountDownComponentProps } from './CountDown/CountDownProps.generated';
|
|
25
|
+
import type { CounterComponentProps } from './Counter/CounterProps.generated';
|
|
24
26
|
import type { ImageComponentProps } from './Image/ImageProps.generated';
|
|
25
27
|
import type { MainComponentProps } from './Main/MainProps.generated';
|
|
26
28
|
import type { OnboardComponentProps } from './Onboard/OnboardProps.generated';
|
|
@@ -35,6 +37,7 @@ import type { OnboardSubtitleComponentProps } from './OnboardSubtitle/OnboardSub
|
|
|
35
37
|
import type { OnboardTitleComponentProps } from './OnboardTitle/OnboardTitleProps.generated';
|
|
36
38
|
import type { PaywallBackgroundComponentProps } from './PaywallBackground/PaywallBackgroundProps.generated';
|
|
37
39
|
import type { PaywallCloseButtonComponentProps } from './PaywallCloseButton/PaywallCloseButtonProps.generated';
|
|
40
|
+
import type { PaywallCounterComponentProps } from './PaywallCounter/PaywallCounterProps.generated';
|
|
38
41
|
import type { PaywallOptionsComponentProps } from './PaywallOptions/PaywallOptionsProps.generated';
|
|
39
42
|
import type { PaywallProviderComponentProps } from './PaywallProvider/PaywallProviderProps.generated';
|
|
40
43
|
import type { PaywallSubscribeButtonComponentProps } from './PaywallSubscribeButton/PaywallSubscribeButtonProps.generated';
|
|
@@ -47,8 +50,10 @@ import Button from './Button/Button';
|
|
|
47
50
|
import Carousel from './Carousel/Carousel';
|
|
48
51
|
import CarouselButtons from './CarouselButtons/CarouselButtons';
|
|
49
52
|
import CarouselDots from './CarouselDots/CarouselDots';
|
|
50
|
-
import CarouselItem from './CarouselItem/CarouselItem';
|
|
53
|
+
import { CarouselItem } from './CarouselItem/CarouselItem';
|
|
51
54
|
import CarouselProvider from './CarouselProvider/CarouselProvider';
|
|
55
|
+
import { CountDown } from './CountDown/CountDown';
|
|
56
|
+
import { Counter } from './Counter/Counter';
|
|
52
57
|
import Image from './Image/Image';
|
|
53
58
|
import Main from './Main/Main';
|
|
54
59
|
import Onboard from './Onboard/Onboard';
|
|
@@ -63,12 +68,13 @@ import OnboardSubtitle from './OnboardSubtitle/OnboardSubtitle';
|
|
|
63
68
|
import OnboardTitle from './OnboardTitle/OnboardTitle';
|
|
64
69
|
import PaywallBackground from './PaywallBackground/PaywallBackground';
|
|
65
70
|
import PaywallCloseButton from './PaywallCloseButton/PaywallCloseButton';
|
|
71
|
+
import { PaywallCounter } from './PaywallCounter/PaywallCounter';
|
|
66
72
|
import PaywallOptions from './PaywallOptions/PaywallOptions';
|
|
67
73
|
import PaywallProvider from './PaywallProvider/PaywallProvider';
|
|
68
74
|
import PaywallSubscribeButton from './PaywallSubscribeButton/PaywallSubscribeButton';
|
|
69
75
|
import RadioButton from './RadioButton/RadioButton';
|
|
70
76
|
import Text from './Text/Text';
|
|
71
|
-
import View from './View/View';
|
|
77
|
+
import { View } from './View/View';
|
|
72
78
|
|
|
73
79
|
type BuilderNode =
|
|
74
80
|
| (BIconComponentProps['node'] & { type: 'BIcon' })
|
|
@@ -79,6 +85,8 @@ type BuilderNode =
|
|
|
79
85
|
| (CarouselDotsComponentProps['node'] & { type: 'CarouselDots' })
|
|
80
86
|
| (CarouselItemComponentProps['node'] & { type: 'CarouselItem' })
|
|
81
87
|
| (CarouselProviderComponentProps['node'] & { type: 'CarouselProvider' })
|
|
88
|
+
| (CountDownComponentProps['node'] & { type: 'CountDown' })
|
|
89
|
+
| (CounterComponentProps['node'] & { type: 'Counter' })
|
|
82
90
|
| (ImageComponentProps['node'] & { type: 'Image' })
|
|
83
91
|
| (MainComponentProps['node'] & { type: 'Main' })
|
|
84
92
|
| (OnboardComponentProps['node'] & { type: 'Onboard' })
|
|
@@ -93,6 +101,7 @@ type BuilderNode =
|
|
|
93
101
|
| (OnboardTitleComponentProps['node'] & { type: 'OnboardTitle' })
|
|
94
102
|
| (PaywallBackgroundComponentProps['node'] & { type: 'PaywallBackground' })
|
|
95
103
|
| (PaywallCloseButtonComponentProps['node'] & { type: 'PaywallCloseButton' })
|
|
104
|
+
| (PaywallCounterComponentProps['node'] & { type: 'PaywallCounter' })
|
|
96
105
|
| (PaywallOptionsComponentProps['node'] & { type: 'PaywallOptions' })
|
|
97
106
|
| (PaywallProviderComponentProps['node'] & { type: 'PaywallProvider' })
|
|
98
107
|
| (PaywallSubscribeButtonComponentProps['node'] & {
|
|
@@ -148,6 +157,10 @@ function RenderNode({ node }: { node: Node }) {
|
|
|
148
157
|
return <CarouselItem node={normalizedNode} />;
|
|
149
158
|
case 'CarouselProvider':
|
|
150
159
|
return <CarouselProvider node={normalizedNode} />;
|
|
160
|
+
case 'CountDown':
|
|
161
|
+
return <CountDown node={normalizedNode} />;
|
|
162
|
+
case 'Counter':
|
|
163
|
+
return <Counter node={normalizedNode} />;
|
|
151
164
|
case 'Image':
|
|
152
165
|
return <Image node={normalizedNode} />;
|
|
153
166
|
case 'Main':
|
|
@@ -176,6 +189,8 @@ function RenderNode({ node }: { node: Node }) {
|
|
|
176
189
|
return <PaywallBackground node={normalizedNode} />;
|
|
177
190
|
case 'PaywallCloseButton':
|
|
178
191
|
return <PaywallCloseButton node={normalizedNode} />;
|
|
192
|
+
case 'PaywallCounter':
|
|
193
|
+
return <PaywallCounter node={normalizedNode} />;
|
|
179
194
|
case 'PaywallOptions':
|
|
180
195
|
return <PaywallOptions node={normalizedNode} />;
|
|
181
196
|
case 'PaywallProvider':
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
"children": "string",
|
|
6
6
|
"extends": "View",
|
|
7
7
|
"attributes": {
|
|
8
|
+
"title": "title",
|
|
9
|
+
"description": "description",
|
|
8
10
|
"adjustsFontSizeToFit": "boolean",
|
|
9
11
|
"showEllipsis": "boolean",
|
|
10
12
|
"style": {
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
"category": "style",
|
|
37
39
|
"specialCategory": null,
|
|
38
40
|
"sort": 2,
|
|
39
|
-
"
|
|
41
|
+
"preferredScale": "s"
|
|
40
42
|
},
|
|
41
43
|
"fontFamily": {
|
|
42
44
|
"label": "Font Family",
|
|
@@ -30,7 +30,7 @@ export function View({ node }: ViewComponentProps) {
|
|
|
30
30
|
<div
|
|
31
31
|
attribute-name={attributeName}
|
|
32
32
|
attribute-key={attributeKey}
|
|
33
|
-
style={viewStyle}
|
|
33
|
+
style={{ ...viewStyle, boxSizing: 'border-box' }}
|
|
34
34
|
className="scroll-container"
|
|
35
35
|
>
|
|
36
36
|
<RenderNode node={node.children as Node} />
|
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
"type": "View",
|
|
5
5
|
"children": "node",
|
|
6
6
|
"attributes": {
|
|
7
|
+
"title": "title",
|
|
8
|
+
"description": "description",
|
|
7
9
|
"scrollable": "boolean",
|
|
8
10
|
"style": {
|
|
9
|
-
"flexDirection": [
|
|
10
|
-
"row",
|
|
11
|
-
"column"
|
|
12
|
-
],
|
|
11
|
+
"flexDirection": ["row", "column"],
|
|
13
12
|
"alignItems": [
|
|
14
13
|
"flex-start",
|
|
15
14
|
"center",
|
|
@@ -49,10 +48,7 @@
|
|
|
49
48
|
"minHeight": "size",
|
|
50
49
|
"maxHeight": "size",
|
|
51
50
|
"flex": "number",
|
|
52
|
-
"position": [
|
|
53
|
-
"relative",
|
|
54
|
-
"absolute"
|
|
55
|
-
],
|
|
51
|
+
"position": ["relative", "absolute"],
|
|
56
52
|
"top": "size",
|
|
57
53
|
"bottom": "size",
|
|
58
54
|
"left": "size",
|
|
@@ -62,9 +58,7 @@
|
|
|
62
58
|
}
|
|
63
59
|
},
|
|
64
60
|
"meta": {
|
|
65
|
-
"desiredParent": [
|
|
66
|
-
"all"
|
|
67
|
-
],
|
|
61
|
+
"desiredParent": ["all"],
|
|
68
62
|
"label": "View",
|
|
69
63
|
"description": "Base layout container.",
|
|
70
64
|
"specialCategories": {
|
|
@@ -107,7 +101,7 @@
|
|
|
107
101
|
"category": "style",
|
|
108
102
|
"specialCategory": null,
|
|
109
103
|
"sort": 21,
|
|
110
|
-
"
|
|
104
|
+
"preferredScale": "s"
|
|
111
105
|
}
|
|
112
106
|
},
|
|
113
107
|
"attributes": {
|
|
@@ -145,7 +139,7 @@
|
|
|
145
139
|
"category": "container",
|
|
146
140
|
"specialCategory": null,
|
|
147
141
|
"sort": 10,
|
|
148
|
-
"
|
|
142
|
+
"preferredScale": "s"
|
|
149
143
|
},
|
|
150
144
|
"padding": {
|
|
151
145
|
"label": "Padding",
|
|
@@ -153,7 +147,7 @@
|
|
|
153
147
|
"category": "container",
|
|
154
148
|
"specialCategory": "padding",
|
|
155
149
|
"sort": 6,
|
|
156
|
-
"
|
|
150
|
+
"preferredScale": "s"
|
|
157
151
|
},
|
|
158
152
|
"paddingHorizontal": {
|
|
159
153
|
"label": "Padding Horizontal",
|
|
@@ -161,7 +155,7 @@
|
|
|
161
155
|
"category": "container",
|
|
162
156
|
"specialCategory": "padding",
|
|
163
157
|
"sort": 7,
|
|
164
|
-
"
|
|
158
|
+
"preferredScale": "s"
|
|
165
159
|
},
|
|
166
160
|
"paddingVertical": {
|
|
167
161
|
"label": "Padding Vertical",
|
|
@@ -169,7 +163,7 @@
|
|
|
169
163
|
"category": "container",
|
|
170
164
|
"specialCategory": "padding",
|
|
171
165
|
"sort": 8,
|
|
172
|
-
"
|
|
166
|
+
"preferredScale": "vs"
|
|
173
167
|
},
|
|
174
168
|
"paddingTop": {
|
|
175
169
|
"label": "Padding Top",
|
|
@@ -177,7 +171,7 @@
|
|
|
177
171
|
"category": "container",
|
|
178
172
|
"specialCategory": "padding",
|
|
179
173
|
"sort": 9,
|
|
180
|
-
"
|
|
174
|
+
"preferredScale": "vs"
|
|
181
175
|
},
|
|
182
176
|
"paddingBottom": {
|
|
183
177
|
"label": "Padding Bottom",
|
|
@@ -185,7 +179,7 @@
|
|
|
185
179
|
"category": "container",
|
|
186
180
|
"specialCategory": "padding",
|
|
187
181
|
"sort": 10,
|
|
188
|
-
"
|
|
182
|
+
"preferredScale": "vs"
|
|
189
183
|
},
|
|
190
184
|
"paddingLeft": {
|
|
191
185
|
"label": "Padding Left",
|
|
@@ -193,7 +187,7 @@
|
|
|
193
187
|
"category": "container",
|
|
194
188
|
"specialCategory": "padding",
|
|
195
189
|
"sort": 11,
|
|
196
|
-
"
|
|
190
|
+
"preferredScale": "s"
|
|
197
191
|
},
|
|
198
192
|
"paddingRight": {
|
|
199
193
|
"label": "Padding Right",
|
|
@@ -201,7 +195,7 @@
|
|
|
201
195
|
"category": "container",
|
|
202
196
|
"specialCategory": "padding",
|
|
203
197
|
"sort": 12,
|
|
204
|
-
"
|
|
198
|
+
"preferredScale": "s"
|
|
205
199
|
},
|
|
206
200
|
"margin": {
|
|
207
201
|
"label": "Margin",
|
|
@@ -209,7 +203,7 @@
|
|
|
209
203
|
"category": "container",
|
|
210
204
|
"specialCategory": "margin",
|
|
211
205
|
"sort": 13,
|
|
212
|
-
"
|
|
206
|
+
"preferredScale": "s"
|
|
213
207
|
},
|
|
214
208
|
"marginHorizontal": {
|
|
215
209
|
"label": "Margin Horizontal",
|
|
@@ -217,7 +211,7 @@
|
|
|
217
211
|
"category": "container",
|
|
218
212
|
"specialCategory": "margin",
|
|
219
213
|
"sort": 14,
|
|
220
|
-
"
|
|
214
|
+
"preferredScale": "s"
|
|
221
215
|
},
|
|
222
216
|
"marginVertical": {
|
|
223
217
|
"label": "Margin Vertical",
|
|
@@ -225,7 +219,7 @@
|
|
|
225
219
|
"category": "container",
|
|
226
220
|
"specialCategory": "margin",
|
|
227
221
|
"sort": 15,
|
|
228
|
-
"
|
|
222
|
+
"preferredScale": "vs"
|
|
229
223
|
},
|
|
230
224
|
"marginTop": {
|
|
231
225
|
"label": "Margin Top",
|
|
@@ -233,7 +227,7 @@
|
|
|
233
227
|
"category": "container",
|
|
234
228
|
"specialCategory": "margin",
|
|
235
229
|
"sort": 16,
|
|
236
|
-
"
|
|
230
|
+
"preferredScale": "vs"
|
|
237
231
|
},
|
|
238
232
|
"marginBottom": {
|
|
239
233
|
"label": "Margin Bottom",
|
|
@@ -241,7 +235,7 @@
|
|
|
241
235
|
"category": "container",
|
|
242
236
|
"specialCategory": "margin",
|
|
243
237
|
"sort": 17,
|
|
244
|
-
"
|
|
238
|
+
"preferredScale": "vs"
|
|
245
239
|
},
|
|
246
240
|
"marginLeft": {
|
|
247
241
|
"label": "Margin Left",
|
|
@@ -249,7 +243,7 @@
|
|
|
249
243
|
"category": "container",
|
|
250
244
|
"specialCategory": "margin",
|
|
251
245
|
"sort": 18,
|
|
252
|
-
"
|
|
246
|
+
"preferredScale": "s"
|
|
253
247
|
},
|
|
254
248
|
"marginRight": {
|
|
255
249
|
"label": "Margin Right",
|
|
@@ -257,7 +251,7 @@
|
|
|
257
251
|
"category": "container",
|
|
258
252
|
"specialCategory": "margin",
|
|
259
253
|
"sort": 19,
|
|
260
|
-
"
|
|
254
|
+
"preferredScale": "s"
|
|
261
255
|
},
|
|
262
256
|
"width": {
|
|
263
257
|
"label": "Width",
|
|
@@ -265,7 +259,7 @@
|
|
|
265
259
|
"category": "container",
|
|
266
260
|
"specialCategory": "size",
|
|
267
261
|
"sort": 0,
|
|
268
|
-
"
|
|
262
|
+
"preferredScale": "s"
|
|
269
263
|
},
|
|
270
264
|
"minWidth": {
|
|
271
265
|
"label": "Min Width",
|
|
@@ -273,7 +267,7 @@
|
|
|
273
267
|
"category": "container",
|
|
274
268
|
"specialCategory": "size",
|
|
275
269
|
"sort": 1,
|
|
276
|
-
"
|
|
270
|
+
"preferredScale": "s"
|
|
277
271
|
},
|
|
278
272
|
"maxWidth": {
|
|
279
273
|
"label": "Max Width",
|
|
@@ -281,7 +275,7 @@
|
|
|
281
275
|
"category": "container",
|
|
282
276
|
"specialCategory": "size",
|
|
283
277
|
"sort": 2,
|
|
284
|
-
"
|
|
278
|
+
"preferredScale": "s"
|
|
285
279
|
},
|
|
286
280
|
"height": {
|
|
287
281
|
"label": "Height",
|
|
@@ -289,7 +283,7 @@
|
|
|
289
283
|
"category": "container",
|
|
290
284
|
"specialCategory": "size",
|
|
291
285
|
"sort": 3,
|
|
292
|
-
"
|
|
286
|
+
"preferredScale": "vs"
|
|
293
287
|
},
|
|
294
288
|
"minHeight": {
|
|
295
289
|
"label": "Min Height",
|
|
@@ -297,7 +291,7 @@
|
|
|
297
291
|
"category": "container",
|
|
298
292
|
"specialCategory": "size",
|
|
299
293
|
"sort": 4,
|
|
300
|
-
"
|
|
294
|
+
"preferredScale": "vs"
|
|
301
295
|
},
|
|
302
296
|
"maxHeight": {
|
|
303
297
|
"label": "Max Height",
|
|
@@ -305,7 +299,7 @@
|
|
|
305
299
|
"category": "container",
|
|
306
300
|
"specialCategory": "size",
|
|
307
301
|
"sort": 5,
|
|
308
|
-
"
|
|
302
|
+
"preferredScale": "vs"
|
|
309
303
|
},
|
|
310
304
|
"flex": {
|
|
311
305
|
"label": "Flex",
|
|
@@ -327,7 +321,7 @@
|
|
|
327
321
|
"category": "container",
|
|
328
322
|
"specialCategory": "offset",
|
|
329
323
|
"sort": 22,
|
|
330
|
-
"
|
|
324
|
+
"preferredScale": "vs"
|
|
331
325
|
},
|
|
332
326
|
"bottom": {
|
|
333
327
|
"label": "Bottom",
|
|
@@ -335,7 +329,7 @@
|
|
|
335
329
|
"category": "container",
|
|
336
330
|
"specialCategory": "offset",
|
|
337
331
|
"sort": 23,
|
|
338
|
-
"
|
|
332
|
+
"preferredScale": "vs"
|
|
339
333
|
},
|
|
340
334
|
"left": {
|
|
341
335
|
"label": "Left",
|
|
@@ -343,7 +337,7 @@
|
|
|
343
337
|
"category": "container",
|
|
344
338
|
"specialCategory": "offset",
|
|
345
339
|
"sort": 24,
|
|
346
|
-
"
|
|
340
|
+
"preferredScale": "s"
|
|
347
341
|
},
|
|
348
342
|
"right": {
|
|
349
343
|
"label": "Right",
|
|
@@ -351,7 +345,7 @@
|
|
|
351
345
|
"category": "container",
|
|
352
346
|
"specialCategory": "offset",
|
|
353
347
|
"sort": 25,
|
|
354
|
-
"
|
|
348
|
+
"preferredScale": "s"
|
|
355
349
|
},
|
|
356
350
|
"zIndex": {
|
|
357
351
|
"label": "Z-Index",
|
|
@@ -366,7 +360,10 @@
|
|
|
366
360
|
"style": {
|
|
367
361
|
"flexDirection": "column",
|
|
368
362
|
"position": "relative",
|
|
369
|
-
"zIndex": 1
|
|
363
|
+
"zIndex": 1,
|
|
364
|
+
"alignSelf": "flex-start",
|
|
365
|
+
"flexGrow": 0,
|
|
366
|
+
"flexShrink": 0
|
|
370
367
|
}
|
|
371
368
|
}
|
|
372
369
|
}
|