@draftbit/core 44.0.5 → 44.0.6-a68a67.1
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 +5 -21
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js +9 -1
- package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/MapView.js +2 -2
- package/lib/commonjs/mappings/MapView.js.map +1 -1
- package/lib/commonjs/mappings/Surface.js.map +1 -1
- package/lib/commonjs/styles/fonts.js.map +1 -1
- package/lib/module/components/Swiper/Swiper.js +9 -1
- package/lib/module/components/Swiper/Swiper.js.map +1 -1
- package/lib/module/mappings/MapView.js +2 -2
- package/lib/module/mappings/MapView.js.map +1 -1
- package/lib/typescript/src/components/Swiper/Swiper.d.ts +8 -2
- package/lib/typescript/src/mappings/MapView.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/Swiper/Swiper.js +6 -2
- package/src/components/Swiper/Swiper.tsx +15 -3
- package/src/mappings/MapView.js +2 -2
- package/src/mappings/MapView.ts +2 -2
|
@@ -21,6 +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
|
+
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
|
+
|
|
24
26
|
const AccordionItem = _ref => {
|
|
25
27
|
let {
|
|
26
28
|
Icon,
|
|
@@ -35,10 +37,9 @@ const AccordionItem = _ref => {
|
|
|
35
37
|
textStyles,
|
|
36
38
|
viewStyles
|
|
37
39
|
} = (0, _utilities.extractStyles)(style);
|
|
38
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
-
style: [styles.container, viewStyles]
|
|
40
|
-
|
|
41
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
40
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
41
|
+
style: [styles.container, viewStyles]
|
|
42
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
42
43
|
style: styles.row
|
|
43
44
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
44
45
|
name: icon,
|
|
@@ -73,22 +74,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
73
74
|
|
|
74
75
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
75
76
|
|
|
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
|
-
|
|
93
77
|
exports.default = _default;
|
|
94
78
|
//# sourceMappingURL=AccordionItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionItem.
|
|
1
|
+
{"version":3,"sources":["AccordionItem.tsx"],"names":["AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","styles","container","row","colors","primary","item","content","StyleSheet","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AAEA;;AACA;;;;;;;;;;AAWA,MAAMA,aAAa,GAAG,QAQT;AAAA,MARU;AACrBC,IAAAA,IADqB;AAErBC,IAAAA,IAFqB;AAGrBC,IAAAA,KAHqB;AAIrBC,IAAAA,KAJqB;AAKrBC,IAAAA,SALqB;AAMrBC,IAAAA,KANqB;AAOrB,OAAGC;AAPkB,GAQV;AACX,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6B,8BAAcL,KAAd,CAAnC;AACA,sBACE,oBAAC,sBAAD;AAAW,IAAA,KAAK,EAAE,CAACM,MAAM,CAACC,SAAR,EAAmBF,UAAnB;AAAlB,KAAsDF,IAAtD,gBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEG,MAAM,CAACE;AAApB,KACGV,IAAI,gBACH,oBAAC,IAAD;AACE,IAAA,IAAI,EAAEA,IADR;AAEE,IAAA,IAAI,EAAE,EAFR;AAGE,IAAA,KAAK,EAAEG,SAAS,IAAIC,KAAK,CAACO,MAAN,CAAaC;AAHnC,IADG,GAMD,IAPN,eAQE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACJ,MAAM,CAACK,IAAR,EAAcL,MAAM,CAACM,OAArB;AAAb,kBACE,oBAAC,aAAD;AAAM,IAAA,UAAU,EAAE,KAAlB;AAAyB,IAAA,KAAK,EAAER;AAAhC,KACGL,KADH,CADF,CARF,CADF,CADF;AAkBD,CA5BD;;AA8BA,MAAMO,MAAM,GAAGO,wBAAWC,MAAX,CAAkB;AAC/BP,EAAAA,SAAS,EAAE;AACTQ,IAAAA,OAAO,EAAE;AADA,GADoB;AAI/BP,EAAAA,GAAG,EAAE;AACHQ,IAAAA,aAAa,EAAE,KADZ;AAEHC,IAAAA,UAAU,EAAE,QAFT;AAGHC,IAAAA,WAAW,EAAE;AAHV,GAJ0B;AAS/BP,EAAAA,IAAI,EAAE;AACJQ,IAAAA,cAAc,EAAE,CADZ;AAEJD,IAAAA,WAAW,EAAE;AAFT,GATyB;AAa/BN,EAAAA,OAAO,EAAE;AACPQ,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT;AAbsB,CAAlB,CAAf;;eAmBe,wBAAUzB,aAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n Pressable,\n StyleSheet,\n View,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport Text from \"../Text\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n icon?: string;\n label: string;\n iconColor?: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AccordionItem = ({\n Icon,\n icon,\n label,\n style,\n iconColor,\n theme,\n ...rest\n}: Props) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (\n <Pressable style={[styles.container, viewStyles]} {...rest}>\n <View style={styles.row}>\n {icon ? (\n <Icon\n name={icon}\n size={24}\n color={iconColor || theme.colors.primary}\n />\n ) : null}\n <View style={[styles.item, styles.content]}>\n <Text selectable={false} style={textStyles}>\n {label}\n </Text>\n </View>\n </View>\n </Pressable>\n );\n};\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});\n\nexport default withTheme(AccordionItem);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ActionSheetItem.
|
|
1
|
+
{"version":3,"sources":["ActionSheetItem.js"],"names":["ActionSheetItem","label","style","color","onPress","textStyles","viewStyles","React","createElement","TouchableOpacity","activeOpacity","styles","wrapper","Text","StyleSheet","create","borderBottomWidth","hairlineWidth","borderBottomColor","backgroundColor","minHeight","overflow","display","justifyContent","fontSize","textAlign","fontWeight","paddingHorizontal","paddingVertical","alignSelf"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AACA,MAAMA,eAAe,GAAG,QAAsC;AAAA,MAArC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,KAAhB;AAAuBC,IAAAA;AAAvB,GAAqC;AAC1D,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6B,8BAAcJ,KAAd,CAAnC;AACA,sBAAQK,eAAMC,aAAN,CAAoBC,6BAApB,EAAsC;AAAEC,IAAAA,aAAa,EAAE,GAAjB;AAAsBR,IAAAA,KAAK,EAAE,CAACS,MAAM,CAACC,OAAR,EAAiBN,UAAjB,CAA7B;AAA2DF,IAAAA,OAAO,EAAEA;AAApE,GAAtC,eACJG,eAAMC,aAAN,CAAoBK,iBAApB,EAA0B;AAAEX,IAAAA,KAAK,EAAE,CAACS,MAAM,CAACV,KAAR,EAAeI,UAAf,EAA2B;AAAEF,MAAAA;AAAF,KAA3B;AAAT,GAA1B,EAA4EF,KAA5E,CADI,CAAR;AAEH,CAJD;;AAKA,MAAMU,MAAM,GAAGG,wBAAWC,MAAX,CAAkB;AAC7BH,EAAAA,OAAO,EAAE;AACLI,IAAAA,iBAAiB,EAAEF,wBAAWG,aADzB;AAELC,IAAAA,iBAAiB,EAAE,SAFd;AAGLC,IAAAA,eAAe,EAAE,SAHZ;AAILC,IAAAA,SAAS,EAAE,EAJN;AAKLC,IAAAA,QAAQ,EAAE,QALL;AAMLC,IAAAA,OAAO,EAAE,MANJ;AAOLC,IAAAA,cAAc,EAAE;AAPX,GADoB;AAU7BtB,EAAAA,KAAK,EAAE;AACHuB,IAAAA,QAAQ,EAAE,EADP;AAEHC,IAAAA,SAAS,EAAE,QAFR;AAGHtB,IAAAA,KAAK,EAAE,SAHJ;AAIHuB,IAAAA,UAAU,EAAE,KAJT;AAKHL,IAAAA,QAAQ,EAAE,QALP;AAMHM,IAAAA,iBAAiB,EAAE,EANhB;AAOHC,IAAAA,eAAe,EAAE,EAPd;AAQHC,IAAAA,SAAS,EAAE;AARR;AAVsB,CAAlB,CAAf;;eAqBe7B,e","sourcesContent":["import React from \"react\";\nimport { Text, StyleSheet, TouchableOpacity, } from \"react-native\";\nimport { extractStyles } from \"../../utilities\";\nconst ActionSheetItem = ({ label, style, color, onPress }) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (React.createElement(TouchableOpacity, { activeOpacity: 0.7, style: [styles.wrapper, viewStyles], onPress: onPress },\n React.createElement(Text, { style: [styles.label, textStyles, { color }] }, label)));\n};\nconst styles = StyleSheet.create({\n wrapper: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderBottomColor: \"#CCCCCC\",\n backgroundColor: \"#F1F1F1\",\n minHeight: 50,\n overflow: \"hidden\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n label: {\n fontSize: 16,\n textAlign: \"center\",\n color: \"#0A84FF\",\n fontWeight: \"500\",\n overflow: \"hidden\",\n paddingHorizontal: 20,\n paddingVertical: 10,\n alignSelf: \"center\",\n },\n});\nexport default ActionSheetItem;\n"]}
|
|
@@ -26,6 +26,9 @@ const Swiper = _ref => {
|
|
|
26
26
|
dotsTouchable = true,
|
|
27
27
|
dotColor,
|
|
28
28
|
dotActiveColor,
|
|
29
|
+
data,
|
|
30
|
+
keyExtractor,
|
|
31
|
+
renderItem,
|
|
29
32
|
children,
|
|
30
33
|
style
|
|
31
34
|
} = _ref;
|
|
@@ -59,7 +62,12 @@ const Swiper = _ref => {
|
|
|
59
62
|
}
|
|
60
63
|
} : {})
|
|
61
64
|
}
|
|
62
|
-
},
|
|
65
|
+
}, data && renderItem ? data.map((item, index) => /*#__PURE__*/_react.default.cloneElement(renderItem({
|
|
66
|
+
item,
|
|
67
|
+
index
|
|
68
|
+
}), {
|
|
69
|
+
key: keyExtractor ? keyExtractor(item, index) : index
|
|
70
|
+
})) : children));
|
|
63
71
|
};
|
|
64
72
|
|
|
65
73
|
var _default = Swiper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Swiper.tsx"],"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;
|
|
1
|
+
{"version":3,"sources":["Swiper.tsx"],"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","data","keyExtractor","renderItem","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle","map","item","index","React","cloneElement","key"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAqBA,MAAMA,MAAM,GAAG;AAAA,MAAC;AACdC,IAAAA,QAAQ,GAAG,KADG;AAEdC,IAAAA,IAAI,GAAG,KAFO;AAGdC,IAAAA,OAAO,GAAG,CAHI;AAIdC,IAAAA,IAAI,GAAG,CAJO;AAKdC,IAAAA,SAAS,GAAG,EALE;AAMdC,IAAAA,SAAS,GAAG,EANE;AAOdC,IAAAA,cAPc;AAQdC,IAAAA,cARc;AASdC,IAAAA,aAAa,GAAG,IATF;AAUdC,IAAAA,QAVc;AAWdC,IAAAA,cAXc;AAYdC,IAAAA,IAZc;AAadC,IAAAA,YAbc;AAcdC,IAAAA,UAdc;AAedC,IAAAA,QAfc;AAgBdC,IAAAA;AAhBc,GAAD;AAAA,sBAkBb,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAEA;AAAb,kBACE,6BAAC,6BAAD;AACE,IAAA,IAAI,EAAEZ,IADR;AAEE,IAAA,IAAI,EAAEF,IAFR;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,QAAQ,EAAEF,QAJZ;AAKE,IAAA,aAAa,EAAE;AACbI,MAAAA,SADa;AAEbC,MAAAA,SAFa;AAGbW,MAAAA,cAAc,EAAE;AAAEC,QAAAA,KAAK,EAAEX;AAAT,OAHH;AAIbY,MAAAA,cAAc,EAAE;AAAED,QAAAA,KAAK,EAAEV;AAAT,OAJH;AAKbC,MAAAA,aALa;AAMb,UAAIC,QAAQ,GACR;AAAEU,QAAAA,QAAQ,EAAE;AAAEC,UAAAA,UAAU,EAAE;AAAEC,YAAAA,eAAe,EAAEZ;AAAnB;AAAd;AAAZ,OADQ,GAER,EAFJ,CANa;AASb,UAAIC,cAAc,GACd;AAAEY,QAAAA,cAAc,EAAE;AAAED,UAAAA,eAAe,EAAEX;AAAnB;AAAlB,OADc,GAEd,EAFJ;AATa;AALjB,KAmBGC,IAAI,IAAIE,UAAR,GACGF,IAAI,CAACY,GAAL,CAAS,CAACC,IAAD,EAAOC,KAAP,kBACPC,eAAMC,YAAN,CAAmBd,UAAU,CAAC;AAAEW,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAAD,CAA7B,EAAgD;AAC9CG,IAAAA,GAAG,EAAEhB,YAAY,GAAGA,YAAY,CAACY,IAAD,EAAOC,KAAP,CAAf,GAA+BA;AADF,GAAhD,CADF,CADH,GAMGX,QAzBN,CADF,CAlBa;AAAA,CAAf;;eAiDef,M","sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport SwiperComponent from \"react-native-web-swiper\";\n\nexport interface SwiperProps<T> {\n vertical?: boolean;\n loop?: boolean;\n from?: number;\n timeout?: number;\n prevTitle?: string;\n nextTitle?: string;\n prevTitleColor?: string;\n nextTitleColor?: string;\n dotsTouchable?: boolean;\n dotColor?: string;\n dotActiveColor?: string;\n children: React.ReactNode;\n data?: Array<T>;\n keyExtractor: (item: T, index: number) => string;\n renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Swiper = ({\n vertical = false,\n loop = false,\n timeout = 0,\n from = 0,\n prevTitle = \"\",\n nextTitle = \"\",\n prevTitleColor,\n nextTitleColor,\n dotsTouchable = true,\n dotColor,\n dotActiveColor,\n data,\n keyExtractor,\n renderItem,\n children,\n style,\n}: SwiperProps<any>) => (\n <View style={style}>\n <SwiperComponent\n from={from}\n loop={loop}\n timeout={timeout}\n vertical={vertical}\n controlsProps={{\n prevTitle,\n nextTitle,\n prevTitleStyle: { color: prevTitleColor },\n nextTitleStyle: { color: nextTitleColor },\n dotsTouchable,\n ...(dotColor\n ? { dotProps: { badgeStyle: { backgroundColor: dotColor } } }\n : {}),\n ...(dotActiveColor\n ? { dotActiveStyle: { backgroundColor: dotActiveColor } }\n : {}),\n }}\n >\n {data && renderItem\n ? data.map((item, index) =>\n React.cloneElement(renderItem({ item, index }), {\n key: keyExtractor ? keyExtractor(item, index) : index,\n })\n )\n : children}\n </SwiperComponent>\n </View>\n);\n\nexport default Swiper;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\nexport { Link } from \"./components/Text\";\nexport { default as Banner } from \"./components/Banner\";\nexport { ButtonSolid, ButtonOutline } from \"./components/Button\";\nexport { default as Avatar } from \"./components/CircleImage\";\nexport { default as AvatarEdit } from \"./components/AvatarEdit\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Carousel } from \"./components/Carousel\";\nexport { Checkbox, CheckboxGroup, CheckboxRow } from \"./components/Checkbox\";\nexport { default as CircleImage } from \"./components/CircleImage\";\nexport { default as Container } from \"./components/Container\";\nexport { default as Divider } from \"./components/Divider\";\nexport { default as FAB } from \"./components/FAB\";\nexport { default as FieldSearchBarFull } from \"./components/FieldSearchBarFull\";\nexport { default as IconButton } from \"./components/IconButton\";\nexport { default as Image } from \"./components/Image\";\nexport { default as NumberInput } from \"./components/NumberInput\";\nexport { default as ScreenContainer } from \"./components/ScreenContainer\";\nexport { default as StarRating } from \"./components/StarRating\";\nexport { default as Surface } from \"./components/Surface\";\nexport { default as Switch, SwitchRow } from \"./components/Switch\";\nexport { default as TextField } from \"./components/TextField\";\nexport { default as ToggleButton } from \"./components/ToggleButton\";\nexport { default as Touchable } from \"./components/Touchable\";\nexport { AccordionGroup, AccordionItem } from \"./components/Accordion\";\nexport { ActionSheet, ActionSheetItem, ActionSheetCancel, } from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\nexport { Center, Circle, Square, Row, Stack, Spacer, } from \"./components/Layout\";\nexport { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from \"./components/RadioButton/index\";\n/* Deprecated: Fix or Delete! */\nexport { default as Button } from \"./components/DeprecatedButton\";\nexport { default as CardBlock } from \"./components/CardBlock\";\nexport { default as CardContainer } from \"./components/CardContainer\";\nexport { default as CardContainerRating } from \"./components/CardContainerRating\";\nexport { default as CardInline } from \"./components/CardInline\";\nexport { default as DatePicker } from \"./components/DatePicker/DatePicker\";\nexport { default as HeaderLarge } from \"./components/HeaderLarge\";\nexport { default as HeaderMedium } from \"./components/HeaderMedium\";\nexport { default as HeaderOverline } from \"./components/HeaderOverline\";\nexport { default as Picker } from \"./components/Picker/Picker\";\nexport { default as ProgressBar } from \"./components/ProgressBar\";\nexport { default as ProgressCircle } from \"./components/ProgressCircle\";\nexport { default as RowBodyIcon } from \"./components/RowBodyIcon\";\nexport { default as RowHeadlineImageCaption } from \"./components/RowHeadlineImageCaption\";\nexport { default as RowHeadlineImageIcon } from \"./components/RowHeadlineImageIcon\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as Stepper } from \"./components/Stepper\";\nexport { useAuthState } from \"./components/useAuthState\";\n// a comment to fix sourcemap comment issue\n"]}
|
|
@@ -124,8 +124,8 @@ const SEED_DATA = {
|
|
|
124
124
|
defaultValue: null,
|
|
125
125
|
group: _types.GROUPS.basic
|
|
126
126
|
}),
|
|
127
|
-
|
|
128
|
-
label: "
|
|
127
|
+
showsPointsOfInterest: (0, _types.createBoolProp)({
|
|
128
|
+
label: "Shows Points of Interest",
|
|
129
129
|
description: "Whether to show points of interest on the map.",
|
|
130
130
|
required: false,
|
|
131
131
|
defaultValue: true,
|
|
@@ -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","loadingBackgroundColor","showsUserLocation","followsUserLocation","
|
|
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","showsUserLocation","followsUserLocation","showsPointsOfInterest","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,KAA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AACrBpB,MAAAA,YAAY,EAAEqB,OAAO,CAACC,GAAR,CAAYC,mBADL;AAErB7B,MAAAA,QAAQ,EAAE;AAFW,KAAf;AA5HH;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 showsUserLocation: createBoolProp({\n label: \"Shows User Location\",\n description: \"Whether to show the user's location on the map\",\n required: false,\n defaultValue: null,\n group: GROUPS.basic,\n }),\n followsUserLocation: createBoolProp({\n label: \"Follows User Location (iOS only)\",\n description:\n \"Whether to set the map region to follow the user's location\",\n required: false,\n defaultValue: null,\n group: GROUPS.basic,\n }),\n showsPointsOfInterest: createBoolProp({\n label: \"Shows Points of Interest\",\n description: \"Whether to show points of interest on the map.\",\n required: false,\n defaultValue: true,\n group: GROUPS.basic,\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":["Surface.
|
|
1
|
+
{"version":3,"sources":["Surface.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","minHeight","props","elevation"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,SADe;AAErBC,EAAAA,GAAG,EAAE,SAFgB;AAGrBC,EAAAA,WAAW,EAAE,uBAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJL;AAKrBA,EAAAA,MAAM,EAAE;AACJC,IAAAA,SAAS,EAAE;AADP,GALa;AAQrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,SAAS,EAAE,gCAAoB,CAApB;AADR;AARc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createElevationType } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Surface\",\n tag: \"Surface\",\n description: \"An elevated container\",\n category: COMPONENT_TYPES.layout,\n layout: {\n minHeight: 40,\n },\n props: {\n elevation: createElevationType(0),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["fonts.
|
|
1
|
+
{"version":3,"sources":["fonts.js"],"names":["fontConfig","web","regular","fontFamily","fontWeight","medium","light","thin","ios","default","configureFonts","config","fonts","Platform","select"],"mappings":";;;;;;;AACA;;AADA;AAEA,MAAMA,UAAU,GAAG;AACfC,EAAAA,GAAG,EAAE;AACDC,IAAAA,OAAO,EAAE;AACLC,MAAAA,UAAU,EAAE,wDADP;AAELC,MAAAA,UAAU,EAAE;AAFP,KADR;AAKDC,IAAAA,MAAM,EAAE;AACJF,MAAAA,UAAU,EAAE,wDADR;AAEJC,MAAAA,UAAU,EAAE;AAFR,KALP;AASDE,IAAAA,KAAK,EAAE;AACHH,MAAAA,UAAU,EAAE,wDADT;AAEHC,MAAAA,UAAU,EAAE;AAFT,KATN;AAaDG,IAAAA,IAAI,EAAE;AACFJ,MAAAA,UAAU,EAAE,wDADV;AAEFC,MAAAA,UAAU,EAAE;AAFV;AAbL,GADU;AAmBfI,EAAAA,GAAG,EAAE;AACDN,IAAAA,OAAO,EAAE;AACLC,MAAAA,UAAU,EAAE,QADP;AAELC,MAAAA,UAAU,EAAE;AAFP,KADR;AAKDC,IAAAA,MAAM,EAAE;AACJF,MAAAA,UAAU,EAAE,QADR;AAEJC,MAAAA,UAAU,EAAE;AAFR,KALP;AASDE,IAAAA,KAAK,EAAE;AACHH,MAAAA,UAAU,EAAE,QADT;AAEHC,MAAAA,UAAU,EAAE;AAFT,KATN;AAaDG,IAAAA,IAAI,EAAE;AACFJ,MAAAA,UAAU,EAAE,QADV;AAEFC,MAAAA,UAAU,EAAE;AAFV;AAbL,GAnBU;AAqCfK,EAAAA,OAAO,EAAE;AACLP,IAAAA,OAAO,EAAE;AACLC,MAAAA,UAAU,EAAE,YADP;AAELC,MAAAA,UAAU,EAAE;AAFP,KADJ;AAKLC,IAAAA,MAAM,EAAE;AACJF,MAAAA,UAAU,EAAE,mBADR;AAEJC,MAAAA,UAAU,EAAE;AAFR,KALH;AASLE,IAAAA,KAAK,EAAE;AACHH,MAAAA,UAAU,EAAE,kBADT;AAEHC,MAAAA,UAAU,EAAE;AAFT,KATF;AAaLG,IAAAA,IAAI,EAAE;AACFJ,MAAAA,UAAU,EAAE,iBADV;AAEFC,MAAAA,UAAU,EAAE;AAFV;AAbD;AArCM,CAAnB;;AAwDe,SAASM,cAAT,CAAwBC,MAAxB,EAAgC;AAC3C,QAAMC,KAAK,GAAGC,sBAASC,MAAT,CAAgB,EAAE,GAAGd,UAAL;AAAiB,OAAGW;AAApB,GAAhB,CAAd;;AACA,SAAOC,KAAP;AACH","sourcesContent":["/* https://github.com/callstack/react-native-paper/blob/main/src/styles/fonts.tsx */\nimport { Platform } from \"react-native\";\nconst fontConfig = {\n web: {\n regular: {\n fontFamily: 'Roboto, \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n fontWeight: \"400\",\n },\n medium: {\n fontFamily: 'Roboto, \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n fontWeight: \"500\",\n },\n light: {\n fontFamily: 'Roboto, \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n fontWeight: \"300\",\n },\n thin: {\n fontFamily: 'Roboto, \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n fontWeight: \"100\",\n },\n },\n ios: {\n regular: {\n fontFamily: \"System\",\n fontWeight: \"400\",\n },\n medium: {\n fontFamily: \"System\",\n fontWeight: \"500\",\n },\n light: {\n fontFamily: \"System\",\n fontWeight: \"300\",\n },\n thin: {\n fontFamily: \"System\",\n fontWeight: \"100\",\n },\n },\n default: {\n regular: {\n fontFamily: \"sans-serif\",\n fontWeight: \"normal\",\n },\n medium: {\n fontFamily: \"sans-serif-medium\",\n fontWeight: \"normal\",\n },\n light: {\n fontFamily: \"sans-serif-light\",\n fontWeight: \"normal\",\n },\n thin: {\n fontFamily: \"sans-serif-thin\",\n fontWeight: \"normal\",\n },\n },\n};\nexport default function configureFonts(config) {\n const fonts = Platform.select({ ...fontConfig, ...config });\n return fonts;\n}\n"]}
|
|
@@ -15,6 +15,9 @@ const Swiper = _ref => {
|
|
|
15
15
|
dotsTouchable = true,
|
|
16
16
|
dotColor,
|
|
17
17
|
dotActiveColor,
|
|
18
|
+
data,
|
|
19
|
+
keyExtractor,
|
|
20
|
+
renderItem,
|
|
18
21
|
children,
|
|
19
22
|
style
|
|
20
23
|
} = _ref;
|
|
@@ -48,7 +51,12 @@ const Swiper = _ref => {
|
|
|
48
51
|
}
|
|
49
52
|
} : {})
|
|
50
53
|
}
|
|
51
|
-
},
|
|
54
|
+
}, data && renderItem ? data.map((item, index) => /*#__PURE__*/React.cloneElement(renderItem({
|
|
55
|
+
item,
|
|
56
|
+
index
|
|
57
|
+
}), {
|
|
58
|
+
key: keyExtractor ? keyExtractor(item, index) : index
|
|
59
|
+
})) : children));
|
|
52
60
|
};
|
|
53
61
|
|
|
54
62
|
export default Swiper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Swiper.tsx"],"names":["React","View","SwiperComponent","Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAA2C,cAA3C;AACA,OAAOC,eAAP,MAA4B,yBAA5B;;
|
|
1
|
+
{"version":3,"sources":["Swiper.tsx"],"names":["React","View","SwiperComponent","Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","data","keyExtractor","renderItem","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle","map","item","index","cloneElement","key"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAA2C,cAA3C;AACA,OAAOC,eAAP,MAA4B,yBAA5B;;AAqBA,MAAMC,MAAM,GAAG;AAAA,MAAC;AACdC,IAAAA,QAAQ,GAAG,KADG;AAEdC,IAAAA,IAAI,GAAG,KAFO;AAGdC,IAAAA,OAAO,GAAG,CAHI;AAIdC,IAAAA,IAAI,GAAG,CAJO;AAKdC,IAAAA,SAAS,GAAG,EALE;AAMdC,IAAAA,SAAS,GAAG,EANE;AAOdC,IAAAA,cAPc;AAQdC,IAAAA,cARc;AASdC,IAAAA,aAAa,GAAG,IATF;AAUdC,IAAAA,QAVc;AAWdC,IAAAA,cAXc;AAYdC,IAAAA,IAZc;AAadC,IAAAA,YAbc;AAcdC,IAAAA,UAdc;AAedC,IAAAA,QAfc;AAgBdC,IAAAA;AAhBc,GAAD;AAAA,sBAkBb,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEA;AAAb,kBACE,oBAAC,eAAD;AACE,IAAA,IAAI,EAAEZ,IADR;AAEE,IAAA,IAAI,EAAEF,IAFR;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,QAAQ,EAAEF,QAJZ;AAKE,IAAA,aAAa,EAAE;AACbI,MAAAA,SADa;AAEbC,MAAAA,SAFa;AAGbW,MAAAA,cAAc,EAAE;AAAEC,QAAAA,KAAK,EAAEX;AAAT,OAHH;AAIbY,MAAAA,cAAc,EAAE;AAAED,QAAAA,KAAK,EAAEV;AAAT,OAJH;AAKbC,MAAAA,aALa;AAMb,UAAIC,QAAQ,GACR;AAAEU,QAAAA,QAAQ,EAAE;AAAEC,UAAAA,UAAU,EAAE;AAAEC,YAAAA,eAAe,EAAEZ;AAAnB;AAAd;AAAZ,OADQ,GAER,EAFJ,CANa;AASb,UAAIC,cAAc,GACd;AAAEY,QAAAA,cAAc,EAAE;AAAED,UAAAA,eAAe,EAAEX;AAAnB;AAAlB,OADc,GAEd,EAFJ;AATa;AALjB,KAmBGC,IAAI,IAAIE,UAAR,GACGF,IAAI,CAACY,GAAL,CAAS,CAACC,IAAD,EAAOC,KAAP,kBACP7B,KAAK,CAAC8B,YAAN,CAAmBb,UAAU,CAAC;AAAEW,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAAD,CAA7B,EAAgD;AAC9CE,IAAAA,GAAG,EAAEf,YAAY,GAAGA,YAAY,CAACY,IAAD,EAAOC,KAAP,CAAf,GAA+BA;AADF,GAAhD,CADF,CADH,GAMGX,QAzBN,CADF,CAlBa;AAAA,CAAf;;AAiDA,eAAef,MAAf","sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport SwiperComponent from \"react-native-web-swiper\";\n\nexport interface SwiperProps<T> {\n vertical?: boolean;\n loop?: boolean;\n from?: number;\n timeout?: number;\n prevTitle?: string;\n nextTitle?: string;\n prevTitleColor?: string;\n nextTitleColor?: string;\n dotsTouchable?: boolean;\n dotColor?: string;\n dotActiveColor?: string;\n children: React.ReactNode;\n data?: Array<T>;\n keyExtractor: (item: T, index: number) => string;\n renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Swiper = ({\n vertical = false,\n loop = false,\n timeout = 0,\n from = 0,\n prevTitle = \"\",\n nextTitle = \"\",\n prevTitleColor,\n nextTitleColor,\n dotsTouchable = true,\n dotColor,\n dotActiveColor,\n data,\n keyExtractor,\n renderItem,\n children,\n style,\n}: SwiperProps<any>) => (\n <View style={style}>\n <SwiperComponent\n from={from}\n loop={loop}\n timeout={timeout}\n vertical={vertical}\n controlsProps={{\n prevTitle,\n nextTitle,\n prevTitleStyle: { color: prevTitleColor },\n nextTitleStyle: { color: nextTitleColor },\n dotsTouchable,\n ...(dotColor\n ? { dotProps: { badgeStyle: { backgroundColor: dotColor } } }\n : {}),\n ...(dotActiveColor\n ? { dotActiveStyle: { backgroundColor: dotActiveColor } }\n : {}),\n }}\n >\n {data && renderItem\n ? data.map((item, index) =>\n React.cloneElement(renderItem({ item, index }), {\n key: keyExtractor ? keyExtractor(item, index) : index,\n })\n )\n : children}\n </SwiperComponent>\n </View>\n);\n\nexport default Swiper;\n"]}
|
|
@@ -116,8 +116,8 @@ export const SEED_DATA = {
|
|
|
116
116
|
defaultValue: null,
|
|
117
117
|
group: GROUPS.basic
|
|
118
118
|
}),
|
|
119
|
-
|
|
120
|
-
label: "
|
|
119
|
+
showsPointsOfInterest: createBoolProp({
|
|
120
|
+
label: "Shows Points of Interest",
|
|
121
121
|
description: "Whether to show points of interest on the map.",
|
|
122
122
|
required: false,
|
|
123
123
|
defaultValue: true,
|
|
@@ -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","showsUserLocation","followsUserLocation","
|
|
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","showsUserLocation","followsUserLocation","showsPointsOfInterest","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;AACNC,IAAAA,IAAI,EAAE;AADA,GANe;AASvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,QAAQ,EAAEb,UAAU,CAACc,SADb;AAERC,MAAAA,QAAQ,EAAEd,UAAU,CAACe,MAFb;AAGRC,MAAAA,QAAQ,EAAE,IAHF;AAIRC,MAAAA,KAAK,EAAEnB,MAAM,CAACoB,KAJN;AAKRC,MAAAA,KAAK,EAAE,UALC;AAMRd,MAAAA,WAAW,EAAE,mBANL;AAORe,MAAAA,QAAQ,EAAE,KAPF;AAQRC,MAAAA,YAAY,EAAE,IARN;AASRC,MAAAA,OAAO,EAAE,CAAC,QAAD;AATD,KADL;AAYLC,IAAAA,QAAQ,EAAE3B,gBAAgB,CAAC;AACzBuB,MAAAA,KAAK,EAAE,kBADkB;AAEzBd,MAAAA,WAAW,EAAE,4CAFY;AAGzBe,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,KAAD,CAZrB;AAqBLM,IAAA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eAAe,CAAC;AACtCwB,MAAAA,KAAK,EAAE,kBAD+B;AAEtCd,MAAAA,WAAW,EAAE;AAFyB,KAAD,CAlGlC;AAsGLiC,IAAAA,iBAAiB,EAAE5C,cAAc,CAAC;AAChCyB,MAAAA,KAAK,EAAE,qBADyB;AAEhCd,MAAAA,WAAW,EAAE,gDAFmB;AAGhCe,MAAAA,QAAQ,EAAE,KAHsB;AAIhCC,MAAAA,YAAY,EAAE,IAJkB;AAKhCJ,MAAAA,KAAK,EAAEnB,MAAM,CAACoB;AALkB,KAAD,CAtG5B;AA6GLqB,IAAAA,mBAAmB,EAAE7C,cAAc,CAAC;AAClCyB,MAAAA,KAAK,EAAE,kCAD2B;AAElCd,MAAAA,WAAW,EACT,6DAHgC;AAIlCe,MAAAA,QAAQ,EAAE,KAJwB;AAKlCC,MAAAA,YAAY,EAAE,IALoB;AAMlCJ,MAAAA,KAAK,EAAEnB,MAAM,CAACoB;AANoB,KAAD,CA7G9B;AAqHLsB,IAAAA,qBAAqB,EAAE9C,cAAc,CAAC;AACpCyB,MAAAA,KAAK,EAAE,0BAD6B;AAEpCd,MAAAA,WAAW,EAAE,gDAFuB;AAGpCe,MAAAA,QAAQ,EAAE,KAH0B;AAIpCC,MAAAA,YAAY,EAAE,IAJsB;AAKpCJ,MAAAA,KAAK,EAAEnB,MAAM,CAACoB;AALsB,KAAD,CArHhC;AA4HLuB,IAAAA,MAAM,EAAE5C,cAAc,CAAC;AACrBwB,MAAAA,YAAY,EAAEqB,OAAO,CAACC,GAAR,CAAYC,mBADL;AAErB5B,MAAAA,QAAQ,EAAE;AAFW,KAAD;AA5HjB;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 showsUserLocation: createBoolProp({\n label: \"Shows User Location\",\n description: \"Whether to show the user's location on the map\",\n required: false,\n defaultValue: null,\n group: GROUPS.basic,\n }),\n followsUserLocation: createBoolProp({\n label: \"Follows User Location (iOS only)\",\n description:\n \"Whether to set the map region to follow the user's location\",\n required: false,\n defaultValue: null,\n group: GROUPS.basic,\n }),\n showsPointsOfInterest: createBoolProp({\n label: \"Shows Points of Interest\",\n description: \"Whether to show points of interest on the map.\",\n required: false,\n defaultValue: true,\n group: GROUPS.basic,\n }),\n apiKey: createTextProp({\n defaultValue: process.env.GOOGLE_MAPS_API_KEY,\n editable: false,\n }),\n },\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
export interface SwiperProps {
|
|
3
|
+
export interface SwiperProps<T> {
|
|
4
4
|
vertical?: boolean;
|
|
5
5
|
loop?: boolean;
|
|
6
6
|
from?: number;
|
|
@@ -13,7 +13,13 @@ export interface SwiperProps {
|
|
|
13
13
|
dotColor?: string;
|
|
14
14
|
dotActiveColor?: string;
|
|
15
15
|
children: React.ReactNode;
|
|
16
|
+
data?: Array<T>;
|
|
17
|
+
keyExtractor: (item: T, index: number) => string;
|
|
18
|
+
renderItem?: ({ item, index }: {
|
|
19
|
+
item: T;
|
|
20
|
+
index: number;
|
|
21
|
+
}) => JSX.Element;
|
|
16
22
|
style?: StyleProp<ViewStyle>;
|
|
17
23
|
}
|
|
18
|
-
declare const Swiper: ({ vertical, loop, timeout, from, prevTitle, nextTitle, prevTitleColor, nextTitleColor, dotsTouchable, dotColor, dotActiveColor, children, style, }: SwiperProps) => JSX.Element;
|
|
24
|
+
declare const Swiper: ({ vertical, loop, timeout, from, prevTitle, nextTitle, prevTitleColor, nextTitleColor, dotsTouchable, dotColor, dotActiveColor, data, keyExtractor, renderItem, children, style, }: SwiperProps<any>) => JSX.Element;
|
|
19
25
|
export default Swiper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "44.0.
|
|
3
|
+
"version": "44.0.6-a68a67.1+a68a6764",
|
|
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": "^44.0.
|
|
44
|
+
"@draftbit/types": "^44.0.6-a68a67.1+a68a6764",
|
|
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": "a68a6764e0f8190703f3eca72e0842afb4c203d6"
|
|
84
84
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import SwiperComponent from "react-native-web-swiper";
|
|
4
|
-
const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor, dotActiveColor, children, style, }) => (React.createElement(View, { style: style },
|
|
4
|
+
const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor, dotActiveColor, data, keyExtractor, renderItem, children, style, }) => (React.createElement(View, { style: style },
|
|
5
5
|
React.createElement(SwiperComponent, { from: from, loop: loop, timeout: timeout, vertical: vertical, controlsProps: {
|
|
6
6
|
prevTitle,
|
|
7
7
|
nextTitle,
|
|
@@ -14,5 +14,9 @@ const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTit
|
|
|
14
14
|
...(dotActiveColor
|
|
15
15
|
? { dotActiveStyle: { backgroundColor: dotActiveColor } }
|
|
16
16
|
: {}),
|
|
17
|
-
} },
|
|
17
|
+
} }, data && renderItem
|
|
18
|
+
? data.map((item, index) => React.cloneElement(renderItem({ item, index }), {
|
|
19
|
+
key: keyExtractor ? keyExtractor(item, index) : index,
|
|
20
|
+
}))
|
|
21
|
+
: children)));
|
|
18
22
|
export default Swiper;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { View, StyleProp, ViewStyle } from "react-native";
|
|
3
3
|
import SwiperComponent from "react-native-web-swiper";
|
|
4
4
|
|
|
5
|
-
export interface SwiperProps {
|
|
5
|
+
export interface SwiperProps<T> {
|
|
6
6
|
vertical?: boolean;
|
|
7
7
|
loop?: boolean;
|
|
8
8
|
from?: number;
|
|
@@ -15,6 +15,9 @@ export interface SwiperProps {
|
|
|
15
15
|
dotColor?: string;
|
|
16
16
|
dotActiveColor?: string;
|
|
17
17
|
children: React.ReactNode;
|
|
18
|
+
data?: Array<T>;
|
|
19
|
+
keyExtractor: (item: T, index: number) => string;
|
|
20
|
+
renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;
|
|
18
21
|
style?: StyleProp<ViewStyle>;
|
|
19
22
|
}
|
|
20
23
|
|
|
@@ -30,9 +33,12 @@ const Swiper = ({
|
|
|
30
33
|
dotsTouchable = true,
|
|
31
34
|
dotColor,
|
|
32
35
|
dotActiveColor,
|
|
36
|
+
data,
|
|
37
|
+
keyExtractor,
|
|
38
|
+
renderItem,
|
|
33
39
|
children,
|
|
34
40
|
style,
|
|
35
|
-
}: SwiperProps) => (
|
|
41
|
+
}: SwiperProps<any>) => (
|
|
36
42
|
<View style={style}>
|
|
37
43
|
<SwiperComponent
|
|
38
44
|
from={from}
|
|
@@ -53,7 +59,13 @@ const Swiper = ({
|
|
|
53
59
|
: {}),
|
|
54
60
|
}}
|
|
55
61
|
>
|
|
56
|
-
{
|
|
62
|
+
{data && renderItem
|
|
63
|
+
? data.map((item, index) =>
|
|
64
|
+
React.cloneElement(renderItem({ item, index }), {
|
|
65
|
+
key: keyExtractor ? keyExtractor(item, index) : index,
|
|
66
|
+
})
|
|
67
|
+
)
|
|
68
|
+
: children}
|
|
57
69
|
</SwiperComponent>
|
|
58
70
|
</View>
|
|
59
71
|
);
|
package/src/mappings/MapView.js
CHANGED
|
@@ -123,8 +123,8 @@ export const SEED_DATA = {
|
|
|
123
123
|
defaultValue: null,
|
|
124
124
|
group: GROUPS.basic,
|
|
125
125
|
}),
|
|
126
|
-
|
|
127
|
-
label: "
|
|
126
|
+
showsPointsOfInterest: createBoolProp({
|
|
127
|
+
label: "Shows Points of Interest",
|
|
128
128
|
description: "Whether to show points of interest on the map.",
|
|
129
129
|
required: false,
|
|
130
130
|
defaultValue: true,
|
package/src/mappings/MapView.ts
CHANGED
|
@@ -135,8 +135,8 @@ export const SEED_DATA = {
|
|
|
135
135
|
defaultValue: null,
|
|
136
136
|
group: GROUPS.basic,
|
|
137
137
|
}),
|
|
138
|
-
|
|
139
|
-
label: "
|
|
138
|
+
showsPointsOfInterest: createBoolProp({
|
|
139
|
+
label: "Shows Points of Interest",
|
|
140
140
|
description: "Whether to show points of interest on the map.",
|
|
141
141
|
required: false,
|
|
142
142
|
defaultValue: true,
|