@draftbit/core 43.7.2-6aa518.0 → 43.7.2-87e505.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Accordion/AccordionItem.js +21 -5
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/Banner.js +23 -4
- package/lib/commonjs/components/Banner.js.map +1 -1
- package/lib/commonjs/components/CardContainerRating.js +16 -5
- package/lib/commonjs/components/CardContainerRating.js.map +1 -1
- package/lib/commonjs/components/Config.js.map +1 -1
- package/lib/commonjs/components/Elevation.js +14 -3
- package/lib/commonjs/components/Elevation.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalConsumer.js.map +1 -1
- package/lib/commonjs/components/StarRating.js +23 -5
- package/lib/commonjs/components/StarRating.js.map +1 -1
- package/lib/commonjs/components/Surface.js +3 -13
- package/lib/commonjs/components/Surface.js.map +1 -1
- package/lib/commonjs/components/ToggleButton.js +3 -17
- package/lib/commonjs/components/ToggleButton.js.map +1 -1
- package/lib/commonjs/hooks.js.map +1 -1
- package/lib/commonjs/mappings/MapView.js +12 -0
- package/lib/commonjs/mappings/MapView.js.map +1 -1
- package/lib/module/components/Accordion/AccordionGroup.js.map +1 -1
- package/lib/module/mappings/MapView.js +12 -0
- package/lib/module/mappings/MapView.js.map +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +20 -0
- package/package.json +3 -3
- package/src/mappings/MapView.js +12 -0
- package/src/mappings/MapView.ts +13 -0
|
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
|
|
26
24
|
const AccordionItem = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -37,9 +35,10 @@ const AccordionItem = _ref => {
|
|
|
37
35
|
textStyles,
|
|
38
36
|
viewStyles
|
|
39
37
|
} = (0, _utilities.extractStyles)(style);
|
|
40
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
41
|
-
style: [styles.container, viewStyles]
|
|
42
|
-
|
|
38
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
+
style: [styles.container, viewStyles],
|
|
40
|
+
...rest
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
42
|
style: styles.row
|
|
44
43
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
45
44
|
name: icon,
|
|
@@ -74,5 +73,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
74
73
|
|
|
75
74
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
76
75
|
|
|
76
|
+
exports.default = _default;
|
|
77
|
+
//# sourceMappingURL=AccordionItem.js.map flexDirection: "row",
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
paddingLeft: 8
|
|
80
|
+
},
|
|
81
|
+
item: {
|
|
82
|
+
marginVertical: 6,
|
|
83
|
+
paddingLeft: 8
|
|
84
|
+
},
|
|
85
|
+
content: {
|
|
86
|
+
flex: 1,
|
|
87
|
+
justifyContent: "center"
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
92
|
+
|
|
77
93
|
exports.default = _default;
|
|
78
94
|
//# sourceMappingURL=AccordionItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionItem.
|
|
1
|
+
{"version":3,"sources":["AccordionItem.js"],"names":["AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","React","createElement","Pressable","styles","container","View","row","name","size","color","colors","primary","item","content","Text","selectable","StyleSheet","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,aAAa,GAAG,QAA6D;AAAA,MAA5D;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,KAAd;AAAqBC,IAAAA,KAArB;AAA4BC,IAAAA,SAA5B;AAAuCC,IAAAA,KAAvC;AAA8C,OAAGC;AAAjD,GAA4D;AAC/E,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6B,8BAAcL,KAAd,CAAnC;AACA,sBAAQM,KAAK,CAACC,aAAN,CAAoBC,sBAApB,EAA+B;AAAER,IAAAA,KAAK,EAAE,CAACS,MAAM,CAACC,SAAR,EAAmBL,UAAnB,CAAT;AAAyC,OAAGF;AAA5C,GAA/B,eACJG,KAAK,CAACC,aAAN,CAAoBI,iBAApB,EAA0B;AAAEX,IAAAA,KAAK,EAAES,MAAM,CAACG;AAAhB,GAA1B,EACId,IAAI,gBAAIQ,KAAK,CAACC,aAAN,CAAoBV,IAApB,EAA0B;AAAEgB,IAAAA,IAAI,EAAEf,IAAR;AAAcgB,IAAAA,IAAI,EAAE,EAApB;AAAwBC,IAAAA,KAAK,EAAEd,SAAS,IAAIC,KAAK,CAACc,MAAN,CAAaC;AAAzD,GAA1B,CAAJ,GAAqG,IAD7G,eAEIX,KAAK,CAACC,aAAN,CAAoBI,iBAApB,EAA0B;AAAEX,IAAAA,KAAK,EAAE,CAACS,MAAM,CAACS,IAAR,EAAcT,MAAM,CAACU,OAArB;AAAT,GAA1B,eACIb,KAAK,CAACC,aAAN,CAAoBa,aAApB,EAA0B;AAAEC,IAAAA,UAAU,EAAE,KAAd;AAAqBrB,IAAAA,KAAK,EAAEI;AAA5B,GAA1B,EAAoEL,KAApE,CADJ,CAFJ,CADI,CAAR;AAKH,CAPD;;AAQA,MAAMU,MAAM,GAAGa,wBAAWC,MAAX,CAAkB;AAC7Bb,EAAAA,SAAS,EAAE;AACPc,IAAAA,OAAO,EAAE;AADF,GADkB;AAI7BZ,EAAAA,GAAG,EAAE;AACDa,IAAAA,aAAa,EAAE,KADd;AAEDC,IAAAA,UAAU,EAAE,QAFX;AAGDC,IAAAA,WAAW,EAAE;AAHZ,GAJwB;AAS7BT,EAAAA,IAAI,EAAE;AACFU,IAAAA,cAAc,EAAE,CADd;AAEFD,IAAAA,WAAW,EAAE;AAFX,GATuB;AAa7BR,EAAAA,OAAO,EAAE;AACLU,IAAAA,IAAI,EAAE,CADD;AAELC,IAAAA,cAAc,EAAE;AAFX;AAboB,CAAlB,CAAf;;eAkBe,wBAAUlC,aAAV,C","sourcesContent":["import * as React from \"react\";\nimport { Pressable, StyleSheet, View, } from \"react-native\";\nimport Text from \"../Text\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nconst AccordionItem = ({ Icon, icon, label, style, iconColor, theme, ...rest }) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (React.createElement(Pressable, { style: [styles.container, viewStyles], ...rest },\n React.createElement(View, { style: styles.row },\n icon ? (React.createElement(Icon, { name: icon, size: 24, color: iconColor || theme.colors.primary })) : null,\n React.createElement(View, { style: [styles.item, styles.content] },\n React.createElement(Text, { selectable: false, style: textStyles }, label)))));\n};\nconst styles = StyleSheet.create({\n container: {\n padding: 8,\n },\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingLeft: 8,\n },\n item: {\n marginVertical: 6,\n paddingLeft: 8,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\nexport default withTheme(AccordionItem);\n"]}
|
|
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
|
|
26
24
|
const ELEVATION = 1;
|
|
27
25
|
const DEFAULT_MAX_WIDTH = 960;
|
|
28
26
|
|
|
@@ -94,9 +92,9 @@ const Banner = _ref => {
|
|
|
94
92
|
|
|
95
93
|
const translateY = _reactNative.Animated.multiply(_reactNative.Animated.add(position, -1), layout.height);
|
|
96
94
|
|
|
97
|
-
return /*#__PURE__*/React.createElement(_Surface.default,
|
|
95
|
+
return /*#__PURE__*/React.createElement(_Surface.default, { ...rest,
|
|
98
96
|
style: [styles.container, (0, _shadow.default)(ELEVATION), style]
|
|
99
|
-
}
|
|
97
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
100
98
|
style: [styles.wrapper, contentStyle]
|
|
101
99
|
}, /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
102
100
|
style: {
|
|
@@ -178,5 +176,26 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
178
176
|
|
|
179
177
|
var _default = (0, _theming.withTheme)(Banner);
|
|
180
178
|
|
|
179
|
+
exports.default = _default;
|
|
180
|
+
//# sourceMappingURL=Banner.js.mapal: 8,
|
|
181
|
+
marginTop: 16,
|
|
182
|
+
marginBottom: 0
|
|
183
|
+
},
|
|
184
|
+
icon: {
|
|
185
|
+
margin: 8
|
|
186
|
+
},
|
|
187
|
+
message: {
|
|
188
|
+
flex: 1,
|
|
189
|
+
margin: 8
|
|
190
|
+
},
|
|
191
|
+
actions: {
|
|
192
|
+
flexDirection: "row",
|
|
193
|
+
justifyContent: "flex-end",
|
|
194
|
+
margin: 8
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
var _default = (0, _theming.withTheme)(Banner);
|
|
199
|
+
|
|
181
200
|
exports.default = _default;
|
|
182
201
|
//# sourceMappingURL=Banner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Banner.tsx"],"names":["ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","React","useState","useEffect","current","position","useRef","Animated","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","styles","container","wrapper","absolute","transform","opacity","marginBottom","message","color","colors","text","actions","primary","StyleSheet","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex"],"mappings":";;;;;;;AAAA;;AACA;;AASA;;AAEA;;AACA;;;;;;;;;;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c,IAAAA,QAAQ,EAAE,QADH;AAEPC,IAAAA,SAAS,EAAE,QAFJ;AAGPC,IAAAA,KAAK,EAAE,MAHA;AAIPC,IAAAA,QAAQ,EAAEvD;AAJH,GAJsB;AAU/BuC,EAAAA,QAAQ,EAAE;AACRrB,IAAAA,QAAQ,EAAE,UADF;AAERsC,IAAAA,GAAG,EAAE,CAFG;AAGRF,IAAAA,KAAK,EAAE;AAHC,GAVqB;AAe/BhD,EAAAA,OAAO,EAAE;AACPmD,IAAAA,aAAa,EAAE,KADR;AAEPC,IAAAA,cAAc,EAAE,YAFT;AAGPC,IAAAA,gBAAgB,EAAE,CAHX;AAIPC,IAAAA,SAAS,EAAE,EAJJ;AAKPlB,IAAAA,YAAY,EAAE;AALP,GAfsB;AAsB/BtC,EAAAA,IAAI,EAAE;AACJyD,IAAAA,MAAM,EAAE;AADJ,GAtByB;AAyB/BlB,EAAAA,OAAO,EAAE;AACPmB,IAAAA,IAAI,EAAE,CADC;AAEPD,IAAAA,MAAM,EAAE;AAFD,GAzBsB;AA6B/Bd,EAAAA,OAAO,EAAE;AACPU,IAAAA,aAAa,EAAE,KADR;AAEPC,IAAAA,cAAc,EAAE,UAFT;AAGPG,IAAAA,MAAM,EAAE;AAHD;AA7BsB,CAAlB,CAAf;;eAoCe,wBAAU5D,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n Button,\n Text,\n View,\n ViewStyle,\n StyleSheet,\n StyleProp,\n Animated,\n} from \"react-native\";\nimport Surface from \"./Surface\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\nconst ELEVATION = 1;\nconst DEFAULT_MAX_WIDTH = 960;\n\ntype Props = {\n initiallyVisible: boolean;\n dismissable: boolean;\n buttonColor?: string;\n icon?: string;\n content?: string;\n contentStyle?: StyleProp<ViewStyle>;\n style?: StyleProp<ViewStyle>;\n ref?: React.RefObject<View>;\n /**\n * @optional\n */\n theme: Theme;\n} & IconSlot;\n\ntype NativeEvent = {\n nativeEvent: {\n layout: {\n x: number;\n y: number;\n width: number;\n height: number;\n };\n };\n};\n\nconst Banner: React.FC<Props> = ({\n initiallyVisible = true,\n dismissable = true,\n icon,\n buttonColor,\n content,\n contentStyle,\n style,\n theme,\n Icon,\n ...rest\n}) => {\n const [visible, setVisible] = React.useState(initiallyVisible);\n\n React.useEffect(() => {\n if (initiallyVisible) {\n setVisible(true);\n }\n }, [initiallyVisible]);\n\n const { current: position } = React.useRef<Animated.Value>(\n new Animated.Value(visible ? 1 : 0)\n );\n const [layout, setLayout] = React.useState<{\n height: number;\n measured: boolean;\n }>({\n height: 0,\n measured: false,\n });\n\n React.useEffect(() => {\n if (visible) {\n // show\n Animated.timing(position, {\n duration: 250,\n toValue: 1,\n useNativeDriver: false,\n }).start();\n } else {\n // hide\n Animated.timing(position, {\n duration: 200,\n toValue: 0,\n useNativeDriver: false,\n }).start();\n }\n }, [visible, position]);\n\n const handleLayout = ({ nativeEvent }: NativeEvent) => {\n const { height } = nativeEvent.layout;\n setLayout({ height, measured: true });\n };\n\n // The banner animation has 2 parts:\n // 1. Blank spacer element which animates its height to move the content\n // 2. Actual banner which animates its translateY\n // In initial render, we position everything normally and measure the height of the banner\n // Once we have the height, we apply the height to the spacer and switch the banner to position: absolute\n // We need this because we need to move the content below as if banner's height was being animated\n // However we can't animated banner's height directly as it'll also resize the content inside\n const height = Animated.multiply(position, layout.height);\n\n const translateY = Animated.multiply(\n Animated.add(position, -1),\n layout.height\n );\n\n return (\n <Surface\n {...rest}\n style={[styles.container, shadow(ELEVATION) as ViewStyle, style]}\n >\n <View style={[styles.wrapper, contentStyle]}>\n <Animated.View style={{ height }} />\n <Animated.View\n onLayout={handleLayout}\n style={[\n layout.measured || !visible\n ? // If we have measured banner's height or it's invisible,\n // Position it absolutely, the layout will be taken care of the spacer\n [styles.absolute, { transform: [{ translateY }] }]\n : // Otherwise position it normally\n null,\n !layout.measured && !visible\n ? // If we haven't measured banner's height yet and it's invisible,\n // hide it with opacity: 0 so user doesn't see it\n { opacity: 0 }\n : null,\n ]}\n >\n <View\n style={[styles.content, { marginBottom: dismissable ? 0 : 16 }]}\n >\n {icon ? (\n <View style={styles.icon}>\n <Icon name={icon} size={40} />\n </View>\n ) : null}\n <Text\n style={[styles.message, { color: theme.colors.text }]}\n accessibilityLiveRegion={visible ? \"polite\" : \"none\"}\n accessibilityRole=\"alert\"\n >\n {content}\n </Text>\n </View>\n {dismissable ? (\n <View style={styles.actions}>\n <Button\n color={buttonColor || theme.colors.primary}\n title=\"Close\"\n onPress={() => setVisible(false)}\n />\n </View>\n ) : null}\n </Animated.View>\n </View>\n </Surface>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n elevation: ELEVATION,\n },\n wrapper: {\n overflow: \"hidden\",\n alignSelf: \"center\",\n width: \"100%\",\n maxWidth: DEFAULT_MAX_WIDTH,\n },\n absolute: {\n position: \"absolute\",\n top: 0,\n width: \"100%\",\n },\n content: {\n flexDirection: \"row\",\n justifyContent: \"flex-start\",\n marginHorizontal: 8,\n marginTop: 16,\n marginBottom: 0,\n },\n icon: {\n margin: 8,\n },\n message: {\n flex: 1,\n margin: 8,\n },\n actions: {\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n margin: 8,\n },\n});\n\nexport default withTheme(Banner);\n"]}
|
|
1
|
+
{"version":3,"sources":["Banner.js"],"names":["ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","React","useState","useEffect","current","position","useRef","Animated","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","createElement","Surface","styles","container","View","wrapper","onLayout","absolute","transform","opacity","marginBottom","name","size","Text","message","color","colors","text","accessibilityLiveRegion","accessibilityRole","actions","Button","primary","title","onPress","StyleSheet","create","elevation","overflow","alignSelf","width","maxWidth","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a,IAAAA,aAAa,EAAE,KADV;AAELC,IAAAA,cAAc,EAAE,UAFX;AAGLG,IAAAA,MAAM,EAAE;AAHH;AA7BoB,CAAlB,CAAf;;eAmCe,wBAAUxE,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport { Button, Text, View, StyleSheet, Animated, } from \"react-native\";\nimport Surface from \"./Surface\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\nconst ELEVATION = 1;\nconst DEFAULT_MAX_WIDTH = 960;\nconst Banner = ({ initiallyVisible = true, dismissable = true, icon, buttonColor, content, contentStyle, style, theme, Icon, ...rest }) => {\n const [visible, setVisible] = React.useState(initiallyVisible);\n React.useEffect(() => {\n if (initiallyVisible) {\n setVisible(true);\n }\n }, [initiallyVisible]);\n const { current: position } = React.useRef(new Animated.Value(visible ? 1 : 0));\n const [layout, setLayout] = React.useState({\n height: 0,\n measured: false,\n });\n React.useEffect(() => {\n if (visible) {\n // show\n Animated.timing(position, {\n duration: 250,\n toValue: 1,\n useNativeDriver: false,\n }).start();\n }\n else {\n // hide\n Animated.timing(position, {\n duration: 200,\n toValue: 0,\n useNativeDriver: false,\n }).start();\n }\n }, [visible, position]);\n const handleLayout = ({ nativeEvent }) => {\n const { height } = nativeEvent.layout;\n setLayout({ height, measured: true });\n };\n // The banner animation has 2 parts:\n // 1. Blank spacer element which animates its height to move the content\n // 2. Actual banner which animates its translateY\n // In initial render, we position everything normally and measure the height of the banner\n // Once we have the height, we apply the height to the spacer and switch the banner to position: absolute\n // We need this because we need to move the content below as if banner's height was being animated\n // However we can't animated banner's height directly as it'll also resize the content inside\n const height = Animated.multiply(position, layout.height);\n const translateY = Animated.multiply(Animated.add(position, -1), layout.height);\n return (React.createElement(Surface, { ...rest, style: [styles.container, shadow(ELEVATION), style] },\n React.createElement(View, { style: [styles.wrapper, contentStyle] },\n React.createElement(Animated.View, { style: { height } }),\n React.createElement(Animated.View, { onLayout: handleLayout, style: [\n layout.measured || !visible\n ? // If we have measured banner's height or it's invisible,\n // Position it absolutely, the layout will be taken care of the spacer\n [styles.absolute, { transform: [{ translateY }] }]\n : // Otherwise position it normally\n null,\n !layout.measured && !visible\n ? // If we haven't measured banner's height yet and it's invisible,\n // hide it with opacity: 0 so user doesn't see it\n { opacity: 0 }\n : null,\n ] },\n React.createElement(View, { style: [styles.content, { marginBottom: dismissable ? 0 : 16 }] },\n icon ? (React.createElement(View, { style: styles.icon },\n React.createElement(Icon, { name: icon, size: 40 }))) : null,\n React.createElement(Text, { style: [styles.message, { color: theme.colors.text }], accessibilityLiveRegion: visible ? \"polite\" : \"none\", accessibilityRole: \"alert\" }, content)),\n dismissable ? (React.createElement(View, { style: styles.actions },\n React.createElement(Button, { color: buttonColor || theme.colors.primary, title: \"Close\", onPress: () => setVisible(false) }))) : null))));\n};\nconst styles = StyleSheet.create({\n container: {\n elevation: ELEVATION,\n },\n wrapper: {\n overflow: \"hidden\",\n alignSelf: \"center\",\n width: \"100%\",\n maxWidth: DEFAULT_MAX_WIDTH,\n },\n absolute: {\n position: \"absolute\",\n top: 0,\n width: \"100%\",\n },\n content: {\n flexDirection: \"row\",\n justifyContent: \"flex-start\",\n marginHorizontal: 8,\n marginTop: 16,\n marginBottom: 0,\n },\n icon: {\n margin: 8,\n },\n message: {\n flex: 1,\n margin: 8,\n },\n actions: {\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n margin: 8,\n },\n});\nexport default withTheme(Banner);\n"]}
|
|
@@ -25,8 +25,6 @@ var _Config = _interopRequireDefault(require("./Config"));
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
-
|
|
30
28
|
const ICON_CONTAINER_SIZE = _Config.default.cardIconSize * 2;
|
|
31
29
|
const ICON_CONTAINER_PADDING = _Config.default.cardIconSize / 2 - 1;
|
|
32
30
|
|
|
@@ -65,11 +63,12 @@ const CardContainerRating = _ref => {
|
|
|
65
63
|
break;
|
|
66
64
|
}
|
|
67
65
|
|
|
68
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default,
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
69
67
|
style: style,
|
|
70
68
|
onPress: onPress,
|
|
71
|
-
numColumns: numColumns
|
|
72
|
-
|
|
69
|
+
numColumns: numColumns,
|
|
70
|
+
...rest
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
73
72
|
style: {
|
|
74
73
|
elevation,
|
|
75
74
|
borderRadius: roundness
|
|
@@ -148,5 +147,17 @@ const CardContainerRating = _ref => {
|
|
|
148
147
|
|
|
149
148
|
var _default = (0, _theming.withTheme)(CardContainerRating);
|
|
150
149
|
|
|
150
|
+
exports.default = _default;
|
|
151
|
+
//# sourceMappingURL=CardContainerRating.js.mapcity).rgb().string()
|
|
152
|
+
}
|
|
153
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
154
|
+
name: icon,
|
|
155
|
+
size: _Config.default.cardIconSize,
|
|
156
|
+
color: colors.surface
|
|
157
|
+
})) : null)));
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
var _default = (0, _theming.withTheme)(CardContainerRating);
|
|
161
|
+
|
|
151
162
|
exports.default = _default;
|
|
152
163
|
//# sourceMappingURL=CardContainerRating.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardContainerRating.
|
|
1
|
+
{"version":3,"sources":["CardContainerRating.js"],"names":["ICON_CONTAINER_SIZE","Config","cardIconSize","ICON_CONTAINER_PADDING","CardContainerRating","Icon","icon","image","cardImageUrl","title","leftDescription","rightDescription","rating","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","titleStyle","rightDescriptionStyle","headline6","body2","headline5","caption","React","createElement","Card","Elevation","borderRadius","View","overflow","backgroundColor","background","Image","source","uri","resizeMode","padding","flexDirection","alignItems","justifyContent","Text","numberOfLines","color","strong","medium","marginTop","StarRating","starSize","marginLeft","cardIconElevation","position","top","right","width","height","alpha","cardIconBackgroundOpacity","rgb","string","name","size","surface"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,mBAAmB,GAAGC,gBAAOC,YAAP,GAAsB,CAAlD;AACA,MAAMC,sBAAsB,GAAGF,gBAAOC,YAAP,GAAsB,CAAtB,GAA0B,CAAzD;;AACA,MAAME,mBAAmB,GAAG,QAAwN;AAAA,MAAvN;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,KAAK,GAAGN,gBAAOO,YAA7B;AAA2CC,IAAAA,KAA3C;AAAkDC,IAAAA,eAAlD;AAAmEC,IAAAA,gBAAnE;AAAqFC,IAAAA,MAArF;AAA6FC,IAAAA,WAAW,GAAG,GAA3G;AAAgHC,IAAAA,SAAS,GAAG,CAA5H;AAA+HC,IAAAA,UAAU,GAAG,CAA5I;AAA+IC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,SAAV;AAAqBC,MAAAA;AAArB,KAAtJ;AAAyLC,IAAAA,KAAzL;AAAgMC,IAAAA,OAAhM;AAAyM,OAAGC;AAA5M,GAAuN;AAChP,MAAIC,UAAJ,EAAgBC,qBAAhB;;AACA,UAAQT,UAAR;AACI,SAAK,CAAL;AACIQ,MAAAA,UAAU,GAAGJ,UAAU,CAACM,SAAxB;AACAD,MAAAA,qBAAqB,GAAGL,UAAU,CAACO,KAAnC;AACA;;AACJ,SAAK,CAAL;AACIH,MAAAA,UAAU,GAAGJ,UAAU,CAACQ,SAAxB;AACAH,MAAAA,qBAAqB,GAAGL,UAAU,CAACS,OAAnC;AAC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pC,gBAN3B,CAPJ,CAhBJ,CAPJ,EAqCIL,IAAI,gBAAIuB,eAAMC,aAAN,CAAoBE,kBAApB,EAA+B;AAAEZ,IAAAA,KAAK,EAAE;AACxCN,MAAAA,SAAS,EAAEb,gBAAOsD,iBADsB;AAExCC,MAAAA,QAAQ,EAAE,UAF8B;AAGxCC,MAAAA,GAAG,EAAE,EAHmC;AAIxCC,MAAAA,KAAK,EAAE,EAJiC;AAKxCC,MAAAA,KAAK,EAAE3D,mBALiC;AAMxC4D,MAAAA,MAAM,EAAE5D,mBANgC;AAOxC0C,MAAAA,OAAO,EAAEvC,sBAP+B;AAQxC8B,MAAAA,YAAY,EAAEjC,mBAR0B;AASxCoC,MAAAA,eAAe,EAAE,oBAAMnB,MAAM,CAACgC,MAAb,EACZY,KADY,CACN5D,gBAAO6D,yBADD,EAEZC,GAFY,GAGZC,MAHY;AATuB;AAAT,GAA/B,eAcJnC,eAAMC,aAAN,CAAoBzB,IAApB,EAA0B;AAAE4D,IAAAA,IAAI,EAAE3D,IAAR;AAAc4D,IAAAA,IAAI,EAAEjE,gBAAOC,YAA3B;AAAyC8C,IAAAA,KAAK,EAAE/B,MAAM,CAACkD;AAAvD,GAA1B,CAdI,CAAJ,GAcgG,IAnDxG,CADJ,CADI,CAAR;AAsDH,CAlED;;eAmEe,wBAAU/D,mBAAV,C","sourcesContent":["import React from \"react\";\nimport { View, Text, } from \"react-native\";\nimport color from \"color\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport StarRating from \"./StarRating\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\nconst CardContainerRating = ({ Icon, icon, image = Config.cardImageUrl, title, leftDescription, rightDescription, rating, aspectRatio = 1.5, elevation = 2, numColumns = 3, theme: { colors, roundness, typography }, style, onPress, ...rest }) => {\n let titleStyle, rightDescriptionStyle;\n switch (numColumns) {\n case 2:\n titleStyle = typography.headline6;\n rightDescriptionStyle = typography.body2;\n break;\n case 3:\n titleStyle = typography.headline5;\n rightDescriptionStyle = typography.caption;\n break;\n }\n return (React.createElement(Card, { style: style, onPress: onPress, numColumns: numColumns, ...rest },\n React.createElement(Elevation, { style: { elevation, borderRadius: roundness } },\n React.createElement(View, { style: {\n borderRadius: roundness,\n overflow: \"hidden\",\n backgroundColor: colors.background,\n //background color is needed for bug on android 9 - https://github.com/facebook/react-native/issues/25093\n } },\n React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }),\n React.createElement(View, { style: {\n padding: numColumns === 1 ? 8 : 16,\n } },\n title ? (React.createElement(View, { style: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n } },\n React.createElement(Text, { numberOfLines: 1, style: [titleStyle, { color: colors.strong }] }, title))) : null,\n leftDescription ? (React.createElement(Text, { numberOfLines: 1, style: [\n typography.body2,\n {\n color: colors.medium,\n marginTop: numColumns === 3 ? 4 : 4 / 2,\n },\n ] }, leftDescription)) : null,\n React.createElement(View, { style: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n marginTop: numColumns === 3 ? 16 : 12,\n } },\n React.createElement(StarRating, { Icon: Icon, starSize: numColumns === 1 ? 10 : 16, rating: rating }),\n React.createElement(Text, { style: [\n rightDescriptionStyle,\n {\n color: colors.medium,\n marginLeft: 8,\n },\n ], numberOfLines: 1 }, rightDescription))),\n icon ? (React.createElement(Elevation, { style: {\n elevation: Config.cardIconElevation,\n position: \"absolute\",\n top: 12,\n right: 12,\n width: ICON_CONTAINER_SIZE,\n height: ICON_CONTAINER_SIZE,\n padding: ICON_CONTAINER_PADDING,\n borderRadius: ICON_CONTAINER_SIZE,\n backgroundColor: color(colors.strong)\n .alpha(Config.cardIconBackgroundOpacity)\n .rgb()\n .string(),\n } },\n React.createElement(Icon, { name: icon, size: Config.cardIconSize, color: colors.surface }))) : null))));\n};\nexport default withTheme(CardContainerRating);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Config.
|
|
1
|
+
{"version":3,"sources":["Config.js"],"names":["getWindowDimensions","width","height","Dimensions","get","windowWidth","windowHeight","getFilters","options","filters","push","join","buildImageUrl","name","getExtension","Platform","OS","avatarImageUrl","avatarImageSize","cardImageSize","cardImageUrl","cardIconSize","cardIconBackgroundOpacity","cardIconElevation","placeholderImageURL","getPlaceholderImageUrl","size","squareImageUrl","FABSize","FABBorderRadius","FABFixedHeight","cardContainerShortImageAspectRatio","rowSingleLineImageSize","rowMultiLineImageSize","rowSingleLineIconSize","rowMultiLineIconSize","headerIconSize","buttonIconSize","swiperInactiveDotSize","swiperActiveDotSize","fieldSearchBarFullIconSize","stepperButtonSize","radioButtonSize","topSafeAreaViewHeight"],"mappings":";;;;;;;AAAA;;AACA,MAAMA,mBAAmB,GAAG,MAAM;AAC9B,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAAoBC,wBAAWC,GAAX,CAAe,QAAf,CAA1B;;AACA,SAAO;AACHC,IAAAA,WAAW,EAAEJ,KADV;AAEHK,IAAAA,YAAY,EAAEJ;AAFX,GAAP;AAIH,CAND;;AAOA,MAAM;AAAEG,EAAAA,WAAF;AAAeC,EAAAA;AAAf,IAAgCN,mBAAmB,EAAzD;;AACA,MAAMO,UAAU,GAAIC,OAAD,IAAa;AAC5B,QAAM;AAAEP,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAAoBM,OAA1B;AACA,QAAMC,OAAO,GAAG,CAAC,SAAD,EAAY,QAAZ,EAAsB,UAAtB,CAAhB;AACA,MAAIR,KAAJ,EACIQ,OAAO,CAACC,IAAR,CAAc,KAAIT,KAAM,EAAxB;AACJ,MAAIC,MAAJ,EACIO,OAAO,CAACC,IAAR,CAAc,KAAIR,MAAO,EAAzB;AACJ,SAAOO,OAAO,CA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lBL;AAmBXC,EAAAA,kCAAkC,EAAE,CAnBzB;AAoBXC,EAAAA,sBAAsB,EAAE,EApBb;AAqBXC,EAAAA,qBAAqB,EAAE,EArBZ;AAsBXC,EAAAA,qBAAqB,EAAE,EAtBZ;AAuBXC,EAAAA,oBAAoB,EAAE,EAvBX;AAwBXC,EAAAA,cAAc,EAAE,EAxBL;AAyBXC,EAAAA,cAAc,EAAE,EAzBL;AA0BXC,EAAAA,qBAAqB,EAAE,CA1BZ;AA2BXC,EAAAA,mBAAmB,EAAE,EA3BV;AA4BXC,EAAAA,0BAA0B,EAAE,EA5BjB;AA6BXC,EAAAA,iBAAiB,EAAE,EA7BR;AA8BXC,EAAAA,eAAe,EAAE,EA9BN;AA+BXC,EAAAA,qBAAqB,EAAE,CA/BZ,CAgCX;;AAhCW,C","sourcesContent":["import { Dimensions, Platform } from \"react-native\";\nconst getWindowDimensions = () => {\n const { width, height } = Dimensions.get(\"window\");\n return {\n windowWidth: width,\n windowHeight: height,\n };\n};\nconst { windowWidth, windowHeight } = getWindowDimensions();\nconst getFilters = (options) => {\n const { width, height } = options;\n const filters = [\"c_scale\", \"q_auto\", \"dpr_auto\"];\n if (width)\n filters.push(`w_${width}`);\n if (height)\n filters.push(`h_${height}`);\n return filters.join(\",\");\n};\nconst buildImageUrl = (options, name) => {\n const filters = getFilters(options);\n return [\n \"https://res.cloudinary.com/altos/image/upload\",\n filters,\n `${name}.png`,\n ].join(\"/\");\n};\nconst getExtension = () => {\n return Platform.OS === \"web\" ? \".svg\" : \".png\";\n};\nexport default {\n windowWidth,\n windowHeight,\n avatarImageUrl: buildImageUrl({\n width: 60,\n height: 60,\n }, \"Avatar\"),\n avatarImageSize: 60,\n cardImageSize: 200,\n cardImageUrl: \"https://static.draftbit.com/images/placeholder-image\" + getExtension(),\n cardIconSize: 16,\n cardIconBackgroundOpacity: 0.24,\n cardIconElevation: 1,\n placeholderImageURL: \"https://static.draftbit.com/images/placeholder-image\" + getExtension(),\n getPlaceholderImageUrl: (size) => buildImageUrl({ width: size.width, height: size.height }, \"image-placeholder_1\"),\n squareImageUrl: buildImageUrl({ width: 100, height: 100 }, \"Avatar\"),\n FABSize: 40,\n FABBorderRadius: 20,\n FABFixedHeight: 64,\n cardContainerShortImageAspectRatio: 1,\n rowSingleLineImageSize: 24,\n rowMultiLineImageSize: 48,\n rowSingleLineIconSize: 24,\n rowMultiLineIconSize: 16,\n headerIconSize: 24,\n buttonIconSize: 24,\n swiperInactiveDotSize: 6,\n swiperActiveDotSize: 10,\n fieldSearchBarFullIconSize: 24,\n stepperButtonSize: 40,\n radioButtonSize: 24,\n topSafeAreaViewHeight: 0,\n // topSafeAreaViewHeight: Platform.OS === \"android\" ? Constants.statusBarHeight : 0\n};\n"]}
|
|
@@ -19,8 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
-
|
|
24
22
|
/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
|
|
25
23
|
const Elevation = _ref => {
|
|
26
24
|
let {
|
|
@@ -37,11 +35,24 @@ const Elevation = _ref => {
|
|
|
37
35
|
colors
|
|
38
36
|
} = theme;
|
|
39
37
|
const borderRadius = radius;
|
|
40
|
-
return /*#__PURE__*/React.createElement(_reactNative.Animated.View,
|
|
38
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, { ...rest,
|
|
41
39
|
style: [{
|
|
42
40
|
borderRadius,
|
|
43
41
|
backgroundColor: colors.surface
|
|
44
42
|
}, elevation ? (0, _shadow.default)(elevation) : null, style]
|
|
43
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
44
|
+
style: {
|
|
45
|
+
overflow: "hidden",
|
|
46
|
+
borderRadius
|
|
47
|
+
}
|
|
48
|
+
}, children));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var _default = (0, _theming.withTheme)(Elevation);
|
|
52
|
+
|
|
53
|
+
exports.default = _default;
|
|
54
|
+
//# sourceMappingURL=Elevation.js.mape
|
|
55
|
+
}, elevation ? (0, _shadow.default)(elevation) : null, style]
|
|
45
56
|
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
46
57
|
style: {
|
|
47
58
|
overflow: "hidden",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Elevation.
|
|
1
|
+
{"version":3,"sources":["Elevation.js"],"names":["Elevation","style","theme","children","rest","elevation","borderRadius","radius","StyleSheet","flatten","colors","React","createElement","Animated","View","backgroundColor","surface","overflow"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AACA;AACA,MAAMA,SAAS,GAAG,QAAyC;AAAA,MAAxC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,QAAhB;AAA0B,OAAGC;AAA7B,GAAwC;AACvD,QAAM;AAAEC,IAAAA,SAAS,GAAG,CAAd;AAAiBC,IAAAA,YAAY,EAAEC;AAA/B,MAA0CC,wBAAWC,OAAX,CAAmBR,KAAnB,KAA6B,EAA7E;AACA,QAAM;AAAES,IAAAA;AAAF,MAAaR,KAAnB;AACA,QAAMI,YAAY,GAAGC,MAArB;AACA,sBAAQI,KAAK,CAACC,aAAN,CAAoBC,sBAASC,IAA7B,EAAmC,EAAE,GAAGV,IAAL;AAAWH,IAAAA,KAAK,EAAE,CACrD;AACIK,MAAAA,YADJ;AAEIS,MAAAA,eAAe,EAAEL,MAAM,CAACM;AAF5B,KADqD,EAKrDX,SAAS,GAAG,qBAAOA,SAAP,CAAH,GAAuB,IALqB,EAMrDJ,KANqD;AAAlB,GAAnC,eAQJU,KAAK,CAACC,aAAN,CAAoBE,iBAApB,EAA0B;AAAEb,IAAAA,KAAK,EAAE;AAAEgB,MAAAA,QAAQ,EAAE,QAAZ;AAAsBX,MAAAA;AAAtB;AAAT,GAA1B,EAA2EH,QAA3E,CARI,CAAR;AASH,CAbD;;eAce,wBAAUH,SAAV,C","sourcesContent":["import * as React from \"react\";\nimport { Animated, StyleSheet, View, } from \"react-native\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\n/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */\nconst Elevation = ({ style, theme, children, ...rest }) => {\n const { elevation = 4, borderRadius: radius } = StyleSheet.flatten(style) || {};\n const { colors } = theme;\n const borderRadius = radius;\n return (React.createElement(Animated.View, { ...rest, style: [\n {\n borderRadius,\n backgroundColor: colors.surface,\n },\n elevation ? shadow(elevation) : null,\n style,\n ] },\n React.createElement(View, { style: { overflow: \"hidden\", borderRadius } }, children)));\n};\nexport default withTheme(Elevation);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PortalConsumer.
|
|
1
|
+
{"version":3,"sources":["PortalConsumer.tsx"],"names":["PortalConsumer","React","Component","componentDidMount","checkManager","Promise","resolve","key","props","manager","mount","children","componentDidUpdate","update","componentWillUnmount","unmount","Error","render"],"mappings":";;;;;;;AAAA;;;;;;;;AAQe,MAAMA,cAAN,SAA6BC,KAAK,CAACC,SAAnC,CAAoD;AAAA;AAAA;;AAAA;AAAA;;AAC1C,QAAjBC,iBAAiB,GAAG;AACxB,SAAKC,YAAL,GADwB,CAGxB;;AACA,UAAMC,OAAO,CAACC,OAAR,EAAN;AAEA,SAAKC,GAAL,GAAW,KAAKC,KAAL,CAAWC,OAAX,CAAmBC,KAAnB,CAAyB,KAAKF,KAAL,CAAWG,QAApC,CAAX;AACD;;AAEDC,EAAAA,kBAAkB,GAAG;AACnB,SAAKR,YAAL;AAEA,SAAKI,KAAL,CAAWC,OAAX,CAAmBI,MAAnB,CAA0B,KAAKN,GAA/B,EAAoC,KAAKC,KAAL,CAAWG,QAA/C;AACD;;AAEDG,EAAAA,oBAAoB,GAAG;AACrB,SAAKV,YAAL;AAEA,SAAKI,KAAL,CAAWC,OAAX,CAAmBM,OAAnB,CAA2B,KAAKR,GAAhC;AACD;;AAIOH,EAAAA,YAAY,GAAG;AACrB,QAAI,CAAC,KAAKI,KAAL,CAAWC,OAAhB,EAAyB;AACvB,YAAM,IAAIO,KAAJ,CACJ,+GACE,iGADF,GAEE,qEAHE,CAAN;AAKD;AACF;;AAEDC,EAAAA,MAAM,GAAG;AACP,WAAO,IAAP;AACD;;AApCgE","sourcesContent":["import * as React from \"react\";\nimport { PortalMethods } from \"./PortalHost\";\n\ntype Props = {\n manager: PortalMethods;\n children: React.ReactNode;\n};\n\nexport default class PortalConsumer extends React.Component<Props> {\n async componentDidMount() {\n this.checkManager();\n\n // Delay updating to prevent React from going to infinite loop\n await Promise.resolve();\n\n this.key = this.props.manager.mount(this.props.children);\n }\n\n componentDidUpdate() {\n this.checkManager();\n\n this.props.manager.update(this.key, this.props.children);\n }\n\n componentWillUnmount() {\n this.checkManager();\n\n this.props.manager.unmount(this.key);\n }\n\n private key: any;\n\n private checkManager() {\n if (!this.props.manager) {\n throw new Error(\n \"Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\\n\\n\" +\n \"Please read our getting-started guide and make sure you've followed all the required steps.\\n\\n\" +\n \"https://callstack.github.io/react-native-paper/getting-started.html\"\n );\n }\n }\n\n render() {\n return null;\n }\n}\n"]}
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
-
|
|
20
18
|
const StarRating = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
Icon,
|
|
@@ -47,9 +45,10 @@ const StarRating = _ref => {
|
|
|
47
45
|
!!onPress && onPress(r);
|
|
48
46
|
}, [onPress]);
|
|
49
47
|
const ratingRounded = Math.round(localRating * 2) / 2;
|
|
50
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
51
|
-
style: [styles.container, style]
|
|
52
|
-
|
|
48
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
49
|
+
style: [styles.container, style],
|
|
50
|
+
...rest
|
|
51
|
+
}, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
53
52
|
key: i,
|
|
54
53
|
style: {
|
|
55
54
|
display: "flex"
|
|
@@ -93,5 +92,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
93
92
|
|
|
94
93
|
var _default = (0, _theming.withTheme)(StarRating);
|
|
95
94
|
|
|
95
|
+
exports.default = _default;
|
|
96
|
+
//# sourceMappingURL=StarRating.js.mapx",
|
|
97
|
+
flexDirection: "row",
|
|
98
|
+
position: "absolute",
|
|
99
|
+
top: 0,
|
|
100
|
+
right: 0,
|
|
101
|
+
left: 0,
|
|
102
|
+
bottom: 0,
|
|
103
|
+
zIndex: 1
|
|
104
|
+
},
|
|
105
|
+
pressable: {
|
|
106
|
+
flex: 1,
|
|
107
|
+
height: "100%",
|
|
108
|
+
width: "50%"
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
var _default = (0, _theming.withTheme)(StarRating);
|
|
113
|
+
|
|
96
114
|
exports.default = _default;
|
|
97
115
|
//# sourceMappingURL=StarRating.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["StarRating.
|
|
1
|
+
{"version":3,"sources":["StarRating.js"],"names":["StarRating","Icon","starSize","maxStars","rating","defaultValue","isEditable","activeColor","inactiveColor","style","onPress","rest","localRating","setLocalRating","React","useState","useEffect","ratingHandler","useCallback","r","ratingRounded","Math","round","createElement","View","styles","container","Array","map","_","i","key","display","name","size","color","touchContainer","Pressable","pressable","StyleSheet","create","flexDirection","alignItems","position","top","right","left","bottom","zIndex","flex","height","width"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AACA,MAAMA,UAAU,GAAG,QAA8I;AAAA,MAA7I;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,QAAQ,GAAG,EAAnB;AAAuBC,IAAAA,QAAQ,GAAG,CAAlC;AAAqCC,IAAAA,MAAM,GAAG,CAA9C;AAAiDC,IAAAA,YAAjD;AAA+DC,IAAAA,UAAU,GAA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,CAPI;AAQZC,IAAAA,MAAM,EAAE;AARI,GALa;AAe7BV,EAAAA,SAAS,EAAE;AACPW,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,MAAM,EAAE,MAFD;AAGPC,IAAAA,KAAK,EAAE;AAHA;AAfkB,CAAlB,CAAf;;eAqBe,wBAAUnD,UAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet, Pressable, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nconst StarRating = ({ Icon, starSize = 16, maxStars = 5, rating = 0, defaultValue, isEditable = false, activeColor, inactiveColor, style, onPress, ...rest }) => {\n const [localRating, setLocalRating] = React.useState(rating || defaultValue || 0);\n React.useEffect(() => {\n if (rating != null) {\n setLocalRating(rating);\n }\n }, [rating]);\n React.useEffect(() => {\n if (defaultValue != null) {\n setLocalRating(defaultValue);\n }\n }, [defaultValue]);\n const ratingHandler = React.useCallback((r) => {\n setLocalRating(r);\n !!onPress && onPress(r);\n }, [onPress]);\n const ratingRounded = Math.round(localRating * 2) / 2;\n return (React.createElement(View, { style: [styles.container, style], ...rest }, [...Array(maxStars)].map((_, i) => (React.createElement(View, { key: i, style: { display: \"flex\" } },\n React.createElement(Icon, { name: ratingRounded - i === 0.5\n ? \"MaterialIcons/star-half\"\n : \"MaterialIcons/star\", size: starSize, color: ratingRounded > i ? activeColor : inactiveColor }),\n isEditable && (React.createElement(View, { style: styles.touchContainer },\n React.createElement(Pressable, { style: styles.pressable, onPress: () => ratingHandler(i + 0.5) }),\n React.createElement(Pressable, { style: styles.pressable, onPress: () => ratingHandler(i + 1) }))))))));\n};\nconst styles = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n touchContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n position: \"absolute\",\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n zIndex: 1,\n },\n pressable: {\n flex: 1,\n height: \"100%\",\n width: \"50%\",\n },\n});\nexport default withTheme(StarRating);\n"]}
|
|
@@ -21,7 +21,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
+
|
|
25
26
|
const Surface = _ref => {
|
|
26
27
|
let {
|
|
27
28
|
elevation: propElevation,
|
|
@@ -53,24 +54,13 @@ const Surface = _ref => {
|
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
|
|
56
|
-
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
57
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, rest, {
|
|
57
58
|
style: [{
|
|
58
59
|
backgroundColor: getBackgroundColor(),
|
|
59
60
|
elevation,
|
|
60
61
|
...evalationStyles,
|
|
61
62
|
...restStyle
|
|
62
63
|
}]
|
|
63
|
-
}, children);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
var _default = (0, _theming.withTheme)(Surface);
|
|
67
|
-
|
|
68
|
-
exports.default = _default;
|
|
69
|
-
//# sourceMappingURL=Surface.js.map: getBackgroundColor(),
|
|
70
|
-
elevation,
|
|
71
|
-
...evalationStyles,
|
|
72
|
-
...restStyle
|
|
73
|
-
}]
|
|
74
64
|
}), children);
|
|
75
65
|
};
|
|
76
66
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Surface.
|
|
1
|
+
{"version":3,"sources":["Surface.tsx"],"names":["Surface","elevation","propElevation","style","theme","children","rest","styleElevation","backgroundColor","restStyle","StyleSheet","flatten","dark","isDarkTheme","mode","colors","evalationStyles","getBackgroundColor","surface"],"mappings":";;;;;;;AACA;;AACA;;AAQA;;AACA;;AACA;;;;;;;;;;AASA,MAAMA,OAAwB,GAAG,QAM3B;AAAA,MAN4B;AAChCC,IAAAA,SAAS,EAAEC,aADqB;AAEhCC,IAAAA,KAFgC;AAGhCC,IAAAA,KAHgC;AAIhCC,IAAAA,QAJgC;AAKhC,OAAGC;AAL6B,GAM5B;AACJ,QAAM;AACJL,IAAAA,SAAS,EAAEM,cAAc,GAAG,CADxB;AAEJC,IAAAA,eAFI;AAGJ,OAAGC;AAHC,MAIDC,wBAAWC,OAAX,CAAmBR,KAAnB,KAA6B,EAJlC;AAMA,QAAM;AAAES,IAAAA,IAAI,EAAEC,WAAR;AAAqBC,IAAAA,IAArB;AAA2BC,IAAAA;AAA3B,MAAsCX,KAA5C;AAEA,QAAMH,SAAS,GAAGC,aAAa,IAAIK,cAAnC;AAEA,QAAMS,eAAe,GAAGf,SAAS,GAAG,qBAAOA,SAAP,CAAH,GAAuB,EAAxD;;AAEA,QAAMgB,kBAAkB,GAAG,MAAM;AAC/B,QAAIT,eAAJ,EAAqB;AACnB,aAAOA,eAAP;AACD,KAFD,MAEO,IAAIK,WAAW,IAAIC,IAAI,KAAK,UAA5B,EAAwC;AAC7C,aAAO,sBAAQb,SAAR,EAAmBc,MAAM,CAACG,OAA1B,CAAP;AACD,KAFM,MAEA;AACL,aAAOH,MAAM,CAACG,OAAd;AACD;AACF,GARD;;AAUA,sBACE,oBAAC,qBAAD,CAAU,IAAV,eACMZ,IADN;AAEE,IAAA,KAAK,EAAE,CACL;AACEE,MAAAA,eAAe,EAAES,kBAAkB,EADrC;AAEEhB,MAAAA,SAFF;AAGE,SAAGe,eAHL;AAIE,SAAGP;AAJL,KADK;AAFT,MAWGJ,QAXH,CADF;AAeD,CA5CD;;eA8Ce,wBAAUL,OAAV,C","sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */\nimport * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport shadow from \"../styles/shadow\";\nimport overlay from \"../styles/overlay\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\nconst Surface: React.FC<Props> = ({\n elevation: propElevation,\n style,\n theme,\n children,\n ...rest\n}) => {\n const {\n elevation: styleElevation = 3,\n backgroundColor,\n ...restStyle\n } = (StyleSheet.flatten(style) || {}) as ViewStyle;\n\n const { dark: isDarkTheme, mode, colors } = theme;\n\n const elevation = propElevation || styleElevation;\n\n const evalationStyles = elevation ? shadow(elevation) : {};\n\n const getBackgroundColor = () => {\n if (backgroundColor) {\n return backgroundColor;\n } else if (isDarkTheme && mode === \"adaptive\") {\n return overlay(elevation, colors.surface);\n } else {\n return colors.surface;\n }\n };\n\n return (\n <Animated.View\n {...rest}\n style={[\n {\n backgroundColor: getBackgroundColor(),\n elevation,\n ...evalationStyles,\n ...restStyle,\n },\n ]}\n >\n {children}\n </Animated.View>\n );\n};\n\nexport default withTheme(Surface);\n"]}
|
|
@@ -19,6 +19,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
|
|
22
24
|
const ToggleButton = _ref => {
|
|
23
25
|
let {
|
|
24
26
|
Icon,
|
|
@@ -56,7 +58,7 @@ const ToggleButton = _ref => {
|
|
|
56
58
|
onPress(!internalValue);
|
|
57
59
|
};
|
|
58
60
|
|
|
59
|
-
return /*#__PURE__*/React.createElement(_IconButton.default, {
|
|
61
|
+
return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
|
|
60
62
|
Icon: Icon,
|
|
61
63
|
icon: icon,
|
|
62
64
|
size: iconSize,
|
|
@@ -68,22 +70,6 @@ const ToggleButton = _ref => {
|
|
|
68
70
|
height,
|
|
69
71
|
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
70
72
|
borderColor: colors[borderColor]
|
|
71
|
-
}, style],
|
|
72
|
-
...rest
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const styles = _reactNative.StyleSheet.create({
|
|
77
|
-
mainContainer: {
|
|
78
|
-
borderWidth: 1
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
var _default = (0, _theming.withTheme)(ToggleButton);
|
|
83
|
-
|
|
84
|
-
exports.default = _default;
|
|
85
|
-
//# sourceMappingURL=ToggleButton.js.map[colorSecondary] : colors[color],
|
|
86
|
-
borderColor: colors[borderColor]
|
|
87
73
|
}, style]
|
|
88
74
|
}, rest));
|
|
89
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ToggleButton.
|
|
1
|
+
{"version":3,"sources":["ToggleButton.tsx"],"names":["ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","React","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","StyleSheet","create","borderWidth"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;AAoBA,MAAMA,YAA6B,GAAG,QAgBhC;AAAA,MAhBiC;AACrCC,IAAAA,IADqC;AAErCC,IAAAA,IAFqC;AAGrCC,IAAAA,OAAO,GAAG,KAH2B;AAIrCC,IAAAA,OAAO,GAAG,MAAM,CAAE,CAJmB;AAKrCC,IAAAA,YALqC;AAMrCC,IAAAA,QAAQ,GAAG,KAN0B;AAOrCC,IAAAA,KAAK,GAAG,SAP6B;AAQrCC,IAAAA,cAAc,GAAG,SARoB;AASrCC,IAAAA,WAAW,GAAG,SATuB;AAUrCC,IAAAA,QAAQ,GAAG,EAV0B;AAWrCC,IAAAA,KAAK,GAAG,EAX6B;AAYrCC,IAAAA,MAAM,GAAG,EAZ4B;AAarCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KAb8B;AAcrCC,IAAAA,KAdqC;AAerC,OAAGC;AAfkC,GAgBjC;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CACxCjB,OAAO,IAAIE,YAAX,IAA2B,KADa,CAA1C;AAIAc,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIlB,OAAO,IAAI,IAAf,EAAqB;AACnBe,MAAAA,gBAAgB,CAACf,OAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,OAAD,CAJH;AAMAgB,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIhB,YAAY,IAAI,IAApB,EAA0B;AACxBa,MAAAA,gBAAgB,CAACb,YAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,YAAD,CAJH;;AAMA,QAAMiB,WAAW,GAAG,MAAM;AACxBJ,IAAAA,gBAAgB,CAAC,CAACD,aAAF,CAAhB;AACAb,IAAAA,OAAO,CAAC,CAACa,aAAF,CAAP;AACD,GAHD;;AAKA,sBACE,oBAAC,mBAAD;AACE,IAAA,IAAI,EAAEhB,IADR;AAEE,IAAA,IAAI,EAAEC,IAFR;AAGE,IAAA,IAAI,EAAEQ,QAHR;AAIE,IAAA,KAAK,EAAEO,aAAa,GAAGH,MAAM,CAACP,KAAD,CAAT,GAAmBO,MAAM,CAACN,cAAD,CAJ/C;AAKE,IAAA,OAAO,EAAEc,WALX;AAME,IAAA,QAAQ,EAAEhB,QANZ;AAOE,IAAA,KAAK,EAAE,CACLiB,MAAM,CAACC,aADF,EAEL;AACEb,MAAAA,KADF;AAEEC,MAAAA,MAFF;AAGEa,MAAAA,eAAe,EAAER,aAAa,GAC1BH,MAAM,CAACN,cAAD,CADoB,GAE1BM,MAAM,CAACP,KAAD,CALZ;AAMEE,MAAAA,WAAW,EAAEK,MAAM,CAACL,WAAD;AANrB,KAFK,EAULM,KAVK;AAPT,KAmBMC,IAnBN,EADF;AAuBD,CA7DD;;AA+DA,MAAMO,MAAM,GAAGG,wBAAWC,MAAX,CAAkB;AAC/BH,EAAAA,aAAa,EAAE;AACbI,IAAAA,WAAW,EAAE;AADA;AADgB,CAAlB,CAAf;;eAMe,wBAAU5B,YAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport { colorTypes } from \"@draftbit/types\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\nimport IconButton from \"./IconButton\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon: string;\n toggled?: boolean;\n onPress?: (value: boolean) => void;\n defaultValue?: boolean;\n disabled?: boolean;\n color?: colorTypes;\n colorSecondary?: colorTypes;\n borderColor?: colorTypes;\n iconSize?: number;\n width?: number;\n height?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst ToggleButton: React.FC<Props> = ({\n Icon,\n icon,\n toggled = false,\n onPress = () => {},\n defaultValue,\n disabled = false,\n color = \"primary\",\n colorSecondary = \"surface\",\n borderColor = \"divider\",\n iconSize = 25,\n width = 50,\n height = 50,\n theme: { colors },\n style,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState<boolean>(\n toggled || defaultValue || false\n );\n\n React.useEffect(() => {\n if (toggled != null) {\n setInternalValue(toggled);\n }\n }, [toggled]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handlePress = () => {\n setInternalValue(!internalValue);\n onPress(!internalValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={icon}\n size={iconSize}\n color={internalValue ? colors[color] : colors[colorSecondary]}\n onPress={handlePress}\n disabled={disabled}\n style={[\n styles.mainContainer,\n {\n width,\n height,\n backgroundColor: internalValue\n ? colors[colorSecondary]\n : colors[color],\n borderColor: colors[borderColor],\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n mainContainer: {\n borderWidth: 1,\n },\n});\n\nexport default withTheme(ToggleButton);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["hooks.
|
|
1
|
+
{"version":3,"sources":["hooks.ts"],"names":["usePrevious","value","ref","React","useRef","useEffect","current"],"mappings":";;;;;;;AAAA;;;;AAEO,SAASA,WAAT,CAAqBC,KAArB,EAAiC;AACtC;AACA;AACA,QAAMC,GAAG,GAAGC,eAAMC,MAAN,EAAZ,CAHsC,CAKtC;;;AACAD,iBAAME,SAAN,CAAgB,MAAM;AACpBH,IAAAA,GAAG,CAACI,OAAJ,GAAcL,KAAd;AACD,GAFD,EAEG,CAACA,KAAD,CAFH,EANsC,CAUtC;;;AACA,SAAOC,GAAG,CAACI,OAAX;AACD","sourcesContent":["import React from \"react\";\n\nexport function usePrevious(value: any) {\n // The ref object is a generic container whose current property is mutable\n // and can hold any value, similar to an instance property on a class\n const ref = React.useRef();\n\n // Store current value in ref\n React.useEffect(() => {\n ref.current = value;\n }, [value]);\n\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n"]}
|
|
@@ -110,6 +110,18 @@ const SEED_DATA = {
|
|
|
110
110
|
label: "Loading BG Color",
|
|
111
111
|
description: "Color of the background to show while the map is loading"
|
|
112
112
|
}),
|
|
113
|
+
showUserLocation: (0, _types.createBoolProp)({
|
|
114
|
+
label: "Show User Location",
|
|
115
|
+
description: "Whether to request and show the user's location on the map",
|
|
116
|
+
required: false,
|
|
117
|
+
defaultValue: null
|
|
118
|
+
}),
|
|
119
|
+
moveMapToUser: (0, _types.createBoolProp)({
|
|
120
|
+
label: "Move Map to User",
|
|
121
|
+
description: "Whether to set the map region to the user's location. Overrides latitude and longitude.",
|
|
122
|
+
required: false,
|
|
123
|
+
defaultValue: null
|
|
124
|
+
}),
|
|
113
125
|
apiKey: (0, _types.createTextProp)({
|
|
114
126
|
defaultValue: process.env.GOOGLE_MAPS_API_KEY,
|
|
115
127
|
editable: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MapView.ts"],"names":["SEED_DATA","name","tag","packageName","description","category","COMPONENT_TYPES","media","layout","flex","props","provider","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","editable","group","GROUPS","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgro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AQ,EAAE,KAJiB;AAK3BC,MAAAA,YAAY,EAAE;AALa,KAAf,CAjET;AAwELY,IAAAA,aAAa,EAAE,2BAAe;AAC5Bd,MAAAA,KAAK,EAAE,gBADqB;AAE5BlB,MAAAA,WAAW,EAAE,qCAFe;AAG5Be,MAAAA,KAAK,EAAEC,cAAOC,KAHc;AAI5BE,MAAAA,QAAQ,EAAE,KAJkB;AAK5BC,MAAAA,YAAY,EAAE;AALc,KAAf,CAxEV;AA+ELa,IAAAA,aAAa,EAAE,2BAAe;AAC5Bf,MAAAA,KAAK,EAAE,aADqB;AAE5BlB,MAAAA,WAAW,EAAE,yCAFe;AAG5Be,MAAAA,KAAK,EAAEC,cAAOC,KAHc;AAI5BE,MAAAA,QAAQ,EAAE,KAJkB;AAK5BC,MAAAA,YAAY,EAAE;AALc,KAAf,CA/EV;AAsFLc,IAAAA,cAAc,EAAE,2BAAe;AAC7BhB,MAAAA,KAAK,EAAE,iBADsB;AAE7BlB,MAAAA,WAAW,EACT,gEAH2B;AAI7Be,MAAAA,KAAK,EAAEC,cAAOC,KAJe;AAK7BE,MAAAA,QAAQ,EAAE,KALmB;AAM7BC,MAAAA,YAAY,EAAE;AANe,KAAf,CAtFX;AA8FLe,IAAAA,qBAAqB,EAAE,4BAAgB;AACrCjB,MAAAA,KAAK,EAAE,yBAD8B;AAErClB,MAAAA,WAAW,EAAE;AAFwB,KAAhB,CA9FlB;AAkGLoC,IAAAA,sBAAsB,EAAE,4BAAgB;AACtClB,MAAAA,KAAK,EAAE,kBAD+B;AAEtClB,MAAAA,WAAW,EAAE;AAFyB,KAAhB,CAlGnB;AAsGLqC,IAAAA,MAAM,EAAE,2BAAe;
|
|
1
|
+
{"version":3,"sources":["MapView.ts"],"names":["SEED_DATA","name","tag","packageName","description","category","COMPONENT_TYPES","media","layout","flex","props","provider","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","editable","group","GROUPS","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor","showUserLocation","moveMapToUser","apiKey","process","env","GOOGLE_MAPS_API_KEY"],"mappings":";;;;;;;AAAA;;AAWO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,UADiB;AAEvBC,EAAAA,GAAG,EAAE,SAFkB;AAGvBC,EAAAA,WAAW,EAAE,gBAHU;AAIvBC,EAAAA,WAAW,EAAE,YAJU;AAKvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KALH;AAMvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,IAAI,EAAE;AADA,GANe;AASvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,QAAQ,EAAEC,kBAAWC,SADb;AAERC,MAAAA,QAAQ,EAAEC,kBAAWC,MAFb;AAGRC,MAAAA,QAAQ,EAAE,IAHF;AAIRC,MAAAA,KAAK,EAAEC,cAAOC,KAJN;AAKRC,MAAAA,KAAK,EAAE,UALC;AAMRlB,MAAAA,WAAW,EAAE,mBANL;AAORmB,MAAAA,QAAQ,EAAE,KAPF;AAQRC,MAAAA,YAAY,EAAE,IARN;AASRC,MAAAA,OAAO,EAAE,CAAC,QAAD;AATD,KADL;AAYLC,IAAAA,QAAQ,EAAE,6BAAiB;AACzBJ,MAAAA,KAAK,EAAE,kBADkB;AAEzBlB,MAAAA,WAAW,EAAE,4CAFY;AAGzBmB,MAAAA,QAAQ,EAAE,KAHe;AAIzBI,MAAAA,SAAS,EAAE,CAJc;AAKzBC,MAAAA,GAAG,EAAE,CAAC,EALmB;AAMzBC,MAAAA,GAAG,EAAE,EANoB;AAOzBL,MAAAA,YAAY,EAAE;AAPW,KAAjB,CAZL;AAqBLM,IAAAA,SAAS,EAAE,6BAAiB;AAC1BR,MAAAA,KAAK,EAAE,mBADmB;AAE1BlB,MAAAA,WAAW,EAAE,4CAFa;AAG1BmB,MAAAA,QAAQ,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AHqB;AAI/BC,MAAAA,YAAY,EAAE;AAJiB,KAAf,CAtGb;AA4GLkB,IAAAA,aAAa,EAAE,2BAAe;AAC5BpB,MAAAA,KAAK,EAAE,kBADqB;AAE5BlB,MAAAA,WAAW,EACT,yFAH0B;AAI5BmB,MAAAA,QAAQ,EAAE,KAJkB;AAK5BC,MAAAA,YAAY,EAAE;AALc,KAAf,CA5GV;AAmHLmB,IAAAA,MAAM,EAAE,2BAAe;AACrBnB,MAAAA,YAAY,EAAEoB,OAAO,CAACC,GAAR,CAAYC,mBADL;AAErB5B,MAAAA,QAAQ,EAAE;AAFW,KAAf;AAnHH;AATgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createColorProp,\n createNumberProp,\n createTextProp,\n GROUPS,\n FORM_TYPES,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Map View\",\n tag: \"MapView\",\n packageName: \"@draftbit/maps\",\n description: \"A map view\",\n category: COMPONENT_TYPES.media,\n layout: {\n flex: 1,\n },\n props: {\n provider: {\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n editable: true,\n group: GROUPS.basic,\n label: \"Provider\",\n description: \"The maps provider\",\n required: false,\n defaultValue: null,\n options: [\"google\"],\n },\n latitude: createNumberProp({\n label: \"Initial Latitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -90,\n max: 90,\n defaultValue: 37.40241,\n }),\n longitude: createNumberProp({\n label: \"Initial Longitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -180,\n max: 180,\n defaultValue: -122.12125,\n }),\n zoom: createNumberProp({\n label: \"Initial Zoom\",\n description: \"The initial zoom of the map\",\n required: true,\n precision: 0,\n step: 1,\n defaultValue: 8,\n min: 0,\n max: 22,\n group: GROUPS.basic,\n }),\n mapType: {\n label: \"Map Type\",\n description: \"The type of map to show\",\n group: GROUPS.basic,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n required: false,\n defaultValue: null,\n options: [\n \"standard\",\n \"satellite\",\n \"hybrid\",\n \"terrain\",\n \"none\",\n \"mutedStandard\",\n ],\n },\n zoomEnabled: createBoolProp({\n label: \"Zoom Enabled\",\n description: \"Whether zooming is enabled (native only)\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n showsCompass: createBoolProp({\n label: \"Shows Compass\",\n description: \"Whether compass is shown\",\n group: GROUPS.basic,\n required: false,\n defaultValue: false,\n }),\n rotateEnabled: createBoolProp({\n label: \"Rotate Enabled\",\n description: \"Whether rotating the map is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n scrollEnabled: createBoolProp({\n label: \"Pan Enabled\",\n description: \"Whether panning the map view is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingEnabled: createBoolProp({\n label: \"Loading Enabled\",\n description:\n \"If true a loading indicator will show while the map is loading\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingIndicatorColor: createColorProp({\n label: \"Loading Indicator Color\",\n description: \"Color of the loading indicator\",\n }),\n loadingBackgroundColor: createColorProp({\n label: \"Loading BG Color\",\n description: \"Color of the background to show while the map is loading\",\n }),\n showUserLocation: createBoolProp({\n label: \"Show User Location\",\n description: \"Whether to request and show the user's location on the map\",\n required: false,\n defaultValue: null,\n }),\n moveMapToUser: createBoolProp({\n label: \"Move Map to User\",\n description:\n \"Whether to set the map region to the user's location. Overrides latitude and longitude.\",\n required: false,\n defaultValue: null,\n }),\n apiKey: createTextProp({\n defaultValue: process.env.GOOGLE_MAPS_API_KEY,\n editable: false,\n }),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionGroup.
|
|
1
|
+
{"version":3,"sources":["AccordionGroup.js"],"names":["React","View","StyleSheet","Pressable","Text","withTheme","extractStyles","AccordionGroup","label","expanded","expandedProp","openColor","closedColor","caretColor","caretColorProp","caretSize","icon","iconSize","style","children","theme","Icon","setExpanded","useState","textStyles","viewStyles","expandedColor","colors","primary","collapsedColor","labelColor","handlePressAction","createElement","Fragment","styles","row","onPress","accessibilityRole","name","size","color","content","selectable","create","flexDirection","alignItems","flex","justifyContent","marginRight"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,UAAf,EAA2BC,SAA3B,QAA6C,cAA7C;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAASC,SAAT,QAA0B,eAA1B;AACA,SAASC,aAAT,QAA8B,iBAA9B;;AACA,MAAMC,cAAc,GAAG,QAAuK;AAAA,MAAtK;AAAEC,IAAAA,KAAF;AAASC,IAAAA,QAAQ,EAAEC,YAAY,GAAG,KAAlC;AAAyCC,IAAAA,SAAzC;AAAoDC,IAAAA,WAApD;AAAiEC,IAAAA,UAAU,EAAEC,cAA7E;AAA6FC,IAAAA,SAAS,GAAG,EAAzG;AAA6GC,IAAAA,IAA7G;AAAmHC,IAAAA,QAAQ,GAAG,EAA9H;AAAkIC,IAAAA,KAAlI;AAAyIC,IAAAA,QAAzI;AAAmJC,IAAAA,KAAnJ;AAA0JC,IAAAA;AAA1J,GAAsK;AAC1L,QAAM,CAACZ,QAAD,EAAWa,WAAX,IAA0BtB,KAAK,CAACuB,QAAN,CAAeb,YAAf,CAAhC;AACA,QAAM;AAAEc,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6BnB,aAAa,CAACY,KAAD,CAAhD;AACA,QAAMQ,aAAa,GAAGf,SAAS,IAAIS,KAAK,CAACO,MAAN,CAAaC,OAAhD;AACA,QAAMC,cAAc,GAAGjB,WAAW,IAAIQ,KAAK,CAACO,MAAN,CAAaC,OAAnD;AACA,QAAME,UAAU,GAAGrB,QAAQ,GAAGiB,aAAH,GAAmBG,cAA9C;AACA,QAAMhB,UAAU,GAAGC,cAAc,IAAIgB,UAArC;;AACA,QAAMC,iBAAiB,GAAG,MAAM;AAC5BT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,EAAAA,GAAG,EAAE;AACDS,IAAAA,aAAa,EAAE,KADd;AAEDC,IAAAA,UAAU,EAAE;AAFX,GADwB;AAK7BJ,EAAAA,OAAO,EAAE;AACLK,IAAAA,IAAI,EAAE,CADD;AAELC,IAAAA,cAAc,EAAE;AAFX,GALoB;AAS7B/B,EAAAA,IAAI,EAAE;AACFgC,IAAAA,WAAW,EAAE;AADX;AATuB,CAAlB,CAAf;AAaA,eAAe3C,SAAS,CAACE,cAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet, Pressable, } from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport { extractStyles } from \"../../utilities\";\nconst AccordionGroup = ({ label, expanded: expandedProp = false, openColor, closedColor, caretColor: caretColorProp, caretSize = 24, icon, iconSize = 24, style, children, theme, Icon, }) => {\n const [expanded, setExpanded] = React.useState(expandedProp);\n const { textStyles, viewStyles } = extractStyles(style);\n const expandedColor = openColor || theme.colors.primary;\n const collapsedColor = closedColor || theme.colors.primary;\n const labelColor = expanded ? expandedColor : collapsedColor;\n const caretColor = caretColorProp || labelColor;\n const handlePressAction = () => {\n setExpanded(!expanded);\n };\n return (React.createElement(React.Fragment, null,\n React.createElement(Pressable, { style: [styles.row, viewStyles], onPress: handlePressAction, accessibilityRole: \"button\" },\n icon ? (React.createElement(Icon, { name: icon, size: iconSize, color: labelColor, style: styles.icon })) : null,\n React.createElement(View, { style: styles.content },\n React.createElement(Text, { selectable: false, style: [\n textStyles,\n {\n color: labelColor,\n },\n ] }, label)),\n React.createElement(Icon, { name: expanded\n ? \"MaterialIcons/keyboard-arrow-up\"\n : \"MaterialIcons/keyboard-arrow-down\", color: caretColor, size: caretSize })),\n expanded ? children : null));\n};\nconst styles = StyleSheet.create({\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n icon: {\n marginRight: 8,\n },\n});\nexport default withTheme(AccordionGroup);\n"]}
|
|
@@ -102,6 +102,18 @@ export const SEED_DATA = {
|
|
|
102
102
|
label: "Loading BG Color",
|
|
103
103
|
description: "Color of the background to show while the map is loading"
|
|
104
104
|
}),
|
|
105
|
+
showUserLocation: createBoolProp({
|
|
106
|
+
label: "Show User Location",
|
|
107
|
+
description: "Whether to request and show the user's location on the map",
|
|
108
|
+
required: false,
|
|
109
|
+
defaultValue: null
|
|
110
|
+
}),
|
|
111
|
+
moveMapToUser: createBoolProp({
|
|
112
|
+
label: "Move Map to User",
|
|
113
|
+
description: "Whether to set the map region to the user's location. Overrides latitude and longitude.",
|
|
114
|
+
required: false,
|
|
115
|
+
defaultValue: null
|
|
116
|
+
}),
|
|
105
117
|
apiKey: createTextProp({
|
|
106
118
|
defaultValue: process.env.GOOGLE_MAPS_API_KEY,
|
|
107
119
|
editable: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MapView.ts"],"names":["COMPONENT_TYPES","createBoolProp","createColorProp","createNumberProp","createTextProp","GROUPS","FORM_TYPES","PROP_TYPES","SEED_DATA","name","tag","packageName","description","category","media","layout","flex","props","provider","formType","flatArray","propType","STRING","editable","group","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor","apiKey","process","env","GOOGLE_MAPS_API_KEY"],"mappings":"AAAA,SACEA,eADF,EAEEC,cAFF,EAGEC,eAHF,EAIEC,gBAJF,EAKEC,cALF,EAMEC,MANF,EAOEC,UAPF,EAQEC,UARF,QASO,iBATP;AAWA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,UADiB;AAEvBC,EAAAA,GAAG,EAAE,SAFkB;AAGvBC,EAAAA,WAAW,EAAE,gBAHU;AAIvBC,EAAAA,WAAW,EAAE,YAJU;AAKvBC,EAAAA,QAAQ,EAAEb,eAAe,CAACc,KALH;AAMvBC,EAAAA,MAAM,EAAE;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AM,CAACoB,KAHc;AAI5BE,MAAAA,QAAQ,EAAE,KAJkB;AAK5BC,MAAAA,YAAY,EAAE;AALc,KAAD,CAxExB;AA+ELa,IAAAA,aAAa,EAAExC,cAAc,CAAC;AAC5ByB,MAAAA,KAAK,EAAE,aADqB;AAE5Bd,MAAAA,WAAW,EAAE,yCAFe;AAG5BY,MAAAA,KAAK,EAAEnB,MAAM,CAACoB,KAHc;AAI5BE,MAAAA,QAAQ,EAAE,KAJkB;AAK5BC,MAAAA,YAAY,EAAE;AALc,KAAD,CA/ExB;AAsFLc,IAAAA,cAAc,EAAEzC,cAAc,CAAC;AAC7ByB,MAAAA,KAAK,EAAE,iBADsB;AAE7Bd,MAAAA,WAAW,EACT,gEAH2B;AAI7BY,MAAAA,KAAK,EAAEnB,MAAM,CAACoB,KAJe;AAK7BE,MAAAA,QAAQ,EAAE,KALmB;AAM7BC,MAAAA,YAAY,EAAE;AANe,KAAD,CAtFzB;AA8FLe,IAAAA,qBAAqB,EAAEzC,eAAe,CAAC;AACrCwB,MAAAA,KAAK,EAAE,yBAD8B;AAErCd,MAAAA,WAAW,EAAE;AAFwB,KAAD,CA9FjC;AAkGLgC,IAAAA,sBAAsB,EAAE1C,eAAe,CAAC;AACtCwB,MAAAA,KAAK,EAAE,kBAD+B;AAEtCd,MAAAA,WAAW,EAAE;AAFyB,KAAD,CAlGlC;AAsGLiC,IAAAA,MAAM,
|
|
1
|
+
{"version":3,"sources":["MapView.ts"],"names":["COMPONENT_TYPES","createBoolProp","createColorProp","createNumberProp","createTextProp","GROUPS","FORM_TYPES","PROP_TYPES","SEED_DATA","name","tag","packageName","description","category","media","layout","flex","props","provider","formType","flatArray","propType","STRING","editable","group","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor","showUserLocation","moveMapToUser","apiKey","process","env","GOOGLE_MAPS_API_KEY"],"mappings":"A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EAAE5C,cAAc,CAAC;AAC/ByB,MAAAA,KAAK,EAAE,oBADwB;AAE/Bd,MAAAA,WAAW,EAAE,4DAFkB;AAG/Be,MAAAA,QAAQ,EAAE,KAHqB;AAI/BC,MAAAA,YAAY,EAAE;AAJiB,KAAD,CAtG3B;AA4GLkB,IAAAA,aAAa,EAAE7C,cAAc,CAAC;AAC5ByB,MAAAA,KAAK,EAAE,kBADqB;AAE5Bd,MAAAA,WAAW,EACT,yFAH0B;AAI5Be,MAAAA,QAAQ,EAAE,KAJkB;AAK5BC,MAAAA,YAAY,EAAE;AALc,KAAD,CA5GxB;AAmHLmB,IAAAA,MAAM,EAAE3C,cAAc,CAAC;AACrBwB,MAAAA,YAAY,EAAEoB,OAAO,CAACC,GAAR,CAAYC,mBADL;AAErB3B,MAAAA,QAAQ,EAAE;AAFW,KAAD;AAnHjB;AATgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createColorProp,\n createNumberProp,\n createTextProp,\n GROUPS,\n FORM_TYPES,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Map View\",\n tag: \"MapView\",\n packageName: \"@draftbit/maps\",\n description: \"A map view\",\n category: COMPONENT_TYPES.media,\n layout: {\n flex: 1,\n },\n props: {\n provider: {\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n editable: true,\n group: GROUPS.basic,\n label: \"Provider\",\n description: \"The maps provider\",\n required: false,\n defaultValue: null,\n options: [\"google\"],\n },\n latitude: createNumberProp({\n label: \"Initial Latitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -90,\n max: 90,\n defaultValue: 37.40241,\n }),\n longitude: createNumberProp({\n label: \"Initial Longitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -180,\n max: 180,\n defaultValue: -122.12125,\n }),\n zoom: createNumberProp({\n label: \"Initial Zoom\",\n description: \"The initial zoom of the map\",\n required: true,\n precision: 0,\n step: 1,\n defaultValue: 8,\n min: 0,\n max: 22,\n group: GROUPS.basic,\n }),\n mapType: {\n label: \"Map Type\",\n description: \"The type of map to show\",\n group: GROUPS.basic,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n required: false,\n defaultValue: null,\n options: [\n \"standard\",\n \"satellite\",\n \"hybrid\",\n \"terrain\",\n \"none\",\n \"mutedStandard\",\n ],\n },\n zoomEnabled: createBoolProp({\n label: \"Zoom Enabled\",\n description: \"Whether zooming is enabled (native only)\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n showsCompass: createBoolProp({\n label: \"Shows Compass\",\n description: \"Whether compass is shown\",\n group: GROUPS.basic,\n required: false,\n defaultValue: false,\n }),\n rotateEnabled: createBoolProp({\n label: \"Rotate Enabled\",\n description: \"Whether rotating the map is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n scrollEnabled: createBoolProp({\n label: \"Pan Enabled\",\n description: \"Whether panning the map view is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingEnabled: createBoolProp({\n label: \"Loading Enabled\",\n description:\n \"If true a loading indicator will show while the map is loading\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingIndicatorColor: createColorProp({\n label: \"Loading Indicator Color\",\n description: \"Color of the loading indicator\",\n }),\n loadingBackgroundColor: createColorProp({\n label: \"Loading BG Color\",\n description: \"Color of the background to show while the map is loading\",\n }),\n showUserLocation: createBoolProp({\n label: \"Show User Location\",\n description: \"Whether to request and show the user's location on the map\",\n required: false,\n defaultValue: null,\n }),\n moveMapToUser: createBoolProp({\n label: \"Move Map to User\",\n description:\n \"Whether to set the map region to the user's location. Overrides latitude and longitude.\",\n required: false,\n defaultValue: null,\n }),\n apiKey: createTextProp({\n defaultValue: process.env.GOOGLE_MAPS_API_KEY,\n editable: false,\n }),\n },\n};\n"]}
|
|
@@ -132,6 +132,26 @@ export declare const SEED_DATA: {
|
|
|
132
132
|
formType: string;
|
|
133
133
|
propType: string;
|
|
134
134
|
};
|
|
135
|
+
showUserLocation: {
|
|
136
|
+
label: string;
|
|
137
|
+
description: string;
|
|
138
|
+
formType: string;
|
|
139
|
+
propType: string;
|
|
140
|
+
defaultValue: boolean;
|
|
141
|
+
editable: boolean;
|
|
142
|
+
required: boolean;
|
|
143
|
+
group: string;
|
|
144
|
+
};
|
|
145
|
+
moveMapToUser: {
|
|
146
|
+
label: string;
|
|
147
|
+
description: string;
|
|
148
|
+
formType: string;
|
|
149
|
+
propType: string;
|
|
150
|
+
defaultValue: boolean;
|
|
151
|
+
editable: boolean;
|
|
152
|
+
required: boolean;
|
|
153
|
+
group: string;
|
|
154
|
+
};
|
|
135
155
|
apiKey: any;
|
|
136
156
|
};
|
|
137
157
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.7.2-
|
|
3
|
+
"version": "43.7.2-87e505.0+87e505db",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^43.7.2-
|
|
44
|
+
"@draftbit/types": "^43.7.2-87e505.0+87e505db",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.1.7",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "87e505dbd3f697b6bbc09588a822c392b64155e4"
|
|
84
84
|
}
|
package/src/mappings/MapView.js
CHANGED
|
@@ -109,6 +109,18 @@ export const SEED_DATA = {
|
|
|
109
109
|
label: "Loading BG Color",
|
|
110
110
|
description: "Color of the background to show while the map is loading",
|
|
111
111
|
}),
|
|
112
|
+
showUserLocation: createBoolProp({
|
|
113
|
+
label: "Show User Location",
|
|
114
|
+
description: "Whether to request and show the user's location on the map",
|
|
115
|
+
required: false,
|
|
116
|
+
defaultValue: null,
|
|
117
|
+
}),
|
|
118
|
+
moveMapToUser: createBoolProp({
|
|
119
|
+
label: "Move Map to User",
|
|
120
|
+
description: "Whether to set the map region to the user's location. Overrides latitude and longitude.",
|
|
121
|
+
required: false,
|
|
122
|
+
defaultValue: null,
|
|
123
|
+
}),
|
|
112
124
|
apiKey: createTextProp({
|
|
113
125
|
defaultValue: process.env.GOOGLE_MAPS_API_KEY,
|
|
114
126
|
editable: false,
|
package/src/mappings/MapView.ts
CHANGED
|
@@ -120,6 +120,19 @@ export const SEED_DATA = {
|
|
|
120
120
|
label: "Loading BG Color",
|
|
121
121
|
description: "Color of the background to show while the map is loading",
|
|
122
122
|
}),
|
|
123
|
+
showUserLocation: createBoolProp({
|
|
124
|
+
label: "Show User Location",
|
|
125
|
+
description: "Whether to request and show the user's location on the map",
|
|
126
|
+
required: false,
|
|
127
|
+
defaultValue: null,
|
|
128
|
+
}),
|
|
129
|
+
moveMapToUser: createBoolProp({
|
|
130
|
+
label: "Move Map to User",
|
|
131
|
+
description:
|
|
132
|
+
"Whether to set the map region to the user's location. Overrides latitude and longitude.",
|
|
133
|
+
required: false,
|
|
134
|
+
defaultValue: null,
|
|
135
|
+
}),
|
|
123
136
|
apiKey: createTextProp({
|
|
124
137
|
defaultValue: process.env.GOOGLE_MAPS_API_KEY,
|
|
125
138
|
editable: false,
|