@developer_tribe/react-builder 1.2.6 → 1.2.8
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 +47 -44
- package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +38 -35
- package/dist/build-components/Button/ButtonProps.generated.d.ts +40 -37
- package/dist/build-components/Carousel/CarouselProps.generated.d.ts +37 -34
- package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +39 -36
- package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +38 -35
- package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +37 -34
- package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +37 -34
- package/dist/build-components/Image/ImageProps.generated.d.ts +38 -35
- package/dist/build-components/Main/MainProps.generated.d.ts +38 -35
- package/dist/build-components/Onboard/OnboardProps.generated.d.ts +37 -34
- package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +43 -40
- package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +44 -41
- package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +41 -38
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +51 -48
- package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +40 -37
- package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +38 -35
- package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +38 -35
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +44 -41
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +44 -41
- package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +37 -34
- package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +47 -44
- package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +37 -34
- package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +37 -34
- package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +40 -37
- package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +40 -37
- package/dist/build-components/Text/TextProps.generated.d.ts +44 -41
- package/dist/build-components/View/ViewProps.generated.d.ts +37 -34
- package/dist/build-components/patterns.generated.d.ts +21 -21
- package/dist/components/BuilderProvider.d.ts +6 -0
- package/dist/hooks/useExtractImageStyle.d.ts +3 -1
- package/dist/hooks/useExtractTextStyle.d.ts +1 -1
- package/dist/hooks/useExtractViewStyle.d.ts +1 -1
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.cjs.js +2 -2
- package/dist/index.native.cjs.js.map +1 -1
- package/dist/index.native.d.ts +4 -0
- package/dist/index.native.esm.js +2 -2
- package/dist/index.native.esm.js.map +1 -1
- package/dist/utils/extractImageStyle.d.ts +3 -0
- package/dist/utils/extractTextStyle/extractTextStyleNative.d.ts +17 -0
- package/dist/utils/extractTextStyle.d.ts +2 -0
- package/dist/utils/extractViewStyle/extractViewStyleNative.d.ts +12 -0
- package/dist/utils/extractViewStyle.d.ts +2 -0
- package/dist/utils/patterns.d.ts +2 -1
- package/package.json +5 -1
- package/scripts/prebuild/utils/createGeneratedProps.js +45 -3
- package/src/attributes-editor/LayoutPreviewPicker.tsx +4 -3
- package/src/build-components/BIcon/BIcon.tsx +3 -2
- package/src/build-components/BIcon/BIconProps.generated.ts +48 -44
- package/src/build-components/BackgroundImage/BackgroundImage.tsx +5 -3
- package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +39 -35
- package/src/build-components/BackgroundImage/pattern.json +9 -17
- package/src/build-components/Button/Button.tsx +5 -4
- package/src/build-components/Button/ButtonProps.generated.ts +41 -37
- package/src/build-components/Carousel/CarouselProps.generated.ts +38 -34
- package/src/build-components/CarouselButtons/CarouselButtons.tsx +3 -2
- package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +40 -36
- package/src/build-components/CarouselDots/CarouselDots.tsx +1 -1
- package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +39 -35
- package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +38 -34
- package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +38 -34
- package/src/build-components/Image/Image.tsx +3 -2
- package/src/build-components/Image/ImageProps.generated.ts +39 -35
- package/src/build-components/Image/pattern.json +9 -16
- package/src/build-components/Main/Main.tsx +1 -1
- package/src/build-components/Main/MainProps.generated.ts +39 -35
- package/src/build-components/Onboard/OnboardProps.generated.ts +38 -34
- package/src/build-components/OnboardButton/OnboardButton.tsx +6 -5
- package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +44 -40
- package/src/build-components/OnboardButtons/OnboardButtons.tsx +4 -4
- package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +45 -41
- package/src/build-components/OnboardDot/OnboardDot.tsx +5 -4
- package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +42 -38
- package/src/build-components/OnboardFooter/OnboardFooter.tsx +16 -21
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +52 -48
- package/src/build-components/OnboardImage/OnboardImage.tsx +7 -6
- package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +41 -37
- package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +39 -35
- package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +39 -35
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +45 -41
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +45 -41
- package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +38 -34
- package/src/build-components/PaywallCloseButton/PaywallCloseButton.tsx +4 -4
- package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +48 -44
- package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +38 -34
- package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +38 -34
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +41 -37
- package/src/build-components/RadioButton/RadioButton.tsx +4 -3
- package/src/build-components/RadioButton/RadioButtonProps.generated.ts +41 -37
- package/src/build-components/Text/Text.tsx +3 -5
- package/src/build-components/Text/TextProps.generated.ts +45 -41
- package/src/build-components/View/ViewProps.generated.ts +38 -34
- package/src/build-components/patterns.generated.ts +21 -21
- package/src/components/BuilderProvider.tsx +15 -1
- package/src/hooks/useExtractImageStyle.ts +15 -4
- package/src/hooks/useExtractTextStyle.ts +11 -3
- package/src/hooks/useExtractViewStyle.ts +15 -4
- package/src/index.native.ts +6 -0
- package/src/index.ts +2 -0
- package/src/utils/extractImageStyle.ts +34 -5
- package/src/utils/extractTextStyle/extractTextStyle.ts +3 -5
- package/src/utils/extractTextStyle/extractTextStyleNative.ts +106 -0
- package/src/utils/extractTextStyle.ts +2 -0
- package/src/utils/extractViewStyle/extractViewStyle.ts +2 -4
- package/src/utils/extractViewStyle/extractViewStyleNative.ts +111 -0
- package/src/utils/extractViewStyle.ts +2 -0
- package/src/utils/patterns.ts +55 -1
|
@@ -22,45 +22,49 @@ export type ButtonTypeOptionType =
|
|
|
22
22
|
| 'next_button'
|
|
23
23
|
| 'skip_button';
|
|
24
24
|
|
|
25
|
+
export interface CarouselButtonsStyleGenerated {
|
|
26
|
+
scrollable?: boolean;
|
|
27
|
+
flexDirection?: FlexDirectionOptionType;
|
|
28
|
+
alignItems?: AlignItemsOptionType;
|
|
29
|
+
justifyContent?: JustifyContentOptionType;
|
|
30
|
+
gap?: string;
|
|
31
|
+
padding?: string;
|
|
32
|
+
paddingHorizontal?: string;
|
|
33
|
+
paddingVertical?: string;
|
|
34
|
+
paddingTop?: string;
|
|
35
|
+
paddingBottom?: string;
|
|
36
|
+
paddingLeft?: string;
|
|
37
|
+
paddingRight?: string;
|
|
38
|
+
margin?: string;
|
|
39
|
+
marginHorizontal?: string;
|
|
40
|
+
marginVertical?: string;
|
|
41
|
+
marginTop?: string;
|
|
42
|
+
marginBottom?: string;
|
|
43
|
+
marginLeft?: string;
|
|
44
|
+
marginRight?: string;
|
|
45
|
+
backgroundColor?: string;
|
|
46
|
+
borderRadius?: string;
|
|
47
|
+
width?: string;
|
|
48
|
+
minWidth?: string;
|
|
49
|
+
maxWidth?: string;
|
|
50
|
+
height?: string;
|
|
51
|
+
minHeight?: string;
|
|
52
|
+
maxHeight?: string;
|
|
53
|
+
flex?: number;
|
|
54
|
+
position?: PositionOptionType;
|
|
55
|
+
top?: string;
|
|
56
|
+
bottom?: string;
|
|
57
|
+
left?: string;
|
|
58
|
+
right?: string;
|
|
59
|
+
zIndex?: number;
|
|
60
|
+
buttonType?: ButtonTypeOptionType;
|
|
61
|
+
skipNumber?: number;
|
|
62
|
+
}
|
|
63
|
+
|
|
25
64
|
export interface CarouselButtonsPropsGenerated {
|
|
26
65
|
child: string;
|
|
27
66
|
attributes: {
|
|
28
|
-
style?:
|
|
29
|
-
scrollable?: boolean;
|
|
30
|
-
flexDirection?: FlexDirectionOptionType;
|
|
31
|
-
alignItems?: AlignItemsOptionType;
|
|
32
|
-
justifyContent?: JustifyContentOptionType;
|
|
33
|
-
gap?: string;
|
|
34
|
-
padding?: string;
|
|
35
|
-
paddingHorizontal?: string;
|
|
36
|
-
paddingVertical?: string;
|
|
37
|
-
paddingTop?: string;
|
|
38
|
-
paddingBottom?: string;
|
|
39
|
-
paddingLeft?: string;
|
|
40
|
-
paddingRight?: string;
|
|
41
|
-
margin?: string;
|
|
42
|
-
marginVertical?: string;
|
|
43
|
-
marginTop?: string;
|
|
44
|
-
marginBottom?: string;
|
|
45
|
-
marginLeft?: string;
|
|
46
|
-
marginRight?: string;
|
|
47
|
-
backgroundColor?: string;
|
|
48
|
-
borderRadius?: string;
|
|
49
|
-
width?: string;
|
|
50
|
-
minWidth?: string;
|
|
51
|
-
maxWidth?: string;
|
|
52
|
-
height?: string;
|
|
53
|
-
minHeight?: string;
|
|
54
|
-
maxHeight?: string;
|
|
55
|
-
flex?: number;
|
|
56
|
-
position?: PositionOptionType;
|
|
57
|
-
top?: string;
|
|
58
|
-
bottom?: string;
|
|
59
|
-
left?: string;
|
|
60
|
-
right?: string;
|
|
61
|
-
zIndex?: number;
|
|
62
|
-
buttonType?: ButtonTypeOptionType;
|
|
63
|
-
skipNumber?: number;
|
|
67
|
+
style?: CarouselButtonsStyleGenerated;
|
|
64
68
|
};
|
|
65
69
|
}
|
|
66
70
|
|
|
@@ -15,7 +15,7 @@ function CarouselDots({ node }: CarouselDotsComponentProps) {
|
|
|
15
15
|
const attributeName = node.sourceType ?? node.type ?? 'carouselDots';
|
|
16
16
|
const attributeKey = node.key ?? generatedId;
|
|
17
17
|
|
|
18
|
-
const dotType = node.attributes?.dotType
|
|
18
|
+
const dotType = node.attributes?.style?.dotType ?? 'normal_dot';
|
|
19
19
|
const style = useExtractViewStyle(node);
|
|
20
20
|
|
|
21
21
|
// Use the appropriate context based on sourceType
|
|
@@ -25,44 +25,48 @@ export type DotTypeOptionType =
|
|
|
25
25
|
| 'sliding_dot'
|
|
26
26
|
| 'liquid_like';
|
|
27
27
|
|
|
28
|
+
export interface CarouselDotsStyleGenerated {
|
|
29
|
+
scrollable?: boolean;
|
|
30
|
+
flexDirection?: FlexDirectionOptionType;
|
|
31
|
+
alignItems?: AlignItemsOptionType;
|
|
32
|
+
justifyContent?: JustifyContentOptionType;
|
|
33
|
+
gap?: string;
|
|
34
|
+
padding?: string;
|
|
35
|
+
paddingHorizontal?: string;
|
|
36
|
+
paddingVertical?: string;
|
|
37
|
+
paddingTop?: string;
|
|
38
|
+
paddingBottom?: string;
|
|
39
|
+
paddingLeft?: string;
|
|
40
|
+
paddingRight?: string;
|
|
41
|
+
margin?: string;
|
|
42
|
+
marginHorizontal?: string;
|
|
43
|
+
marginVertical?: string;
|
|
44
|
+
marginTop?: string;
|
|
45
|
+
marginBottom?: string;
|
|
46
|
+
marginLeft?: string;
|
|
47
|
+
marginRight?: string;
|
|
48
|
+
backgroundColor?: string;
|
|
49
|
+
borderRadius?: string;
|
|
50
|
+
width?: string;
|
|
51
|
+
minWidth?: string;
|
|
52
|
+
maxWidth?: string;
|
|
53
|
+
height?: string;
|
|
54
|
+
minHeight?: string;
|
|
55
|
+
maxHeight?: string;
|
|
56
|
+
flex?: number;
|
|
57
|
+
position?: PositionOptionType;
|
|
58
|
+
top?: string;
|
|
59
|
+
bottom?: string;
|
|
60
|
+
left?: string;
|
|
61
|
+
right?: string;
|
|
62
|
+
zIndex?: number;
|
|
63
|
+
dotType?: DotTypeOptionType;
|
|
64
|
+
}
|
|
65
|
+
|
|
28
66
|
export interface CarouselDotsPropsGenerated {
|
|
29
67
|
child: string;
|
|
30
68
|
attributes: {
|
|
31
|
-
style?:
|
|
32
|
-
scrollable?: boolean;
|
|
33
|
-
flexDirection?: FlexDirectionOptionType;
|
|
34
|
-
alignItems?: AlignItemsOptionType;
|
|
35
|
-
justifyContent?: JustifyContentOptionType;
|
|
36
|
-
gap?: string;
|
|
37
|
-
padding?: string;
|
|
38
|
-
paddingHorizontal?: string;
|
|
39
|
-
paddingVertical?: string;
|
|
40
|
-
paddingTop?: string;
|
|
41
|
-
paddingBottom?: string;
|
|
42
|
-
paddingLeft?: string;
|
|
43
|
-
paddingRight?: string;
|
|
44
|
-
margin?: string;
|
|
45
|
-
marginVertical?: string;
|
|
46
|
-
marginTop?: string;
|
|
47
|
-
marginBottom?: string;
|
|
48
|
-
marginLeft?: string;
|
|
49
|
-
marginRight?: string;
|
|
50
|
-
backgroundColor?: string;
|
|
51
|
-
borderRadius?: string;
|
|
52
|
-
width?: string;
|
|
53
|
-
minWidth?: string;
|
|
54
|
-
maxWidth?: string;
|
|
55
|
-
height?: string;
|
|
56
|
-
minHeight?: string;
|
|
57
|
-
maxHeight?: string;
|
|
58
|
-
flex?: number;
|
|
59
|
-
position?: PositionOptionType;
|
|
60
|
-
top?: string;
|
|
61
|
-
bottom?: string;
|
|
62
|
-
left?: string;
|
|
63
|
-
right?: string;
|
|
64
|
-
zIndex?: number;
|
|
65
|
-
dotType?: DotTypeOptionType;
|
|
69
|
+
style?: CarouselDotsStyleGenerated;
|
|
66
70
|
};
|
|
67
71
|
}
|
|
68
72
|
|
|
@@ -18,43 +18,47 @@ export type JustifyContentOptionType =
|
|
|
18
18
|
| 'space-evenly';
|
|
19
19
|
export type PositionOptionType = 'relative' | 'absolute';
|
|
20
20
|
|
|
21
|
+
export interface CarouselItemStyleGenerated {
|
|
22
|
+
scrollable?: boolean;
|
|
23
|
+
flexDirection?: FlexDirectionOptionType;
|
|
24
|
+
alignItems?: AlignItemsOptionType;
|
|
25
|
+
justifyContent?: JustifyContentOptionType;
|
|
26
|
+
gap?: string;
|
|
27
|
+
padding?: string;
|
|
28
|
+
paddingHorizontal?: string;
|
|
29
|
+
paddingVertical?: string;
|
|
30
|
+
paddingTop?: string;
|
|
31
|
+
paddingBottom?: string;
|
|
32
|
+
paddingLeft?: string;
|
|
33
|
+
paddingRight?: string;
|
|
34
|
+
margin?: string;
|
|
35
|
+
marginHorizontal?: string;
|
|
36
|
+
marginVertical?: string;
|
|
37
|
+
marginTop?: string;
|
|
38
|
+
marginBottom?: string;
|
|
39
|
+
marginLeft?: string;
|
|
40
|
+
marginRight?: string;
|
|
41
|
+
backgroundColor?: string;
|
|
42
|
+
borderRadius?: string;
|
|
43
|
+
width?: string;
|
|
44
|
+
minWidth?: string;
|
|
45
|
+
maxWidth?: string;
|
|
46
|
+
height?: string;
|
|
47
|
+
minHeight?: string;
|
|
48
|
+
maxHeight?: string;
|
|
49
|
+
flex?: number;
|
|
50
|
+
position?: PositionOptionType;
|
|
51
|
+
top?: string;
|
|
52
|
+
bottom?: string;
|
|
53
|
+
left?: string;
|
|
54
|
+
right?: string;
|
|
55
|
+
zIndex?: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
21
58
|
export interface CarouselItemPropsGenerated {
|
|
22
59
|
child: string;
|
|
23
60
|
attributes: {
|
|
24
|
-
style?:
|
|
25
|
-
scrollable?: boolean;
|
|
26
|
-
flexDirection?: FlexDirectionOptionType;
|
|
27
|
-
alignItems?: AlignItemsOptionType;
|
|
28
|
-
justifyContent?: JustifyContentOptionType;
|
|
29
|
-
gap?: string;
|
|
30
|
-
padding?: string;
|
|
31
|
-
paddingHorizontal?: string;
|
|
32
|
-
paddingVertical?: string;
|
|
33
|
-
paddingTop?: string;
|
|
34
|
-
paddingBottom?: string;
|
|
35
|
-
paddingLeft?: string;
|
|
36
|
-
paddingRight?: string;
|
|
37
|
-
margin?: string;
|
|
38
|
-
marginVertical?: string;
|
|
39
|
-
marginTop?: string;
|
|
40
|
-
marginBottom?: string;
|
|
41
|
-
marginLeft?: string;
|
|
42
|
-
marginRight?: string;
|
|
43
|
-
backgroundColor?: string;
|
|
44
|
-
borderRadius?: string;
|
|
45
|
-
width?: string;
|
|
46
|
-
minWidth?: string;
|
|
47
|
-
maxWidth?: string;
|
|
48
|
-
height?: string;
|
|
49
|
-
minHeight?: string;
|
|
50
|
-
maxHeight?: string;
|
|
51
|
-
flex?: number;
|
|
52
|
-
position?: PositionOptionType;
|
|
53
|
-
top?: string;
|
|
54
|
-
bottom?: string;
|
|
55
|
-
left?: string;
|
|
56
|
-
right?: string;
|
|
57
|
-
zIndex?: number;
|
|
61
|
+
style?: CarouselItemStyleGenerated;
|
|
58
62
|
};
|
|
59
63
|
}
|
|
60
64
|
|
|
@@ -18,43 +18,47 @@ export type JustifyContentOptionType =
|
|
|
18
18
|
| 'space-evenly';
|
|
19
19
|
export type PositionOptionType = 'relative' | 'absolute';
|
|
20
20
|
|
|
21
|
+
export interface CarouselProviderStyleGenerated {
|
|
22
|
+
scrollable?: boolean;
|
|
23
|
+
flexDirection?: FlexDirectionOptionType;
|
|
24
|
+
alignItems?: AlignItemsOptionType;
|
|
25
|
+
justifyContent?: JustifyContentOptionType;
|
|
26
|
+
gap?: string;
|
|
27
|
+
padding?: string;
|
|
28
|
+
paddingHorizontal?: string;
|
|
29
|
+
paddingVertical?: string;
|
|
30
|
+
paddingTop?: string;
|
|
31
|
+
paddingBottom?: string;
|
|
32
|
+
paddingLeft?: string;
|
|
33
|
+
paddingRight?: string;
|
|
34
|
+
margin?: string;
|
|
35
|
+
marginHorizontal?: string;
|
|
36
|
+
marginVertical?: string;
|
|
37
|
+
marginTop?: string;
|
|
38
|
+
marginBottom?: string;
|
|
39
|
+
marginLeft?: string;
|
|
40
|
+
marginRight?: string;
|
|
41
|
+
backgroundColor?: string;
|
|
42
|
+
borderRadius?: string;
|
|
43
|
+
width?: string;
|
|
44
|
+
minWidth?: string;
|
|
45
|
+
maxWidth?: string;
|
|
46
|
+
height?: string;
|
|
47
|
+
minHeight?: string;
|
|
48
|
+
maxHeight?: string;
|
|
49
|
+
flex?: number;
|
|
50
|
+
position?: PositionOptionType;
|
|
51
|
+
top?: string;
|
|
52
|
+
bottom?: string;
|
|
53
|
+
left?: string;
|
|
54
|
+
right?: string;
|
|
55
|
+
zIndex?: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
21
58
|
export interface CarouselProviderPropsGenerated {
|
|
22
59
|
child: string;
|
|
23
60
|
attributes: {
|
|
24
|
-
style?:
|
|
25
|
-
scrollable?: boolean;
|
|
26
|
-
flexDirection?: FlexDirectionOptionType;
|
|
27
|
-
alignItems?: AlignItemsOptionType;
|
|
28
|
-
justifyContent?: JustifyContentOptionType;
|
|
29
|
-
gap?: string;
|
|
30
|
-
padding?: string;
|
|
31
|
-
paddingHorizontal?: string;
|
|
32
|
-
paddingVertical?: string;
|
|
33
|
-
paddingTop?: string;
|
|
34
|
-
paddingBottom?: string;
|
|
35
|
-
paddingLeft?: string;
|
|
36
|
-
paddingRight?: string;
|
|
37
|
-
margin?: string;
|
|
38
|
-
marginVertical?: string;
|
|
39
|
-
marginTop?: string;
|
|
40
|
-
marginBottom?: string;
|
|
41
|
-
marginLeft?: string;
|
|
42
|
-
marginRight?: string;
|
|
43
|
-
backgroundColor?: string;
|
|
44
|
-
borderRadius?: string;
|
|
45
|
-
width?: string;
|
|
46
|
-
minWidth?: string;
|
|
47
|
-
maxWidth?: string;
|
|
48
|
-
height?: string;
|
|
49
|
-
minHeight?: string;
|
|
50
|
-
maxHeight?: string;
|
|
51
|
-
flex?: number;
|
|
52
|
-
position?: PositionOptionType;
|
|
53
|
-
top?: string;
|
|
54
|
-
bottom?: string;
|
|
55
|
-
left?: string;
|
|
56
|
-
right?: string;
|
|
57
|
-
zIndex?: number;
|
|
61
|
+
style?: CarouselProviderStyleGenerated;
|
|
58
62
|
};
|
|
59
63
|
}
|
|
60
64
|
|
|
@@ -16,6 +16,7 @@ function Image({ node }: ImageComponentProps) {
|
|
|
16
16
|
const attributeKey = node.key ?? generatedId;
|
|
17
17
|
const { previewMode, selectedKey } = useBuilderParams();
|
|
18
18
|
const imageStyle = useExtractImageStyle(node);
|
|
19
|
+
const src = node.attributes?.src;
|
|
19
20
|
const isSelected = isNodeSelected({
|
|
20
21
|
previewMode: !!previewMode,
|
|
21
22
|
current: selectedKey ? { key: selectedKey } : undefined,
|
|
@@ -28,10 +29,10 @@ function Image({ node }: ImageComponentProps) {
|
|
|
28
29
|
|
|
29
30
|
return (
|
|
30
31
|
<img
|
|
31
|
-
key={node.key + (
|
|
32
|
+
key={node.key + (src ?? '-')}
|
|
32
33
|
attribute-name={attributeName}
|
|
33
34
|
attribute-key={attributeKey}
|
|
34
|
-
src={resolveImageSrc(
|
|
35
|
+
src={resolveImageSrc(src)}
|
|
35
36
|
style={style}
|
|
36
37
|
alt=""
|
|
37
38
|
/>
|
|
@@ -19,45 +19,49 @@ export type JustifyContentOptionType =
|
|
|
19
19
|
export type PositionOptionType = 'relative' | 'absolute';
|
|
20
20
|
export type ResizeModeOptionType = 'cover' | 'contain' | 'stretch' | 'center';
|
|
21
21
|
|
|
22
|
+
export interface ImageStyleGenerated {
|
|
23
|
+
scrollable?: boolean;
|
|
24
|
+
flexDirection?: FlexDirectionOptionType;
|
|
25
|
+
alignItems?: AlignItemsOptionType;
|
|
26
|
+
justifyContent?: JustifyContentOptionType;
|
|
27
|
+
gap?: string;
|
|
28
|
+
padding?: string;
|
|
29
|
+
paddingHorizontal?: string;
|
|
30
|
+
paddingVertical?: string;
|
|
31
|
+
paddingTop?: string;
|
|
32
|
+
paddingBottom?: string;
|
|
33
|
+
paddingLeft?: string;
|
|
34
|
+
paddingRight?: string;
|
|
35
|
+
margin?: string;
|
|
36
|
+
marginHorizontal?: string;
|
|
37
|
+
marginVertical?: string;
|
|
38
|
+
marginTop?: string;
|
|
39
|
+
marginBottom?: string;
|
|
40
|
+
marginLeft?: string;
|
|
41
|
+
marginRight?: string;
|
|
42
|
+
backgroundColor?: string;
|
|
43
|
+
borderRadius?: string;
|
|
44
|
+
width?: string;
|
|
45
|
+
minWidth?: string;
|
|
46
|
+
maxWidth?: string;
|
|
47
|
+
height?: string;
|
|
48
|
+
minHeight?: string;
|
|
49
|
+
maxHeight?: string;
|
|
50
|
+
flex?: number;
|
|
51
|
+
position?: PositionOptionType;
|
|
52
|
+
top?: string;
|
|
53
|
+
bottom?: string;
|
|
54
|
+
left?: string;
|
|
55
|
+
right?: string;
|
|
56
|
+
zIndex?: number;
|
|
57
|
+
resizeMode?: ResizeModeOptionType;
|
|
58
|
+
}
|
|
59
|
+
|
|
22
60
|
export interface ImagePropsGenerated {
|
|
23
61
|
child: string;
|
|
24
62
|
attributes: {
|
|
25
|
-
style?:
|
|
26
|
-
scrollable?: boolean;
|
|
27
|
-
flexDirection?: FlexDirectionOptionType;
|
|
28
|
-
alignItems?: AlignItemsOptionType;
|
|
29
|
-
justifyContent?: JustifyContentOptionType;
|
|
30
|
-
gap?: string;
|
|
31
|
-
padding?: string;
|
|
32
|
-
paddingHorizontal?: string;
|
|
33
|
-
paddingVertical?: string;
|
|
34
|
-
paddingTop?: string;
|
|
35
|
-
paddingBottom?: string;
|
|
36
|
-
paddingLeft?: string;
|
|
37
|
-
paddingRight?: string;
|
|
38
|
-
margin?: string;
|
|
39
|
-
marginVertical?: string;
|
|
40
|
-
marginTop?: string;
|
|
41
|
-
marginBottom?: string;
|
|
42
|
-
marginLeft?: string;
|
|
43
|
-
marginRight?: string;
|
|
44
|
-
backgroundColor?: string;
|
|
45
|
-
borderRadius?: string;
|
|
46
|
-
width?: string;
|
|
47
|
-
minWidth?: string;
|
|
48
|
-
maxWidth?: string;
|
|
49
|
-
height?: string;
|
|
50
|
-
minHeight?: string;
|
|
51
|
-
maxHeight?: string;
|
|
52
|
-
flex?: number;
|
|
53
|
-
position?: PositionOptionType;
|
|
54
|
-
top?: string;
|
|
55
|
-
bottom?: string;
|
|
56
|
-
left?: string;
|
|
57
|
-
right?: string;
|
|
58
|
-
zIndex?: number;
|
|
63
|
+
style?: ImageStyleGenerated;
|
|
59
64
|
src?: string;
|
|
60
|
-
resizeMode?: ResizeModeOptionType;
|
|
61
65
|
};
|
|
62
66
|
}
|
|
63
67
|
|
|
@@ -8,28 +8,21 @@
|
|
|
8
8
|
"src": "string",
|
|
9
9
|
"width": "size",
|
|
10
10
|
"height": "size",
|
|
11
|
-
"resizeMode": [
|
|
12
|
-
"cover",
|
|
13
|
-
"contain",
|
|
14
|
-
"stretch",
|
|
15
|
-
"center"
|
|
16
|
-
]
|
|
11
|
+
"resizeMode": ["cover", "contain", "stretch", "center"]
|
|
17
12
|
}
|
|
18
13
|
},
|
|
19
14
|
"meta": {
|
|
20
|
-
"desiredParent": [
|
|
21
|
-
"all"
|
|
22
|
-
],
|
|
15
|
+
"desiredParent": ["all"],
|
|
23
16
|
"label": "Image",
|
|
24
17
|
"description": "Shows an image or graphic.",
|
|
18
|
+
"src": {
|
|
19
|
+
"label": "Src",
|
|
20
|
+
"description": "Image source URL.",
|
|
21
|
+
"category": "other",
|
|
22
|
+
"specialCategory": null,
|
|
23
|
+
"sort": 1
|
|
24
|
+
},
|
|
25
25
|
"styles": {
|
|
26
|
-
"src": {
|
|
27
|
-
"label": "Src",
|
|
28
|
-
"description": "Image source URL.",
|
|
29
|
-
"category": "other",
|
|
30
|
-
"specialCategory": null,
|
|
31
|
-
"sort": 1
|
|
32
|
-
},
|
|
33
26
|
"width": {
|
|
34
27
|
"label": "Width",
|
|
35
28
|
"description": "Image width.",
|
|
@@ -22,7 +22,7 @@ function Main({ node }: MainComponentProps) {
|
|
|
22
22
|
|
|
23
23
|
const baseStyle = useExtractViewStyle(node);
|
|
24
24
|
|
|
25
|
-
const useSafeAreaView = node.attributes?.useSafeAreaView ?? true;
|
|
25
|
+
const useSafeAreaView = node.attributes?.style?.useSafeAreaView ?? true;
|
|
26
26
|
const layoutStyle = useSafeAreaViewStyle(baseStyle, useSafeAreaView);
|
|
27
27
|
|
|
28
28
|
const isSelected = isNodeSelected({
|
|
@@ -18,44 +18,48 @@ export type JustifyContentOptionType =
|
|
|
18
18
|
| 'space-evenly';
|
|
19
19
|
export type PositionOptionType = 'relative' | 'absolute';
|
|
20
20
|
|
|
21
|
+
export interface MainStyleGenerated {
|
|
22
|
+
scrollable?: boolean;
|
|
23
|
+
flexDirection?: FlexDirectionOptionType;
|
|
24
|
+
alignItems?: AlignItemsOptionType;
|
|
25
|
+
justifyContent?: JustifyContentOptionType;
|
|
26
|
+
gap?: string;
|
|
27
|
+
padding?: string;
|
|
28
|
+
paddingHorizontal?: string;
|
|
29
|
+
paddingVertical?: string;
|
|
30
|
+
paddingTop?: string;
|
|
31
|
+
paddingBottom?: string;
|
|
32
|
+
paddingLeft?: string;
|
|
33
|
+
paddingRight?: string;
|
|
34
|
+
margin?: string;
|
|
35
|
+
marginHorizontal?: string;
|
|
36
|
+
marginVertical?: string;
|
|
37
|
+
marginTop?: string;
|
|
38
|
+
marginBottom?: string;
|
|
39
|
+
marginLeft?: string;
|
|
40
|
+
marginRight?: string;
|
|
41
|
+
backgroundColor?: string;
|
|
42
|
+
borderRadius?: string;
|
|
43
|
+
width?: string;
|
|
44
|
+
minWidth?: string;
|
|
45
|
+
maxWidth?: string;
|
|
46
|
+
height?: string;
|
|
47
|
+
minHeight?: string;
|
|
48
|
+
maxHeight?: string;
|
|
49
|
+
flex?: number;
|
|
50
|
+
position?: PositionOptionType;
|
|
51
|
+
top?: string;
|
|
52
|
+
bottom?: string;
|
|
53
|
+
left?: string;
|
|
54
|
+
right?: string;
|
|
55
|
+
zIndex?: number;
|
|
56
|
+
useSafeAreaView?: boolean;
|
|
57
|
+
}
|
|
58
|
+
|
|
21
59
|
export interface MainPropsGenerated {
|
|
22
60
|
child: string;
|
|
23
61
|
attributes: {
|
|
24
|
-
style?:
|
|
25
|
-
scrollable?: boolean;
|
|
26
|
-
flexDirection?: FlexDirectionOptionType;
|
|
27
|
-
alignItems?: AlignItemsOptionType;
|
|
28
|
-
justifyContent?: JustifyContentOptionType;
|
|
29
|
-
gap?: string;
|
|
30
|
-
padding?: string;
|
|
31
|
-
paddingHorizontal?: string;
|
|
32
|
-
paddingVertical?: string;
|
|
33
|
-
paddingTop?: string;
|
|
34
|
-
paddingBottom?: string;
|
|
35
|
-
paddingLeft?: string;
|
|
36
|
-
paddingRight?: string;
|
|
37
|
-
margin?: string;
|
|
38
|
-
marginVertical?: string;
|
|
39
|
-
marginTop?: string;
|
|
40
|
-
marginBottom?: string;
|
|
41
|
-
marginLeft?: string;
|
|
42
|
-
marginRight?: string;
|
|
43
|
-
backgroundColor?: string;
|
|
44
|
-
borderRadius?: string;
|
|
45
|
-
width?: string;
|
|
46
|
-
minWidth?: string;
|
|
47
|
-
maxWidth?: string;
|
|
48
|
-
height?: string;
|
|
49
|
-
minHeight?: string;
|
|
50
|
-
maxHeight?: string;
|
|
51
|
-
flex?: number;
|
|
52
|
-
position?: PositionOptionType;
|
|
53
|
-
top?: string;
|
|
54
|
-
bottom?: string;
|
|
55
|
-
left?: string;
|
|
56
|
-
right?: string;
|
|
57
|
-
zIndex?: number;
|
|
58
|
-
useSafeAreaView?: boolean;
|
|
62
|
+
style?: MainStyleGenerated;
|
|
59
63
|
};
|
|
60
64
|
}
|
|
61
65
|
|
|
@@ -18,43 +18,47 @@ export type JustifyContentOptionType =
|
|
|
18
18
|
| 'space-evenly';
|
|
19
19
|
export type PositionOptionType = 'relative' | 'absolute';
|
|
20
20
|
|
|
21
|
+
export interface OnboardStyleGenerated {
|
|
22
|
+
scrollable?: boolean;
|
|
23
|
+
flexDirection?: FlexDirectionOptionType;
|
|
24
|
+
alignItems?: AlignItemsOptionType;
|
|
25
|
+
justifyContent?: JustifyContentOptionType;
|
|
26
|
+
gap?: string;
|
|
27
|
+
padding?: string;
|
|
28
|
+
paddingHorizontal?: string;
|
|
29
|
+
paddingVertical?: string;
|
|
30
|
+
paddingTop?: string;
|
|
31
|
+
paddingBottom?: string;
|
|
32
|
+
paddingLeft?: string;
|
|
33
|
+
paddingRight?: string;
|
|
34
|
+
margin?: string;
|
|
35
|
+
marginHorizontal?: string;
|
|
36
|
+
marginVertical?: string;
|
|
37
|
+
marginTop?: string;
|
|
38
|
+
marginBottom?: string;
|
|
39
|
+
marginLeft?: string;
|
|
40
|
+
marginRight?: string;
|
|
41
|
+
backgroundColor?: string;
|
|
42
|
+
borderRadius?: string;
|
|
43
|
+
width?: string;
|
|
44
|
+
minWidth?: string;
|
|
45
|
+
maxWidth?: string;
|
|
46
|
+
height?: string;
|
|
47
|
+
minHeight?: string;
|
|
48
|
+
maxHeight?: string;
|
|
49
|
+
flex?: number;
|
|
50
|
+
position?: PositionOptionType;
|
|
51
|
+
top?: string;
|
|
52
|
+
bottom?: string;
|
|
53
|
+
left?: string;
|
|
54
|
+
right?: string;
|
|
55
|
+
zIndex?: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
21
58
|
export interface OnboardPropsGenerated {
|
|
22
59
|
child: string;
|
|
23
60
|
attributes: {
|
|
24
|
-
style?:
|
|
25
|
-
scrollable?: boolean;
|
|
26
|
-
flexDirection?: FlexDirectionOptionType;
|
|
27
|
-
alignItems?: AlignItemsOptionType;
|
|
28
|
-
justifyContent?: JustifyContentOptionType;
|
|
29
|
-
gap?: string;
|
|
30
|
-
padding?: string;
|
|
31
|
-
paddingHorizontal?: string;
|
|
32
|
-
paddingVertical?: string;
|
|
33
|
-
paddingTop?: string;
|
|
34
|
-
paddingBottom?: string;
|
|
35
|
-
paddingLeft?: string;
|
|
36
|
-
paddingRight?: string;
|
|
37
|
-
margin?: string;
|
|
38
|
-
marginVertical?: string;
|
|
39
|
-
marginTop?: string;
|
|
40
|
-
marginBottom?: string;
|
|
41
|
-
marginLeft?: string;
|
|
42
|
-
marginRight?: string;
|
|
43
|
-
backgroundColor?: string;
|
|
44
|
-
borderRadius?: string;
|
|
45
|
-
width?: string;
|
|
46
|
-
minWidth?: string;
|
|
47
|
-
maxWidth?: string;
|
|
48
|
-
height?: string;
|
|
49
|
-
minHeight?: string;
|
|
50
|
-
maxHeight?: string;
|
|
51
|
-
flex?: number;
|
|
52
|
-
position?: PositionOptionType;
|
|
53
|
-
top?: string;
|
|
54
|
-
bottom?: string;
|
|
55
|
-
left?: string;
|
|
56
|
-
right?: string;
|
|
57
|
-
zIndex?: number;
|
|
61
|
+
style?: OnboardStyleGenerated;
|
|
58
62
|
};
|
|
59
63
|
}
|
|
60
64
|
|
|
@@ -24,18 +24,19 @@ function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
24
24
|
const generatedId = useId();
|
|
25
25
|
const attributeKey = node.key ?? generatedId;
|
|
26
26
|
|
|
27
|
-
const
|
|
27
|
+
const styleBag = node.attributes?.style;
|
|
28
|
+
const labelRaw = styleBag?.labelKey ?? '';
|
|
28
29
|
const localize = useLocalize({ appConfig });
|
|
29
30
|
const label = localize(labelRaw);
|
|
30
31
|
|
|
31
|
-
const flex =
|
|
32
|
-
const textColor =
|
|
33
|
-
const backgroundColor =
|
|
32
|
+
const flex = styleBag?.flex ?? 1;
|
|
33
|
+
const textColor = styleBag?.button_text_color ?? '#FFFFFF';
|
|
34
|
+
const backgroundColor = styleBag?.button_background_color ?? '#0066FF';
|
|
34
35
|
const viewStyle = useExtractViewStyle(node);
|
|
35
36
|
|
|
36
37
|
const handleClick = () => {
|
|
37
38
|
//TODO: any ??
|
|
38
|
-
const events: EventObjectGenerated[] =
|
|
39
|
+
const events: EventObjectGenerated[] = styleBag?.events ?? [];
|
|
39
40
|
let navigateHandled = false;
|
|
40
41
|
|
|
41
42
|
for (const e of events) {
|