@wavemaker/app-rn-runtime 11.11.7-rc.218 → 11.12.0-next.28188
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/components/advanced/carousel/carousel.component.js +4 -2
- package/components/advanced/carousel/carousel.component.js.map +1 -1
- package/components/basic/anchor/anchor.component.js +11 -5
- package/components/basic/anchor/anchor.component.js.map +1 -1
- package/components/basic/anchor/anchor.props.js +1 -0
- package/components/basic/anchor/anchor.props.js.map +1 -1
- package/components/basic/audio/audio.component.js +52 -47
- package/components/basic/audio/audio.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.component.js +94 -48
- package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.props.js +1 -0
- package/components/basic/bottomsheet/bottomsheet.props.js.map +1 -1
- package/components/basic/button/button.component.js +2 -1
- package/components/basic/button/button.component.js.map +1 -1
- package/components/basic/button/button.props.js +1 -0
- package/components/basic/button/button.props.js.map +1 -1
- package/components/basic/label/label.component.js.map +1 -1
- package/components/basic/label/label.props.js +1 -0
- package/components/basic/label/label.props.js.map +1 -1
- package/components/basic/message/message.component.js +15 -7
- package/components/basic/message/message.component.js.map +1 -1
- package/components/basic/message/message.props.js +1 -0
- package/components/basic/message/message.props.js.map +1 -1
- package/components/basic/picture/picture.component.js +2 -2
- package/components/basic/picture/picture.component.js.map +1 -1
- package/components/basic/video/video.component.js +69 -42
- package/components/basic/video/video.component.js.map +1 -1
- package/components/chart/basechart.props.js +1 -0
- package/components/chart/basechart.props.js.map +1 -1
- package/components/container/container.component.js +107 -27
- package/components/container/container.component.js.map +1 -1
- package/components/container/container.props.js +3 -1
- package/components/container/container.props.js.map +1 -1
- package/components/container/container.styles.js +1 -3
- package/components/container/container.styles.js.map +1 -1
- package/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +6 -1
- package/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +2 -2
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- package/components/container/tabs/tabheader/tabheader.component.js +11 -2
- package/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- package/components/container/tabs/tabheader/tabheader.props.js +1 -0
- package/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
- package/components/container/tabs/tabpane/tabpane.props.js +3 -0
- package/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- package/components/container/tabs/tabs.component.js +11 -2
- package/components/container/tabs/tabs.component.js.map +1 -1
- package/components/container/wizard/wizard.component.js +1 -0
- package/components/container/wizard/wizard.component.js.map +1 -1
- package/components/data/list/list.component.js +23 -13
- package/components/data/list/list.component.js.map +1 -1
- package/components/device/barcodescanner/barcodescanner.component.js +33 -18
- package/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- package/components/device/barcodescanner/barcodescanner.props.js +2 -1
- package/components/device/barcodescanner/barcodescanner.props.js.map +1 -1
- package/components/device/camera/camera.component.js +35 -22
- package/components/device/camera/camera.component.js.map +1 -1
- package/components/device/camera/camera.props.js +2 -1
- package/components/device/camera/camera.props.js.map +1 -1
- package/components/input/basedataset/basedataset.props.js +1 -0
- package/components/input/basedataset/basedataset.props.js.map +1 -1
- package/components/input/calendar/calendar.component.js +12 -4
- package/components/input/calendar/calendar.component.js.map +1 -1
- package/components/input/calendar/views/month-view.js +9 -2
- package/components/input/calendar/views/month-view.js.map +1 -1
- package/components/input/checkbox/checkbox.component.js +5 -5
- package/components/input/checkbox/checkbox.component.js.map +1 -1
- package/components/input/checkboxset/checkboxset.component.js +15 -11
- package/components/input/checkboxset/checkboxset.component.js.map +1 -1
- package/components/input/chips/chips.component.js +25 -12
- package/components/input/chips/chips.component.js.map +1 -1
- package/components/input/currency/currency.component.js +5 -2
- package/components/input/currency/currency.component.js.map +1 -1
- package/components/input/epoch/base-datetime.component.js +9 -9
- package/components/input/epoch/base-datetime.component.js.map +1 -1
- package/components/input/epoch/datetime/datetime.props.js +1 -0
- package/components/input/epoch/datetime/datetime.props.js.map +1 -1
- package/components/input/epoch/wheelpicker/wheelpicker.component.js +8 -3
- package/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
- package/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +8 -3
- package/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- package/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +8 -3
- package/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
- package/components/input/fileupload/fileupload.component.js +23 -14
- package/components/input/fileupload/fileupload.component.js.map +1 -1
- package/components/input/fileupload/fileupload.props.js +2 -0
- package/components/input/fileupload/fileupload.props.js.map +1 -1
- package/components/input/radioset/radioset.component.js +15 -5
- package/components/input/radioset/radioset.component.js.map +1 -1
- package/components/input/rating/rating.component.js +11 -3
- package/components/input/rating/rating.component.js.map +1 -1
- package/components/input/rating/rating.props.js +4 -0
- package/components/input/rating/rating.props.js.map +1 -1
- package/components/input/select/select.component.js +7 -5
- package/components/input/select/select.component.js.map +1 -1
- package/components/input/slider/slider.component.js +2 -1
- package/components/input/slider/slider.component.js.map +1 -1
- package/components/input/switch/switch.component.js +11 -9
- package/components/input/switch/switch.component.js.map +1 -1
- package/components/input/toggle/toggle.component.js +8 -4
- package/components/input/toggle/toggle.component.js.map +1 -1
- package/components/input/toggle/toggle.props.js +1 -0
- package/components/input/toggle/toggle.props.js.map +1 -1
- package/components/navigation/appnavbar/appnavbar.component.js +19 -61
- package/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- package/components/navigation/navitem/navitem.component.js +3 -1
- package/components/navigation/navitem/navitem.component.js.map +1 -1
- package/components/navigation/popover/popover.component.js +2 -1
- package/components/navigation/popover/popover.component.js.map +1 -1
- package/components/navigation/popover/popover.props.js +2 -1
- package/components/navigation/popover/popover.props.js.map +1 -1
- package/components/page/page-content/page-content.component.js +74 -20
- package/components/page/page-content/page-content.component.js.map +1 -1
- package/components/page/page-content/page-content.props.js +1 -0
- package/components/page/page-content/page-content.props.js.map +1 -1
- package/components/page/page.component.js +29 -44
- package/components/page/page.component.js.map +1 -1
- package/components/page/page.props.js +4 -2
- package/components/page/page.props.js.map +1 -1
- package/components/page/tabbar/tabbar.component.js +24 -13
- package/components/page/tabbar/tabbar.component.js.map +1 -1
- package/core/AppConfig.js.map +1 -1
- package/core/accessibility.js +51 -32
- package/core/accessibility.js.map +1 -1
- package/core/base.component.js.map +1 -1
- package/core/components/error-fallback/error-fallback.component.js +140 -0
- package/core/components/error-fallback/error-fallback.component.js.map +1 -0
- package/core/components/error-fallback/error-fallback.styles.js +224 -0
- package/core/components/error-fallback/error-fallback.styles.js.map +1 -0
- package/core/components/sticky-base.component.js +54 -0
- package/core/components/sticky-base.component.js.map +1 -0
- package/core/components/sticky-container.component.js +34 -0
- package/core/components/sticky-container.component.js.map +1 -0
- package/core/components/sticky-container.styles.js +98 -0
- package/core/components/sticky-container.styles.js.map +1 -0
- package/core/components/sticky-nav.component.js +28 -0
- package/core/components/sticky-nav.component.js.map +1 -0
- package/core/device/av-service.js +8 -0
- package/core/device/av-service.js.map +1 -0
- package/core/device/calendar-service.js +7 -1
- package/core/device/calendar-service.js.map +1 -1
- package/core/device/camera-service.js +6 -0
- package/core/device/camera-service.js.map +1 -1
- package/core/device/contacts-service.js +7 -1
- package/core/device/contacts-service.js.map +1 -1
- package/core/device/fileupload-service.js +8 -0
- package/core/device/fileupload-service.js.map +1 -0
- package/core/device/location-service.js +7 -1
- package/core/device/location-service.js.map +1 -1
- package/core/device/scan-service.js +6 -0
- package/core/device/scan-service.js.map +1 -1
- package/core/error-boundary.component.js +1 -1
- package/core/error-boundary.component.js.map +1 -1
- package/core/event-notifier.js +4 -3
- package/core/event-notifier.js.map +1 -1
- package/core/fixed-view.component.js +2 -1
- package/core/fixed-view.component.js.map +1 -1
- package/core/responsive.utils.js +8 -5
- package/core/responsive.utils.js.map +1 -1
- package/core/sticky-view.component.js +50 -0
- package/core/sticky-view.component.js.map +1 -0
- package/core/sticky-wrapper.js +129 -0
- package/core/sticky-wrapper.js.map +1 -0
- package/core/utils.js +0 -6
- package/core/utils.js.map +1 -1
- package/npm-shrinkwrap.json +9 -9
- package/package-lock.json +9 -9
- package/package.json +2 -2
- package/runtime/App.js +3 -5
- package/runtime/App.js.map +1 -1
- package/runtime/services/device/calendar-service.js +9 -5
- package/runtime/services/device/calendar-service.js.map +1 -1
- package/runtime/services/device/camera-service.js +39 -22
- package/runtime/services/device/camera-service.js.map +1 -1
- package/runtime/services/device/contacts-service.js +6 -5
- package/runtime/services/device/contacts-service.js.map +1 -1
- package/runtime/services/device/location-service.js +4 -4
- package/runtime/services/device/location-service.js.map +1 -1
- package/runtime/services/device/permission-service.js +5 -0
- package/runtime/services/device/permission-service.js.map +1 -0
- package/runtime/services/device/permissions.js +34 -39
- package/runtime/services/device/permissions.js.map +1 -1
- package/runtime/services/device/scan-service.js +4 -3
- package/runtime/services/device/scan-service.js.map +1 -1
- package/styles/theme.js +24 -18
- package/styles/theme.js.map +1 -1
- package/variables/device/calendar/create-event.operation.js +12 -1
- package/variables/device/calendar/create-event.operation.js.map +1 -1
- package/variables/device/calendar/delete-event.operation.js +12 -1
- package/variables/device/calendar/delete-event.operation.js.map +1 -1
- package/variables/device/calendar/get-events.operation.js +12 -1
- package/variables/device/calendar/get-events.operation.js.map +1 -1
- package/variables/device/camera/capture-image.operation.js +8 -1
- package/variables/device/camera/capture-image.operation.js.map +1 -1
- package/variables/device/camera/capture-video.operation.js +7 -1
- package/variables/device/camera/capture-video.operation.js.map +1 -1
- package/variables/device/contacts/get-contacts.operation.js +12 -1
- package/variables/device/contacts/get-contacts.operation.js.map +1 -1
- package/variables/device/device/current-geo-position.operation.js +12 -1
- package/variables/device/device/current-geo-position.operation.js.map +1 -1
- package/variables/device/file/upload-file.operation.js +17 -3
- package/variables/device/file/upload-file.operation.js.map +1 -1
- package/variables/device/scan/scan.operation.js +12 -1
- package/variables/device/scan/scan.operation.js.map +1 -1
- package/variables/http.service.js +6 -1
- package/variables/http.service.js.map +1 -1
- package/core/components/error-fallback.component.js +0 -264
- package/core/components/error-fallback.component.js.map +0 -1
- package/core/sticky-container.component.js +0 -175
- package/core/sticky-container.component.js.map +0 -1
@@ -0,0 +1,140 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
import { Text, View, ScrollView, TouchableOpacity } from 'react-native';
|
3
|
+
import { navigate, goBackRef } from '@wavemaker/app-rn-runtime/core/navigation.service';
|
4
|
+
import * as Clipboard from 'expo-clipboard';
|
5
|
+
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
6
|
+
import { ThemeConsumer } from '@wavemaker/app-rn-runtime/styles/theme';
|
7
|
+
import { DEFAULT_CLASS } from './error-fallback.styles';
|
8
|
+
import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
|
9
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
10
|
+
import WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';
|
11
|
+
import WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';
|
12
|
+
import WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';
|
13
|
+
const Fallback = props => {
|
14
|
+
const {
|
15
|
+
error,
|
16
|
+
info,
|
17
|
+
resetErrorBoundary
|
18
|
+
} = props;
|
19
|
+
const [showStack, setShowStack] = useState(false);
|
20
|
+
const [isCopied, setIsCopied] = useState(false);
|
21
|
+
const appConfig = injector.get('APP_CONFIG');
|
22
|
+
const insets = useSafeAreaInsets();
|
23
|
+
const copyErrorToClipboard = async () => {
|
24
|
+
const errorDetails = `
|
25
|
+
Error: ${(error === null || error === void 0 ? void 0 : error.message) || 'Unknown error'}
|
26
|
+
Stack: ${(error === null || error === void 0 ? void 0 : error.stack) || 'No stack available'}
|
27
|
+
Component Stack: ${(info === null || info === void 0 ? void 0 : info.componentStack) || 'No component stack available'}
|
28
|
+
`.trim();
|
29
|
+
await Clipboard.setStringAsync(errorDetails);
|
30
|
+
setIsCopied(true);
|
31
|
+
setTimeout(() => {
|
32
|
+
setIsCopied(false);
|
33
|
+
}, 2000);
|
34
|
+
};
|
35
|
+
const handleGoBack = () => {
|
36
|
+
goBackRef();
|
37
|
+
if (resetErrorBoundary) {
|
38
|
+
resetErrorBoundary();
|
39
|
+
}
|
40
|
+
};
|
41
|
+
const handleGoHome = () => {
|
42
|
+
navigate(appConfig.appProperties.homePage, {});
|
43
|
+
if (resetErrorBoundary) {
|
44
|
+
resetErrorBoundary();
|
45
|
+
}
|
46
|
+
};
|
47
|
+
return /*#__PURE__*/React.createElement(ThemeConsumer, null, theme => {
|
48
|
+
var _appConfig$preference;
|
49
|
+
const errorFallbackStyles = theme.getStyle(DEFAULT_CLASS);
|
50
|
+
const imageSource = appConfig === null || appConfig === void 0 || (_appConfig$preference = appConfig.preferences) === null || _appConfig$preference === void 0 ? void 0 : _appConfig$preference.errorImage;
|
51
|
+
return /*#__PURE__*/React.createElement(View, {
|
52
|
+
style: [{
|
53
|
+
paddingTop: insets === null || insets === void 0 ? void 0 : insets.top,
|
54
|
+
paddingBottom: insets === null || insets === void 0 ? void 0 : insets.bottom
|
55
|
+
}, errorFallbackStyles.root]
|
56
|
+
}, /*#__PURE__*/React.createElement(View, {
|
57
|
+
style: errorFallbackStyles.infoContainer
|
58
|
+
}, /*#__PURE__*/React.createElement(View, {
|
59
|
+
style: errorFallbackStyles.imageContainer
|
60
|
+
}, /*#__PURE__*/React.createElement(WmPicture, {
|
61
|
+
picturesource: imageSource,
|
62
|
+
resizemode: "contain",
|
63
|
+
name: "picture2",
|
64
|
+
classname: "error-fallback-image"
|
65
|
+
})), /*#__PURE__*/React.createElement(WmLabel, {
|
66
|
+
caption: 'Something went wrong.',
|
67
|
+
classname: "error-fallback-title"
|
68
|
+
}), /*#__PURE__*/React.createElement(WmLabel, {
|
69
|
+
caption: 'Please try again.',
|
70
|
+
classname: "error-fallback-subtitle"
|
71
|
+
}), /*#__PURE__*/React.createElement(View, {
|
72
|
+
style: errorFallbackStyles.errorCard
|
73
|
+
}, /*#__PURE__*/React.createElement(View, {
|
74
|
+
style: errorFallbackStyles.errorCardRow
|
75
|
+
}, /*#__PURE__*/React.createElement(WmIcon, {
|
76
|
+
id: 'error-icon',
|
77
|
+
iconclass: "wi wi-error",
|
78
|
+
classname: "error-fallback-erroricon"
|
79
|
+
}), /*#__PURE__*/React.createElement(WmLabel, {
|
80
|
+
caption: 'Error',
|
81
|
+
classname: "error-fallback-error-label"
|
82
|
+
})), /*#__PURE__*/React.createElement(WmLabel, {
|
83
|
+
caption: (error === null || error === void 0 ? void 0 : error.message) || 'An unexpected error occurred',
|
84
|
+
classname: "error-fallback-error-message"
|
85
|
+
})), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
86
|
+
style: errorFallbackStyles.toggleButton,
|
87
|
+
onPress: () => setShowStack(!showStack)
|
88
|
+
}, /*#__PURE__*/React.createElement(WmLabel, {
|
89
|
+
caption: `${showStack ? 'Hide' : 'Show'} Error Details`,
|
90
|
+
classname: "error-fallback-toggle-heading"
|
91
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
92
|
+
style: {}
|
93
|
+
}, showStack ? /*#__PURE__*/React.createElement(WmIcon, {
|
94
|
+
id: 'error-stack-arrow-up',
|
95
|
+
iconclass: "wi wi-keyboard-arrow-up",
|
96
|
+
classname: "error-fallback-toggle-icon"
|
97
|
+
}) : /*#__PURE__*/React.createElement(WmIcon, {
|
98
|
+
id: 'error-stack-arrow-down',
|
99
|
+
iconclass: "wi wi-keyboard-arrow-down",
|
100
|
+
classname: "error-fallback-toggle-icon"
|
101
|
+
}))), showStack && /*#__PURE__*/React.createElement(View, {
|
102
|
+
style: errorFallbackStyles.stackCard
|
103
|
+
}, /*#__PURE__*/React.createElement(View, {
|
104
|
+
style: errorFallbackStyles.stackHeader
|
105
|
+
}, /*#__PURE__*/React.createElement(WmLabel, {
|
106
|
+
caption: 'Error Stack:',
|
107
|
+
classname: "error-fallback-stacktitle"
|
108
|
+
}), /*#__PURE__*/React.createElement(WmIcon, {
|
109
|
+
id: 'error-stack-content-copy',
|
110
|
+
iconclass: "wi wi-content-copy",
|
111
|
+
onTap: copyErrorToClipboard,
|
112
|
+
disabled: isCopied,
|
113
|
+
classname: isCopied ? 'error-fallback-copyicon error-fallback-copiedIcon' : 'error-fallback-copyicon'
|
114
|
+
})), /*#__PURE__*/React.createElement(ScrollView, {
|
115
|
+
style: errorFallbackStyles.stackContainer,
|
116
|
+
showsVerticalScrollIndicator: true
|
117
|
+
}, /*#__PURE__*/React.createElement(WmLabel, {
|
118
|
+
caption: (error === null || error === void 0 ? void 0 : error.stack) || 'No stack trace available',
|
119
|
+
classname: "error-fallback-stacktext"
|
120
|
+
}), (info === null || info === void 0 ? void 0 : info.componentStack) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(WmLabel, {
|
121
|
+
caption: "Component Stack:",
|
122
|
+
classname: "error-fallback-component-stacktitle"
|
123
|
+
}), /*#__PURE__*/React.createElement(WmLabel, {
|
124
|
+
caption: info.componentStack,
|
125
|
+
classname: "error-fallback-stacktext"
|
126
|
+
}))))), /*#__PURE__*/React.createElement(View, {
|
127
|
+
style: errorFallbackStyles.buttonContainer
|
128
|
+
}, /*#__PURE__*/React.createElement(WmButton, {
|
129
|
+
caption: "Go to Home",
|
130
|
+
onTap: handleGoHome,
|
131
|
+
classname: "error-fallback-gotohome-btn"
|
132
|
+
}), /*#__PURE__*/React.createElement(WmButton, {
|
133
|
+
caption: "Go Back",
|
134
|
+
onTap: handleGoBack,
|
135
|
+
classname: "error-fallback-goback-btn"
|
136
|
+
})));
|
137
|
+
});
|
138
|
+
};
|
139
|
+
export default Fallback;
|
140
|
+
//# sourceMappingURL=error-fallback.component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","useState","Text","View","ScrollView","TouchableOpacity","navigate","goBackRef","Clipboard","injector","ThemeConsumer","DEFAULT_CLASS","WmIcon","useSafeAreaInsets","WmButton","WmLabel","WmPicture","Fallback","props","error","info","resetErrorBoundary","showStack","setShowStack","isCopied","setIsCopied","appConfig","get","insets","copyErrorToClipboard","errorDetails","message","stack","componentStack","trim","setStringAsync","setTimeout","handleGoBack","handleGoHome","appProperties","homePage","createElement","theme","_appConfig$preference","errorFallbackStyles","getStyle","imageSource","preferences","errorImage","style","paddingTop","top","paddingBottom","bottom","root","infoContainer","imageContainer","picturesource","resizemode","name","classname","caption","errorCard","errorCardRow","id","iconclass","toggleButton","onPress","stackCard","stackHeader","onTap","disabled","stackContainer","showsVerticalScrollIndicator","Fragment","buttonContainer"],"sources":["error-fallback.component.tsx"],"sourcesContent":["import React, { useState, useContext, useEffect } from 'react';\nimport { Text, View, ScrollView, TouchableOpacity, Image } from 'react-native';\nimport {\n navigate,\n goBackRef,\n} from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport * as Clipboard from 'expo-clipboard';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nimport { ThemeConsumer } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { DEFAULT_CLASS, ErrorFallbackStyles } from './error-fallback.styles';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\n\nconst Fallback = (props: any) => {\n const { error, info, resetErrorBoundary } = props;\n const [showStack, setShowStack] = useState(false);\n const [isCopied, setIsCopied] = useState(false);\n const appConfig = injector.get<AppConfig>('APP_CONFIG');\n const insets = useSafeAreaInsets();\n\n const copyErrorToClipboard = async () => {\n const errorDetails = `\nError: ${error?.message || 'Unknown error'}\nStack: ${error?.stack || 'No stack available'}\nComponent Stack: ${info?.componentStack || 'No component stack available'}\n `.trim();\n\n await Clipboard.setStringAsync(errorDetails);\n setIsCopied(true);\n\n setTimeout(() => {\n setIsCopied(false);\n }, 2000);\n };\n\n const handleGoBack = () => {\n goBackRef();\n if (resetErrorBoundary) {\n resetErrorBoundary();\n }\n };\n\n const handleGoHome = () => {\n navigate(appConfig.appProperties.homePage, {});\n if (resetErrorBoundary) {\n resetErrorBoundary();\n }\n };\n\n return (\n <ThemeConsumer>\n {(theme) => {\n const errorFallbackStyles = theme.getStyle(\n DEFAULT_CLASS\n ) as ErrorFallbackStyles;\n const imageSource = appConfig?.preferences?.errorImage;\n\n return (\n <View\n style={[\n { paddingTop: insets?.top, paddingBottom: insets?.bottom },\n errorFallbackStyles.root,\n ]}\n >\n {/* Error Image */}\n <View style={errorFallbackStyles.infoContainer}>\n <View style={errorFallbackStyles.imageContainer}>\n <WmPicture\n picturesource={imageSource}\n resizemode=\"contain\"\n name=\"picture2\"\n classname=\"error-fallback-image\"\n />\n </View>\n\n <WmLabel\n caption={'Something went wrong.'}\n classname=\"error-fallback-title\"\n />\n <WmLabel\n caption={'Please try again.'}\n classname=\"error-fallback-subtitle\"\n />\n\n <View style={errorFallbackStyles.errorCard}>\n <View style={errorFallbackStyles.errorCardRow}>\n <WmIcon\n id={'error-icon'}\n iconclass=\"wi wi-error\"\n classname=\"error-fallback-erroricon\"\n ></WmIcon>\n <WmLabel\n caption={'Error'}\n classname=\"error-fallback-error-label\"\n />\n </View>\n <WmLabel\n caption={error?.message || 'An unexpected error occurred'}\n classname=\"error-fallback-error-message\"\n />\n </View>\n\n <TouchableOpacity\n style={errorFallbackStyles.toggleButton}\n onPress={() => setShowStack(!showStack)}\n >\n <WmLabel\n caption={`${showStack ? 'Hide' : 'Show'} Error Details`}\n classname=\"error-fallback-toggle-heading\"\n />\n <Text style={{}}>\n {showStack ? (\n <WmIcon\n id={'error-stack-arrow-up'}\n iconclass=\"wi wi-keyboard-arrow-up\"\n classname=\"error-fallback-toggle-icon\"\n ></WmIcon>\n ) : (\n <WmIcon\n id={'error-stack-arrow-down'}\n iconclass=\"wi wi-keyboard-arrow-down\"\n classname=\"error-fallback-toggle-icon\"\n ></WmIcon>\n )}\n </Text>\n </TouchableOpacity>\n\n {showStack && (\n <View style={errorFallbackStyles.stackCard}>\n <View style={errorFallbackStyles.stackHeader}>\n <WmLabel\n caption={'Error Stack:'}\n classname=\"error-fallback-stacktitle\"\n />\n <WmIcon\n id={'error-stack-content-copy'}\n iconclass=\"wi wi-content-copy\"\n onTap={copyErrorToClipboard}\n disabled={isCopied}\n classname={\n isCopied\n ? 'error-fallback-copyicon error-fallback-copiedIcon'\n : 'error-fallback-copyicon'\n }\n />\n </View>\n <ScrollView\n style={errorFallbackStyles.stackContainer}\n showsVerticalScrollIndicator={true}\n >\n <WmLabel\n caption={error?.stack || 'No stack trace available'}\n classname=\"error-fallback-stacktext\"\n />\n {info?.componentStack && (\n <>\n <WmLabel\n caption=\"Component Stack:\"\n classname=\"error-fallback-component-stacktitle\"\n />\n <WmLabel\n caption={info.componentStack}\n classname=\"error-fallback-stacktext\"\n />\n </>\n )}\n </ScrollView>\n </View>\n )}\n </View>\n\n <View style={errorFallbackStyles.buttonContainer}>\n <WmButton\n caption=\"Go to Home\"\n onTap={handleGoHome}\n classname=\"error-fallback-gotohome-btn\"\n />\n <WmButton\n caption=\"Go Back\"\n onTap={handleGoBack}\n classname=\"error-fallback-goback-btn\"\n />\n </View>\n </View>\n );\n }}\n </ThemeConsumer>\n );\n};\n\nexport default Fallback;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAA+B,OAAO;AAC9D,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,QAAe,cAAc;AAC9E,SACEC,QAAQ,EACRC,SAAS,QACJ,mDAAmD;AAC1D,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,S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O;MACN8C,OAAO,EAAEzC,IAAI,CAACa,cAAe;MAC7B2B,SAAS,EAAC;IAA0B,CACrC,CACD,CAEM,CACR,CAEJ,CAAC,eAEP5D,KAAA,CAAAyC,aAAA,CAACtC,IAAI;MAAC8C,KAAK,EAAEL,mBAAmB,CAAC+B;IAAgB,gBAC/C3E,KAAA,CAAAyC,aAAA,CAAC3B,QAAQ;MACP+C,OAAO,EAAC,YAAY;MACpBS,KAAK,EAAEhC,YAAa;MACpBsB,SAAS,EAAC;IAA6B,CACxC,CAAC,eACF5D,KAAA,CAAAyC,aAAA,CAAC3B,QAAQ;MACP+C,OAAO,EAAC,SAAS;MACjBS,KAAK,EAAEjC,YAAa;MACpBuB,SAAS,EAAC;IAA2B,CACtC,CACG,CACF,CAAC;EAEX,CACa,CAAC;AAEpB,CAAC;AAED,eAAe3C,QAAQ","ignoreList":[]}
|
@@ -0,0 +1,224 @@
|
|
1
|
+
import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';
|
2
|
+
import { defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';
|
3
|
+
export const DEFAULT_CLASS = 'app-error-fallback';
|
4
|
+
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
5
|
+
const defaultStyles = defineStyles({
|
6
|
+
root: {
|
7
|
+
flex: 1,
|
8
|
+
paddingHorizontal: 20,
|
9
|
+
backgroundColor: '#fff',
|
10
|
+
justifyContent: 'center'
|
11
|
+
},
|
12
|
+
text: {},
|
13
|
+
infoContainer: {
|
14
|
+
flex: 1,
|
15
|
+
width: '100%',
|
16
|
+
justifyContent: 'center'
|
17
|
+
},
|
18
|
+
imageContainer: {
|
19
|
+
alignItems: 'center',
|
20
|
+
marginVertical: 24
|
21
|
+
},
|
22
|
+
errorImage: {
|
23
|
+
width: '80%',
|
24
|
+
maxWidth: 150,
|
25
|
+
height: undefined,
|
26
|
+
aspectRatio: 1.2,
|
27
|
+
maxHeight: 150,
|
28
|
+
alignSelf: 'center'
|
29
|
+
},
|
30
|
+
title: {
|
31
|
+
fontSize: 24,
|
32
|
+
fontWeight: '700',
|
33
|
+
textAlign: 'center',
|
34
|
+
color: '#2d3748',
|
35
|
+
marginBottom: 8
|
36
|
+
},
|
37
|
+
subtitle: {
|
38
|
+
fontSize: 14,
|
39
|
+
textAlign: 'center',
|
40
|
+
color: '#71717A',
|
41
|
+
marginBottom: 24,
|
42
|
+
fontWeight: '400'
|
43
|
+
},
|
44
|
+
errorCard: {
|
45
|
+
backgroundColor: 'rgba(245, 71, 70, 0.1)',
|
46
|
+
borderRadius: 12,
|
47
|
+
paddingHorizontal: 16,
|
48
|
+
paddingVertical: 12,
|
49
|
+
height: 70,
|
50
|
+
marginBottom: 16
|
51
|
+
},
|
52
|
+
errorCardRow: {
|
53
|
+
flexDirection: 'row',
|
54
|
+
alignItems: 'center',
|
55
|
+
marginBottom: 8
|
56
|
+
},
|
57
|
+
errorLabel: {
|
58
|
+
fontSize: 14,
|
59
|
+
fontWeight: '600',
|
60
|
+
color: '#F54746'
|
61
|
+
},
|
62
|
+
errorMessage: {
|
63
|
+
fontSize: 14,
|
64
|
+
color: '#71717A',
|
65
|
+
lineHeight: 20,
|
66
|
+
fontWeight: 500
|
67
|
+
},
|
68
|
+
toggleButton: {
|
69
|
+
flexDirection: 'row',
|
70
|
+
alignItems: 'center',
|
71
|
+
justifyContent: 'space-between',
|
72
|
+
marginBottom: 16
|
73
|
+
},
|
74
|
+
toggleText: {
|
75
|
+
fontSize: 12,
|
76
|
+
color: '#71717A',
|
77
|
+
marginRight: 8
|
78
|
+
},
|
79
|
+
toggleIcon: {
|
80
|
+
fontSize: 18,
|
81
|
+
color: '#090A0A',
|
82
|
+
padding: 0
|
83
|
+
},
|
84
|
+
stackCard: {
|
85
|
+
backgroundColor: '#fff',
|
86
|
+
marginBottom: 24
|
87
|
+
},
|
88
|
+
stackHeader: {
|
89
|
+
flexDirection: 'row',
|
90
|
+
justifyContent: 'space-between',
|
91
|
+
alignItems: 'center'
|
92
|
+
},
|
93
|
+
stackTitle: {
|
94
|
+
fontSize: 16,
|
95
|
+
fontWeight: '600',
|
96
|
+
color: '#000'
|
97
|
+
},
|
98
|
+
copyIcon: {
|
99
|
+
fontSize: 18,
|
100
|
+
color: '#3B82F6',
|
101
|
+
borderRadius: 6,
|
102
|
+
padding: 0
|
103
|
+
},
|
104
|
+
copiedIcon: {
|
105
|
+
color: '#48bb78'
|
106
|
+
},
|
107
|
+
stackContainer: {
|
108
|
+
maxHeight: 200,
|
109
|
+
marginTop: 12
|
110
|
+
},
|
111
|
+
stackText: {
|
112
|
+
fontSize: 12,
|
113
|
+
color: '#4a5568',
|
114
|
+
lineHeight: 16,
|
115
|
+
fontFamily: 'monospace'
|
116
|
+
},
|
117
|
+
componentStackTitle: {
|
118
|
+
fontSize: 14,
|
119
|
+
fontWeight: '600',
|
120
|
+
color: '#2d3748',
|
121
|
+
marginTop: 16,
|
122
|
+
marginBottom: 8
|
123
|
+
},
|
124
|
+
buttonContainer: {
|
125
|
+
width: '100%',
|
126
|
+
maxWidth: 400,
|
127
|
+
alignSelf: 'center',
|
128
|
+
marginTop: 24,
|
129
|
+
marginBottom: 16
|
130
|
+
},
|
131
|
+
primaryButton: {
|
132
|
+
backgroundColor: '#3B82F6',
|
133
|
+
borderRadius: 12,
|
134
|
+
paddingVertical: 16,
|
135
|
+
paddingHorizontal: 24,
|
136
|
+
alignItems: 'center',
|
137
|
+
marginBottom: 16,
|
138
|
+
alignSelf: 'center',
|
139
|
+
width: '100%'
|
140
|
+
},
|
141
|
+
primaryButtonText: {
|
142
|
+
color: '#FFFFFF',
|
143
|
+
fontWeight: '700',
|
144
|
+
fontSize: 16,
|
145
|
+
lineHeight: 24
|
146
|
+
},
|
147
|
+
secondaryButton: {
|
148
|
+
alignItems: 'center',
|
149
|
+
paddingVertical: 12,
|
150
|
+
paddingHorizontal: 24,
|
151
|
+
alignSelf: 'center',
|
152
|
+
width: '100%'
|
153
|
+
},
|
154
|
+
secondaryButtonText: {
|
155
|
+
color: '#242424',
|
156
|
+
fontWeight: '600',
|
157
|
+
fontSize: 16,
|
158
|
+
lineHeight: 24
|
159
|
+
}
|
160
|
+
});
|
161
|
+
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
162
|
+
addStyle('error-fallback-image', '', {
|
163
|
+
root: defaultStyles.errorImage
|
164
|
+
});
|
165
|
+
addStyle('error-fallback-title', '', {
|
166
|
+
root: {
|
167
|
+
alignSelf: 'center'
|
168
|
+
},
|
169
|
+
text: defaultStyles.title
|
170
|
+
});
|
171
|
+
addStyle('error-fallback-subtitle', '', {
|
172
|
+
root: {
|
173
|
+
alignSelf: 'center'
|
174
|
+
},
|
175
|
+
text: defaultStyles.subtitle
|
176
|
+
});
|
177
|
+
addStyle('error-fallback-erroricon', '', {
|
178
|
+
icon: {
|
179
|
+
fontSize: 15
|
180
|
+
},
|
181
|
+
text: {
|
182
|
+
color: '#EF4444'
|
183
|
+
}
|
184
|
+
});
|
185
|
+
addStyle('error-fallback-error-label', '', {
|
186
|
+
text: defaultStyles.errorLabel
|
187
|
+
});
|
188
|
+
addStyle('error-fallback-error-message', '', {
|
189
|
+
text: defaultStyles.errorMessage
|
190
|
+
});
|
191
|
+
addStyle('error-fallback-toggle-heading', '', {
|
192
|
+
text: defaultStyles.toggleText
|
193
|
+
});
|
194
|
+
addStyle('error-fallback-toggle-icon', '', {
|
195
|
+
text: defaultStyles.toggleIcon
|
196
|
+
});
|
197
|
+
addStyle('error-fallback-stacktitle', '', {
|
198
|
+
root: {
|
199
|
+
alignSelf: 'center'
|
200
|
+
},
|
201
|
+
text: defaultStyles.stackTitle
|
202
|
+
});
|
203
|
+
addStyle('error-fallback-copyicon', '', {
|
204
|
+
icon: defaultStyles.copyIcon
|
205
|
+
});
|
206
|
+
addStyle('error-fallback-copiedIcon', '', {
|
207
|
+
icon: defaultStyles.copiedIcon
|
208
|
+
});
|
209
|
+
addStyle('error-fallback-stacktext', '', {
|
210
|
+
text: defaultStyles.stackText
|
211
|
+
});
|
212
|
+
addStyle('error-fallback-component-stacktitle', '', {
|
213
|
+
text: defaultStyles.componentStackTitle
|
214
|
+
});
|
215
|
+
addStyle('error-fallback-gotohome-btn', '', {
|
216
|
+
root: defaultStyles.primaryButton,
|
217
|
+
text: defaultStyles.primaryButtonText
|
218
|
+
});
|
219
|
+
addStyle('error-fallback-goback-btn', '', {
|
220
|
+
root: defaultStyles.secondaryButton,
|
221
|
+
text: defaultStyles.secondaryButtonText
|
222
|
+
});
|
223
|
+
});
|
224
|
+
//# sourceMappingURL=error-fallback.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flex","paddingHorizontal","backgroundColor","justifyContent","text","infoContainer","width","imageContainer","alignItems","marginVertical","errorImage","maxWidth","height","undefined","aspectRatio","maxHeight","alignSelf","title","fontSize","fontWeight","textAlign","color","marginBottom","subtitle","errorCard","borderRadius","paddingVertical","errorCardRow","flexDirection","errorLabel","errorMessage","lineHeight","toggleButton","toggleText","marginRight","toggleIcon","padding","stackCard","stackHeader","stackTitle","copyIcon","copiedIcon","stackContainer","marginTop","stackText","fontFamily","componentStackTitle","buttonContainer","primaryButton","primaryButtonText","secondaryButton","secondaryButtonText","icon"],"sources":["error-fallback.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport {\n BaseStyles,\n defineStyles,\n} from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type ErrorFallbackStyles = BaseStyles & {\n imageContainer: AllStyle;\n errorImage: AllStyle;\n title: AllStyle;\n subtitle: AllStyle;\n errorCard: AllStyle;\n errorLabel: AllStyle;\n errorMessage: AllStyle;\n toggleButton: AllStyle;\n toggleText: AllStyle;\n toggleIcon: AllStyle;\n stackCard: AllStyle;\n stackHeader: AllStyle;\n stackTitle: AllStyle;\n copyIcon: AllStyle;\n copiedIcon: AllStyle;\n stackContainer: AllStyle;\n stackText: AllStyle;\n componentStackTitle: AllStyle;\n buttonContainer: AllStyle;\n primaryButton: AllStyle;\n primaryButtonText: AllStyle;\n secondaryButton: AllStyle;\n secondaryButtonText: AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-error-fallback';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: ErrorFallbackStyles = defineStyles({\n root: {\n flex: 1,\n paddingHorizontal: 20,\n backgroundColor: '#fff',\n justifyContent: 'center',\n },\n text: {},\n infoContainer: {\n flex: 1,\n width: '100%',\n justifyContent: 'center',\n },\n imageContainer: {\n alignItems: 'center',\n marginVertical: 24,\n },\n errorImage: {\n width: '80%',\n maxWidth: 150,\n height: undefined,\n aspectRatio: 1.2,\n maxHeight: 150,\n alignSelf: 'center',\n },\n title: {\n fontSize: 24,\n fontWeight: '700',\n textAlign: 'center',\n color: '#2d3748',\n marginBottom: 8,\n },\n subtitle: {\n fontSize: 14,\n textAlign: 'center',\n color: '#71717A',\n marginBottom: 24,\n fontWeight: '400',\n },\n errorCard: {\n backgroundColor: 'rgba(245, 71, 70, 0.1)',\n borderRadius: 12,\n paddingHorizontal: 16,\n paddingVertical: 12,\n height: 70,\n marginBottom: 16,\n },\n errorCardRow: {\n flexDirection: 'row',\n alignItems: 'center',\n marginBottom: 8,\n },\n errorLabel: {\n fontSize: 14,\n fontWeight: '600',\n color: '#F54746',\n },\n errorMessage: {\n fontSize: 14,\n color: '#71717A',\n lineHeight: 20,\n fontWeight: 500,\n },\n toggleButton: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n marginBottom: 16,\n },\n toggleText: {\n fontSize: 12,\n color: '#71717A',\n marginRight: 8,\n },\n toggleIcon: {\n fontSize: 18,\n color: '#090A0A',\n padding: 0,\n },\n stackCard: {\n backgroundColor: '#fff',\n marginBottom: 24,\n },\n stackHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n stackTitle: {\n fontSize: 16,\n fontWeight: '600',\n color: '#000',\n },\n copyIcon: {\n fontSize: 18,\n color: '#3B82F6',\n borderRadius: 6,\n padding: 0,\n },\n copiedIcon: {\n color: '#48bb78',\n },\n stackContainer: {\n maxHeight: 200,\n marginTop: 12,\n },\n stackText: {\n fontSize: 12,\n color: '#4a5568',\n lineHeight: 16,\n fontFamily: 'monospace',\n },\n componentStackTitle: {\n fontSize: 14,\n fontWeight: '600',\n color: '#2d3748',\n marginTop: 16,\n marginBottom: 8,\n },\n buttonContainer: {\n width: '100%',\n maxWidth: 400,\n alignSelf: 'center',\n marginTop: 24,\n marginBottom: 16,\n },\n primaryButton: {\n backgroundColor: '#3B82F6',\n borderRadius: 12,\n paddingVertical: 16,\n paddingHorizontal: 24,\n alignItems: 'center',\n marginBottom: 16,\n alignSelf: 'center',\n width: '100%',\n },\n primaryButtonText: {\n color: '#FFFFFF',\n fontWeight: '700',\n fontSize: 16,\n lineHeight: 24,\n },\n secondaryButton: {\n alignItems: 'center',\n paddingVertical: 12,\n paddingHorizontal: 24,\n alignSelf: 'center',\n width: '100%',\n },\n secondaryButtonText: {\n color: '#242424',\n fontWeight: '600',\n fontSize: 16,\n lineHeight: 24,\n },\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('error-fallback-image', '', {\n root: defaultStyles.errorImage,\n });\n addStyle('error-fallback-title', '', {\n root: { alignSelf: 'center' },\n text: defaultStyles.title,\n });\n addStyle('error-fallback-subtitle', '', {\n root: { alignSelf: 'center' },\n text: defaultStyles.subtitle,\n });\n addStyle('error-fallback-erroricon', '', {\n icon: {fontSize: 15},\n text: { color: '#EF4444'},\n });\n addStyle('error-fallback-error-label', '', {\n text: defaultStyles.errorLabel,\n });\n addStyle('error-fallback-error-message', '', {\n text: defaultStyles.errorMessage,\n });\n addStyle('error-fallback-toggle-heading', '', {\n text: defaultStyles.toggleText,\n });\n addStyle('error-fallback-toggle-icon', '', {\n text: defaultStyles.toggleIcon,\n });\n addStyle('error-fallback-stacktitle', '', {\n root: { alignSelf: 'center' },\n text: defaultStyles.stackTitle,\n });\n addStyle('error-fallback-copyicon', '', {\n icon: defaultStyles.copyIcon,\n });\n addStyle('error-fallback-copiedIcon', '', {\n icon: defaultStyles.copiedIcon,\n });\n addStyle('error-fallback-stacktext', '', {\n text: defaultStyles.stackText,\n });\n addStyle('error-fallback-component-stacktitle', '', {\n text: defaultStyles.componentStackTitle,\n });\n addStyle('error-fallback-gotohome-btn', '', {\n root: defaultStyles.primaryButton,\n text: defaultStyles.primaryButtonText,\n });\n addStyle('error-fallback-goback-btn', '', {\n root: defaultStyles.secondaryButton,\n text: defaultStyles.secondaryButtonText,\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAEEC,YAAY,QACP,+CAA+C;AA4BtD,OAAO,MAAMC,aAAa,GAAG,oBAAoB;AAEjDF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACtDM,IAAI,EAAE;MACJC,IAAI,EAAE,CAAC;MACPC,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAE,MAAM;MACvBC,cAAc,EAAE;IAClB,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,aAAa,EAAE;MACbL,IAAI,EAAE,CAAC;MACPM,KAAK,EAAE,MAAM;MACbH,cAAc,EAAE;IAClB,CAAC;IACDI,cAAc,EAAE;MACdC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE;IAClB,CAAC;IACDC,UAAU,EAAE;MACVJ,KAAK,EAAE,KAAK;MACZK,QAAQ,EAAE,GAAG;MACbC,MAAM,EAAEC,SAAS;MACjBC,WAAW,EAAE,GAAG;MAChBC,SAAS,EAAE,GAAG;MACdC,SAAS,EAAE;IACb,CAAC;IACDC,KAAK,EAAE;MACLC,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE,KAAK;MACjBC,SAAS,EAAE,QAAQ;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,2BAA2B,EAAE,EAAE,EAAE;IACxCE,IAAI,EAAE;MAAEiB,SAAS,EAAE;IAAS,CAAC;IAC7BZ,IAAI,EAAEN,aAAa,CAACyC;EACtB,CAAC,CAAC;EACF1C,QAAQ,CAAC,yBAAyB,EAAE,EAAE,EAAE;IACtCuD,IAAI,EAAEtD,aAAa,CAAC0C;EACtB,CAAC,CAAC;EACF3C,QAAQ,CAAC,2BAA2B,EAAE,EAAE,EAAE;IACxCuD,IAAI,EAAEtD,aAAa,CAAC2C;EACtB,CAAC,CAAC;EACF5C,QAAQ,CAAC,0BAA0B,EAAE,EAAE,EAAE;IACvCO,IAAI,EAAEN,aAAa,CAAC8C;EACtB,CAAC,CAAC;EACF/C,QAAQ,CAAC,qCAAqC,EAAE,EAAE,EAAE;IAClDO,IAAI,EAAEN,aAAa,CAACgD;EACtB,CAAC,CAAC;EACFjD,QAAQ,CAAC,6BAA6B,EAAE,EAAE,EAAE;IAC1CE,IAAI,EAAED,aAAa,CAACkD,aAAa;IACjC5C,IAAI,EAAEN,aAAa,CAACmD;EACtB,CAAC,CAAC;EACFpD,QAAQ,CAAC,2BAA2B,EAAE,EAAE,EAAE;IACxCE,IAAI,EAAED,aAAa,CAACoD,eAAe;IACnC9C,IAAI,EAAEN,aAAa,CAACqD;EACtB,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
|
+
import React from "react";
|
5
|
+
import { StickyComponentsContext } from "../sticky-view.component";
|
6
|
+
import { StickyWrapperContext } from "../sticky-wrapper";
|
7
|
+
export class StickyBaseView extends React.Component {
|
8
|
+
constructor(props) {
|
9
|
+
super(props);
|
10
|
+
_defineProperty(this, "cachedComponent", void 0);
|
11
|
+
_defineProperty(this, "container", null);
|
12
|
+
_defineProperty(this, "id", StickyBaseView.idCounter++);
|
13
|
+
_defineProperty(this, "layout", null);
|
14
|
+
_defineProperty(this, "isAdded", false);
|
15
|
+
}
|
16
|
+
componentWillUnmount() {
|
17
|
+
if (this.isAdded) {
|
18
|
+
var _this$container;
|
19
|
+
(_this$container = this.container) === null || _this$container === void 0 || _this$container.remove(this);
|
20
|
+
this.isAdded = false;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
componentDidMount() {
|
24
|
+
if (this.props.show && this.container && !this.isAdded) {
|
25
|
+
this.container.add(this, this.renderView());
|
26
|
+
this.isAdded = true;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
componentDidUpdate(prevProps) {
|
30
|
+
if (this.container && prevProps.show !== this.props.show) {
|
31
|
+
if (this.props.show && !this.isAdded) {
|
32
|
+
this.container.add(this, this.renderView());
|
33
|
+
this.isAdded = true;
|
34
|
+
} else if (!this.props.show && this.isAdded) {
|
35
|
+
this.container.remove(this);
|
36
|
+
this.isAdded = false;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
render() {
|
41
|
+
this.cachedComponent = this.props.usememo === true && this.cachedComponent || /*#__PURE__*/React.createElement(StickyComponentsContext.Consumer, null, container => {
|
42
|
+
this.container = container;
|
43
|
+
if (this.props.show && !this.isAdded && this.container) {
|
44
|
+
this.container.add(this, this.renderView());
|
45
|
+
this.isAdded = true;
|
46
|
+
}
|
47
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
48
|
+
});
|
49
|
+
return this.cachedComponent;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
_defineProperty(StickyBaseView, "idCounter", 0);
|
53
|
+
_defineProperty(StickyBaseView, "contextType", StickyWrapperContext);
|
54
|
+
//# sourceMappingURL=sticky-base.component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","StickyComponentsContext","StickyWrapperContext","StickyBaseView","Component","constructor","props","_defineProperty","idCounter","componentWillUnmount","isAdded","_this$container","container","remove","componentDidMount","show","add","renderView","componentDidUpdate","prevProps","render","cachedComponent","usememo","createElement","Consumer","Fragment"],"sources":["sticky-base.component.tsx"],"sourcesContent":["import React, { ReactNode } from \"react\";\nimport { LayoutRectangle, ViewStyle } from \"react-native\";\nimport { BaseComponent, BaseComponentState, BaseProps, BaseStyles } from \"../base.component\";\nimport { StickyComponentsContext, StickyViewComponents } from \"../sticky-view.component\";\nimport { StickyWrapperContext } from \"../sticky-wrapper\";\n\nexport interface StickyBaseViewProps {\n name?: string;\n style?: ViewStyle[];\n show?: boolean;\n theme?: any;\n usememo?: boolean;\n children?: any;\n renderView?: () => ReactNode;\n component?: BaseComponent<BaseProps, BaseComponentState<any>, BaseStyles>;\n positionStyles?: ViewStyle;\n}\n\nexport abstract class StickyBaseView extends React.Component<StickyBaseViewProps> {\n protected abstract renderView(): React.ReactNode;\n cachedComponent: React.ReactNode;\n container: StickyViewComponents = null as any;\n static idCounter = 0;\n id = StickyBaseView.idCounter++;\n layout: LayoutRectangle | null = null;\n static contextType = StickyWrapperContext;\n private isAdded: boolean = false;\n\n constructor(props: StickyBaseViewProps) {\n super(props);\n }\n\n componentWillUnmount() {\n if (this.isAdded) {\n this.container?.remove(this);\n this.isAdded = false;\n }\n }\n\n componentDidMount() {\n if (this.props.show && this.container && !this.isAdded) {\n this.container.add(this, this.renderView());\n this.isAdded = true;\n }\n }\n\n componentDidUpdate(prevProps: StickyBaseViewProps) {\n if (this.container && prevProps.show !== this.props.show) {\n if (this.props.show && !this.isAdded) {\n this.container.add(this, this.renderView());\n this.isAdded = true;\n } else if (!this.props.show && this.isAdded) {\n this.container.remove(this);\n this.isAdded = false;\n }\n }\n }\n\n render() {\n this.cachedComponent = (this.props.usememo === true && this.cachedComponent ) || (\n <StickyComponentsContext.Consumer>\n {(container) => {\n this.container = container;\n if (this.props.show && !this.isAdded && this.container) {\n this.container.add(this, this.renderView());\n this.isAdded = true;\n }\n return <></>\n }}\n </StickyComponentsContext.Consumer>)\n return this.cachedComponent;\n }\n}"],"mappings":";;;AAAA,OAAOA,KAAK,MAAqB,OAAO;AAGxC,SAASC,uBAAuB,QAA8B,0BAA0B;AACxF,SAASC,oBAAoB,QAAQ,mBAAmB;AAcxD,OAAO,MAAeC,cAAc,SAASH,KAAK,CAACI,SAAS,CAAsB;EAUhFC,WAAWA,CAACC,KAA0B,EAAE;IACtC,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA;IAAAA,eAAA,oBARmB,IAAI;IAAAA,eAAA,aAEjCJ,cAAc,CAACK,SAAS,EAAE;IAAAD,eAAA,iBACE,IAAI;IAAAA,eAAA,kBAEV,KAAK;EAIhC;EAEAE,oBAAoBA,CAAA,EAAG;IACrB,IAAI,IAAI,CAACC,OAAO,EAAE;MAAA,IAAAC,eAAA;MAChB,CAAAA,eAAA,OAAI,CAACC,SAAS,cAAAD,eAAA,eAAdA,eAAA,CAAgBE,MAAM,CAAC,IAAI,CAAC;MAC5B,IAAI,CAACH,OAAO,GAAG,KAAK;IACtB;EACF;EAEAI,iBAAiBA,CAAA,EAAG;IAClB,IAAI,IAAI,CAACR,KAAK,CAACS,IAAI,IAAI,IAAI,CAACH,SAAS,IAAI,CAAC,IAAI,CAACF,OAAO,EAAE;MACtD,IAAI,CAACE,SAAS,CAACI,GAAG,CAAC,IAAI,EAAE,IAAI,CAACC,UAAU,CAAC,CAAC,CAAC;MAC3C,IAAI,CAACP,OAAO,GAAG,IAAI;IACrB;EACF;EAEAQ,kBAAkBA,CAACC,SAA8B,EAAE;IACjD,IAAI,IAAI,CAACP,SAAS,IAAIO,SAAS,CAACJ,IAAI,KAAK,IAAI,CAACT,KAAK,CAACS,IAAI,EAAE;MACxD,IAAI,IAAI,CAACT,KAAK,CAACS,IAAI,IAAI,CAAC,IAAI,CAACL,OAAO,EAAE;QACpC,IAAI,CAACE,SAAS,CAACI,GAAG,CAAC,IAAI,EAAE,IAAI,CAACC,UAAU,CAAC,CAAC,CAAC;QAC3C,IAAI,CAACP,OAAO,GAAG,IAAI;MACrB,CAAC,MAAM,IAAI,CAAC,IAAI,CAACJ,KAAK,CAACS,IAAI,IAAI,IAAI,CAACL,OAAO,EAAE;QAC3C,IAAI,CAACE,SAAS,CAACC,MAAM,CAAC,IAAI,CAAC;QAC3B,IAAI,CAACH,OAAO,GAAG,KAAK;MACtB;IACF;EACF;EAEAU,MAAMA,CAAA,EAAG;IACP,IAAI,CAACC,eAAe,GAAI,IAAI,CAACf,KAAK,CAACgB,OAAO,KAAK,IAAI,IAAI,IAAI,CAACD,eAAe,iBACzErB,KAAA,CAAAuB,aAAA,CAACtB,uBAAuB,CAACuB,QAAQ,QAC7BZ,SAAS,IAAK;MACd,IAAI,CAACA,SAAS,GAAGA,SAAS;MAC1B,IAAI,IAAI,CAACN,KAAK,CAACS,IAAI,IAAI,CAAC,IAAI,CAACL,OAAO,IAAI,IAAI,CAACE,SAAS,EAAE;QACtD,IAAI,CAACA,SAAS,CAACI,GAAG,CAAC,IAAI,EAAE,IAAI,CAACC,UAAU,CAAC,CAAC,CAAC;QAC3C,IAAI,CAACP,OAAO,GAAG,IAAI;MACrB;MACA,oBAAOV,KAAA,CAAAuB,aAAA,CAAAvB,KAAA,CAAAyB,QAAA,MAAI,CAAC;IACd,CACgC,CAAE;IACpC,OAAO,IAAI,CAACJ,eAAe;EAC7B;AACJ;AAACd,eAAA,CAtDqBJ,cAAc,eAIf,CAAC;AAAAI,eAAA,CAJAJ,cAAc,iBAObD,oBAAoB","ignoreList":[]}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
|
+
import React from 'react';
|
5
|
+
import { StickyWrapperContext } from "../sticky-wrapper";
|
6
|
+
import { StickyBaseView } from "./sticky-base.component";
|
7
|
+
import Animated from 'react-native-reanimated';
|
8
|
+
import { View } from 'react-native';
|
9
|
+
export class StickyContainer extends StickyBaseView {
|
10
|
+
constructor(props) {
|
11
|
+
super(props);
|
12
|
+
}
|
13
|
+
renderView() {
|
14
|
+
return /*#__PURE__*/React.createElement(StickyWrapperContext.Consumer, null, context => {
|
15
|
+
const {
|
16
|
+
stickyContainerAnimateStyle
|
17
|
+
} = context || {};
|
18
|
+
return /*#__PURE__*/React.createElement(View, {
|
19
|
+
style: {
|
20
|
+
...this.props.positionStyles
|
21
|
+
},
|
22
|
+
testID: `${this.props.name}-sticky-container`
|
23
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
24
|
+
style: [stickyContainerAnimateStyle, this.props.style],
|
25
|
+
key: `sticky-container-${this.id}`
|
26
|
+
}, this.props.children));
|
27
|
+
});
|
28
|
+
}
|
29
|
+
}
|
30
|
+
_defineProperty(StickyContainer, "defaultProps", {
|
31
|
+
show: true
|
32
|
+
});
|
33
|
+
_defineProperty(StickyContainer, "contextType", StickyWrapperContext);
|
34
|
+
//# sourceMappingURL=sticky-container.component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","StickyWrapperContext","StickyBaseView","Animated","View","StickyContainer","constructor","props","renderView","createElement","Consumer","context","stickyContainerAnimateStyle","style","positionStyles","testID","name","key","id","children","_defineProperty","show"],"sources":["sticky-container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { StickyWrapperContext } from \"../sticky-wrapper\";\nimport { StickyBaseView, StickyBaseViewProps } from \"./sticky-base.component\";\nimport Animated from 'react-native-reanimated';\nimport { View } from 'react-native';\n\ninterface StickyContainerProps extends StickyBaseViewProps {}\n\nexport class StickyContainer extends StickyBaseView {\n static defaultProps = {\n show: true\n };\n static contextType = StickyWrapperContext;\n\n constructor(props: StickyContainerProps) {\n super(props);\n }\n \n renderView() {\n return <StickyWrapperContext.Consumer>\n {(context) => {\n const { stickyContainerAnimateStyle } = context || {};\n return (\n <View style={{...this.props.positionStyles}}\n testID={`${this.props.name}-sticky-container`}\n >\n <Animated.View style={[ stickyContainerAnimateStyle as any, this.props.style]}\n key={`sticky-container-${this.id}`}\n >\n {this.props.children}\n </Animated.View>\n </View>\n );\n }}\n </StickyWrapperContext.Consumer>\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,oBAAoB,QAAQ,mBAAmB;AACxD,SAASC,cAAc,QAA6B,yBAAyB;AAC7E,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,IAAI,QAAQ,cAAc;AAInC,OAAO,MAAMC,eAAe,SAASH,cAAc,CAAC;EAMlDI,WAAWA,CAACC,KAA2B,EAAE;IACvC,KAAK,CAACA,KAAK,CAAC;EACd;EAEAC,UAAUA,CAAA,EAAG;IACX,oBAAOR,KAAA,CAAAS,aAAA,CAACR,oBAAoB,CAACS,QAAQ,QACjCC,OAAO,IAAK;MACZ,MAAM;QAAEC;MAA4B,CAAC,GAAGD,OAAO,IAAI,CAAC,CAAC;MACrD,oBACEX,KAAA,CAAAS,aAAA,CAACL,IAAI;QAACS,KAAK,EAAE;UAAC,GAAG,IAAI,CAACN,KAAK,CAACO;QAAc,CAAE;QAC1CC,MAAM,EAAE,GAAG,IAAI,CAACR,KAAK,CAACS,IAAI;MAAoB,gBAE9ChB,KAAA,CAAAS,aAAA,CAACN,QAAQ,CAACC,IAAI;QAACS,KAAK,EAAE,CAAED,2BAA2B,EAAS,IAAI,CAACL,KAAK,CAACM,KAAK,CAAE;QAC5EI,GAAG,EAAE,oBAAoB,IAAI,CAACC,EAAE;MAAG,GAElC,IAAI,CAACX,KAAK,CAACY,QACC,CACX,CAAC;IAEX,CAC6B,CAAC;EAClC;AACF;AAACC,eAAA,CA5BYf,eAAe,kBACJ;EACpBgB,IAAI,EAAE;AACR,CAAC;AAAAD,eAAA,CAHUf,eAAe,iBAILJ,oBAAoB","ignoreList":[]}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
/**
|
2
|
+
* Utility function to calculate parent hierarchy styles for sticky positioning
|
3
|
+
* Converts accumulated horizontal spacing from parent hierarchy to positioning offsets and content styles
|
4
|
+
*/
|
5
|
+
export function getParentStyles(component) {
|
6
|
+
// Extract and accumulate parent-inherited styles from the entire component hierarchy
|
7
|
+
const accumulatedParentSpacing = {
|
8
|
+
marginLeft: 0,
|
9
|
+
marginRight: 0,
|
10
|
+
paddingLeft: 0,
|
11
|
+
paddingRight: 0,
|
12
|
+
margin: 0,
|
13
|
+
padding: 0
|
14
|
+
};
|
15
|
+
const inheritedStyles = {};
|
16
|
+
const horizontalSpacingProperties = ['marginLeft', 'marginRight', 'margin', 'paddingLeft', 'paddingRight', 'padding'];
|
17
|
+
const inheritableProperties = ['alignSelf', 'alignItems', 'alignContent', 'justifyContent', 'textAlign', 'textAlignVertical'];
|
18
|
+
|
19
|
+
// Traverse up the parent hierarchy (for horizontal positioning offsets only)
|
20
|
+
let currentComponent = component.parent;
|
21
|
+
while (currentComponent) {
|
22
|
+
if (currentComponent.styles && currentComponent.styles.root) {
|
23
|
+
const parentRootStyles = currentComponent.styles.root;
|
24
|
+
horizontalSpacingProperties.forEach(property => {
|
25
|
+
if (parentRootStyles[property] !== undefined) {
|
26
|
+
const value = parentRootStyles[property];
|
27
|
+
if (typeof value === 'number') {
|
28
|
+
accumulatedParentSpacing[property] += value;
|
29
|
+
} else if (typeof value === 'string' && value.match(/^\d+$/)) {
|
30
|
+
accumulatedParentSpacing[property] += parseInt(value, 10);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
});
|
34
|
+
|
35
|
+
// Inherit other properties from the closest parent that has them
|
36
|
+
inheritableProperties.forEach(property => {
|
37
|
+
if (parentRootStyles[property] !== undefined && inheritedStyles[property] === undefined) {
|
38
|
+
inheritedStyles[property] = parentRootStyles[property];
|
39
|
+
}
|
40
|
+
});
|
41
|
+
}
|
42
|
+
currentComponent = currentComponent.parent;
|
43
|
+
}
|
44
|
+
|
45
|
+
// Convert accumulated parent spacing to horizontal positioning offsets for absolute positioning
|
46
|
+
const positioningStyles = {
|
47
|
+
...inheritedStyles
|
48
|
+
};
|
49
|
+
const contentStyles = {};
|
50
|
+
|
51
|
+
// Apply current component's own alignment properties
|
52
|
+
if (component.styles && component.styles.root) {
|
53
|
+
const currentStyles = component.styles.root;
|
54
|
+
inheritableProperties.forEach(property => {
|
55
|
+
if (currentStyles[property] !== undefined) {
|
56
|
+
contentStyles[property] = currentStyles[property];
|
57
|
+
}
|
58
|
+
});
|
59
|
+
|
60
|
+
// Auto-apply alignItems: "center" when justifyContent or textAlign is "center"
|
61
|
+
if (currentStyles.justifyContent === 'center' || currentStyles.textAlign === 'center') {
|
62
|
+
positioningStyles.alignItems = 'center';
|
63
|
+
}
|
64
|
+
}
|
65
|
+
let leftOffset = 0;
|
66
|
+
let rightOffset = 0;
|
67
|
+
const {
|
68
|
+
marginLeft,
|
69
|
+
marginRight,
|
70
|
+
margin,
|
71
|
+
paddingLeft,
|
72
|
+
paddingRight,
|
73
|
+
padding
|
74
|
+
} = accumulatedParentSpacing;
|
75
|
+
|
76
|
+
// Add parent margins to horizontal positioning offsets
|
77
|
+
if (marginLeft || margin) {
|
78
|
+
leftOffset += (marginLeft || 0) + (margin || 0);
|
79
|
+
}
|
80
|
+
if (marginRight || margin) {
|
81
|
+
rightOffset += (marginRight || 0) + (margin || 0);
|
82
|
+
}
|
83
|
+
|
84
|
+
// Add parent padding to horizontal positioning offsets
|
85
|
+
if (paddingLeft || padding) {
|
86
|
+
leftOffset += (paddingLeft || 0) + (padding || 0);
|
87
|
+
}
|
88
|
+
if (paddingRight || padding) {
|
89
|
+
rightOffset += (paddingRight || 0) + (padding || 0);
|
90
|
+
}
|
91
|
+
if (leftOffset > 0) positioningStyles.paddingLeft = leftOffset;
|
92
|
+
if (rightOffset > 0) positioningStyles.paddingRight = rightOffset;
|
93
|
+
return {
|
94
|
+
positioningStyles,
|
95
|
+
contentStyles
|
96
|
+
};
|
97
|
+
}
|
98
|
+
//# sourceMappingURL=sticky-container.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["getParentStyles","component","accumulatedParentSpacing","marginLeft","marginRight","paddingLeft","paddingRight","margin","padding","inheritedStyles","horizontalSpacingProperties","inheritableProperties","currentComponent","parent","styles","root","parentRootStyles","forEach","property","undefined","value","match","parseInt","positioningStyles","contentStyles","currentStyles","justifyContent","textAlign","alignItems","leftOffset","rightOffset"],"sources":["sticky-container.styles.ts"],"sourcesContent":["import { ViewStyle, TextStyle } from 'react-native';\nimport { BaseComponent, BaseComponentState, BaseProps, BaseStyles } from '../base.component';\n\n/**\n * Utility function to calculate parent hierarchy styles for sticky positioning\n * Converts accumulated horizontal spacing from parent hierarchy to positioning offsets and content styles\n */\nexport function getParentStyles(component: BaseComponent<BaseProps, BaseComponentState<any>, BaseStyles>): {\n positioningStyles: ViewStyle & TextStyle; contentStyles: ViewStyle & TextStyle \n} {\n // Extract and accumulate parent-inherited styles from the entire component hierarchy\n const accumulatedParentSpacing = {\n marginLeft: 0, marginRight: 0,\n paddingLeft: 0, paddingRight: 0,\n margin: 0, padding: 0\n };\n\n const inheritedStyles: ViewStyle & TextStyle = {};\n \n const horizontalSpacingProperties = [\n 'marginLeft', 'marginRight', 'margin',\n 'paddingLeft', 'paddingRight', 'padding'\n ] as const;\n \n const inheritableProperties = [\n 'alignSelf', 'alignItems', 'alignContent', 'justifyContent',\n 'textAlign', 'textAlignVertical',\n ] as const;\n\n // Traverse up the parent hierarchy (for horizontal positioning offsets only)\n let currentComponent = component.parent;\n while (currentComponent) {\n if (currentComponent.styles && currentComponent.styles.root) {\n const parentRootStyles = currentComponent.styles.root;\n horizontalSpacingProperties.forEach(property => {\n if (parentRootStyles[property] !== undefined) {\n const value = parentRootStyles[property];\n if (typeof value === 'number') {\n (accumulatedParentSpacing as any)[property] += value;\n } else if (typeof value === 'string' && value.match(/^\\d+$/)) {\n (accumulatedParentSpacing as any)[property] += parseInt(value, 10);\n }\n }\n });\n \n // Inherit other properties from the closest parent that has them\n inheritableProperties.forEach(property => {\n if (parentRootStyles[property] !== undefined && inheritedStyles[property] === undefined) {\n (inheritedStyles as any)[property] = parentRootStyles[property];\n }\n });\n }\n currentComponent = currentComponent.parent;\n }\n \n // Convert accumulated parent spacing to horizontal positioning offsets for absolute positioning\n const positioningStyles: ViewStyle & TextStyle = { ...inheritedStyles };\n const contentStyles: ViewStyle & TextStyle = {};\n \n // Apply current component's own alignment properties\n if (component.styles && component.styles.root) {\n const currentStyles = component.styles.root;\n inheritableProperties.forEach(property => {\n if (currentStyles[property] !== undefined) {\n (contentStyles as any)[property] = currentStyles[property];\n }\n });\n \n // Auto-apply alignItems: \"center\" when justifyContent or textAlign is \"center\"\n if (currentStyles.justifyContent === 'center' || currentStyles.textAlign === 'center') {\n (positioningStyles as any).alignItems = 'center';\n }\n }\n \n let leftOffset = 0;\n let rightOffset = 0;\n\n const { marginLeft, marginRight, margin, paddingLeft, paddingRight, padding } = accumulatedParentSpacing;\n \n // Add parent margins to horizontal positioning offsets\n if (marginLeft || margin) {\n leftOffset += (marginLeft || 0) + (margin || 0);\n }\n if (marginRight || margin) {\n rightOffset += (marginRight || 0) + (margin || 0);\n }\n \n // Add parent padding to horizontal positioning offsets\n if (paddingLeft || padding) {\n leftOffset += (paddingLeft || 0) + (padding || 0);\n }\n if (paddingRight || padding) {\n rightOffset += (paddingRight || 0) + (padding || 0);\n }\n \n if (leftOffset > 0) positioningStyles.paddingLeft = leftOffset;\n if (rightOffset > 0) positioningStyles.paddingRight = rightOffset;\n\n return { positioningStyles, contentStyles };\n}\n"],"mappings":"AAGA;AACA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAACC,SAAwE,EAEtG;EACA;EACA,MAAMC,wBAAwB,GAAG;IAC/BC,UAAU,EAAE,CAAC;IAAEC,WAAW,EAAE,CAAC;IAC7BC,WAAW,EAAE,CAAC;IAAEC,YAAY,EAAE,CAAC;IAC/BC,MAAM,EAAE,CAAC;IAAEC,OAAO,EAAE;EACtB,CAAC;EAED,MAAMC,eAAsC,GAAG,CAAC,CAAC;EAEjD,MAAMC,2BAA2B,GAAG,CAClC,YAAY,EAAE,aAAa,EAAE,QAAQ,EACrC,aAAa,EAAE,cAAc,EAAE,SAAS,CAChC;EAEV,MAAMC,qBAAqB,GAAG,CAC5B,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAC3D,WAAW,EAAE,mBAAmB,CACxB;;EAEV;EACA,IAAIC,gBAAgB,GAAGX,SAAS,CAACY,MAAM;EACvC,OAAOD,gBAAgB,EAAE;IACvB,IAAIA,gBAAgB,CAACE,MAAM,IAAIF,gBAAgB,CAACE,MAAM,CAACC,IAAI,EAAE;MAC3D,MAAMC,gBAAgB,GAAGJ,gBAAgB,CAACE,MAAM,CAACC,IAAI;MACrDL,2BAA2B,CAACO,OAAO,CAACC,QAAQ,IAAI;QAC9C,IAAIF,gBAAgB,CAACE,QAAQ,CAAC,KAAKC,SAAS,EAAE;UAC5C,MAAMC,KAAK,GAAGJ,gBAAgB,CAACE,QAAQ,CAAC;UACxC,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;YAC5BlB,wBAAwB,CAASgB,QAAQ,CAAC,IAAIE,KAAK;UACtD,CAAC,MAAM,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACC,KAAK,CAAC,OAA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