@draftbit/core 49.4.2-183f10.2 → 49.4.2-27fee9.2
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/Markdown.js +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js +1 -1
- package/lib/commonjs/components/TextInput.js +1 -1
- package/lib/typescript/src/components/Markdown.js +15 -2
- package/lib/typescript/src/components/Markdown.js.map +1 -1
- package/lib/typescript/src/components/Swiper/Swiper.d.ts +3 -1
- package/lib/typescript/src/components/Swiper/Swiper.js +2 -2
- package/lib/typescript/src/components/Swiper/Swiper.js.map +1 -1
- package/lib/typescript/src/components/TextInput.js +2 -2
- package/lib/typescript/src/components/TextInput.js.map +1 -1
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/Markdown.js +15 -2
- package/src/components/Markdown.js.map +1 -1
- package/src/components/Markdown.tsx +21 -2
- package/src/components/Swiper/Swiper.js +2 -2
- package/src/components/Swiper/Swiper.js.map +1 -1
- package/src/components/Swiper/Swiper.tsx +6 -0
- package/src/components/TextInput.js +2 -2
- package/src/components/TextInput.js.map +1 -1
- package/src/components/TextInput.tsx +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "49.4.2-
|
|
3
|
+
"version": "49.4.2-27fee9.2+27fee9b",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"types": "lib/typescript/src/index.d.ts",
|
|
@@ -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": "^49.4.2-
|
|
44
|
+
"@draftbit/types": "^49.4.2-27fee9.2+27fee9b",
|
|
45
45
|
"@expo/vector-icons": "^13.0.0",
|
|
46
46
|
"@gorhom/bottom-sheet": "5.0.0-alpha.7",
|
|
47
47
|
"@material-ui/core": "^4.11.0",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
],
|
|
114
114
|
"testEnvironment": "node"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "27fee9bd697809aae43144c348eac253b0b8437c"
|
|
117
117
|
}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { StyleSheet } from "react-native";
|
|
3
3
|
import MarkdownComponent from "react-native-markdown-display";
|
|
4
|
-
const
|
|
4
|
+
const childToString = (child) => {
|
|
5
|
+
if (typeof child === "undefined" ||
|
|
6
|
+
child === null ||
|
|
7
|
+
typeof child === "boolean") {
|
|
8
|
+
return "";
|
|
9
|
+
}
|
|
10
|
+
if (JSON.stringify(child) === "{}") {
|
|
11
|
+
return "";
|
|
12
|
+
}
|
|
13
|
+
return child.toString();
|
|
14
|
+
};
|
|
15
|
+
const Markdown = ({ children: childrenProp, style, }) => {
|
|
16
|
+
const children = React.Children.toArray(childrenProp);
|
|
17
|
+
const text = children.map(childToString).join("");
|
|
5
18
|
return (
|
|
6
19
|
//'body' style applies to all markdown components
|
|
7
20
|
//@ts-ignore TS does not like the type of this named style for some reason
|
|
8
|
-
React.createElement(MarkdownComponent, { style: { body: StyleSheet.flatten(style) } },
|
|
21
|
+
React.createElement(MarkdownComponent, { style: { body: StyleSheet.flatten(style) } }, text));
|
|
9
22
|
};
|
|
10
23
|
export default Markdown;
|
|
11
24
|
//# sourceMappingURL=Markdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.js","sourceRoot":"","sources":["Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAM9D,MAAM,QAAQ,GAAqD,CAAC,EAClE,QAAQ,
|
|
1
|
+
{"version":3,"file":"Markdown.js","sourceRoot":"","sources":["Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAM9D,MAAM,aAAa,GAAG,CAAC,KAAuB,EAAU,EAAE;IACxD,IACE,OAAO,KAAK,KAAK,WAAW;QAC5B,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,SAAS,EAC1B;QACA,OAAO,EAAE,CAAC;KACX;IAED,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QAClC,OAAO,EAAE,CAAC;KACX;IAED,OAAQ,KAAyB,CAAC,QAAQ,EAAE,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAqD,CAAC,EAClE,QAAQ,EAAE,YAAY,EACtB,KAAK,GACN,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAElD,OAAO;IACL,iDAAiD;IACjD,0EAA0E;IAC1E,oBAAC,iBAAiB,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAC1D,IAAI,CACa,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -6,15 +6,34 @@ type MarkdownProps = {
|
|
|
6
6
|
style?: StyleProp<ViewStyle>;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
+
const childToString = (child?: React.ReactNode): string => {
|
|
10
|
+
if (
|
|
11
|
+
typeof child === "undefined" ||
|
|
12
|
+
child === null ||
|
|
13
|
+
typeof child === "boolean"
|
|
14
|
+
) {
|
|
15
|
+
return "";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (JSON.stringify(child) === "{}") {
|
|
19
|
+
return "";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return (child as number | string).toString();
|
|
23
|
+
};
|
|
24
|
+
|
|
9
25
|
const Markdown: React.FC<React.PropsWithChildren<MarkdownProps>> = ({
|
|
10
|
-
children,
|
|
26
|
+
children: childrenProp,
|
|
11
27
|
style,
|
|
12
28
|
}) => {
|
|
29
|
+
const children = React.Children.toArray(childrenProp);
|
|
30
|
+
const text = children.map(childToString).join("");
|
|
31
|
+
|
|
13
32
|
return (
|
|
14
33
|
//'body' style applies to all markdown components
|
|
15
34
|
//@ts-ignore TS does not like the type of this named style for some reason
|
|
16
35
|
<MarkdownComponent style={{ body: StyleSheet.flatten(style) }}>
|
|
17
|
-
{
|
|
36
|
+
{text}
|
|
18
37
|
</MarkdownComponent>
|
|
19
38
|
);
|
|
20
39
|
};
|
|
@@ -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, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, style, }) => {
|
|
4
|
+
const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor, dotActiveColor, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, minDistanceForAction, minDistanceToCapture, style, }) => {
|
|
5
5
|
var _a;
|
|
6
6
|
const [currentIndex, setCurrentIndex] = React.useState(0);
|
|
7
7
|
const numberOfItems = (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : React.Children.count(childrenProp);
|
|
@@ -56,7 +56,7 @@ const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTit
|
|
|
56
56
|
}
|
|
57
57
|
}, [children]);
|
|
58
58
|
return (React.createElement(View, { style: style },
|
|
59
|
-
React.createElement(SwiperComponent, { ref: swiperRef, from: from, loop: loop, timeout: timeout, vertical: vertical, onIndexChanged: onIndexChanged, controlsProps: {
|
|
59
|
+
React.createElement(SwiperComponent, { ref: swiperRef, from: from, loop: loop, timeout: timeout, vertical: vertical, onIndexChanged: onIndexChanged, minDistanceForAction: minDistanceForAction, minDistanceToCapture: minDistanceToCapture, controlsProps: {
|
|
60
60
|
prevTitle,
|
|
61
61
|
nextTitle,
|
|
62
62
|
prevTitleStyle: { color: prevTitleColor },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Swiper.js","sourceRoot":"","sources":["Swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,MAAM,cAAc,CAAC;AAC1D,OAAO,eAAe,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Swiper.js","sourceRoot":"","sources":["Swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,MAAM,cAAc,CAAC;AAC1D,OAAO,eAAe,MAAM,yBAAyB,CAAC;AA2BtD,MAAM,MAAM,GAAG,CAAC,EACd,QAAQ,GAAG,KAAK,EAChB,IAAI,GAAG,KAAK,EACZ,OAAO,GAAG,CAAC,EACX,IAAI,GAAG,CAAC,EACR,SAAS,GAAG,EAAE,EACd,SAAS,GAAG,EAAE,EACd,cAAc,EACd,cAAc,EACd,aAAa,G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AC,CAAC,CAAC;IAEf,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK;QAEhB,oBAAC,eAAe,IACd,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,oBAAoB,EAAE,oBAAoB,EAC1C,oBAAoB,EAAE,oBAAoB,EAC1C,aAAa,EAAE;gBACb,SAAS;gBACT,SAAS;gBACT,cAAc,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;gBACzC,cAAc,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;gBACzC,aAAa;gBACb,GAAG,CAAC,QAAQ;oBACV,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,EAAE;oBAC7D,CAAC,CAAC,EAAE,CAAC;gBACP,GAAG,CAAC,cAAc;oBAChB,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE,EAAE;oBACzD,CAAC,CAAC,EAAE,CAAC;aACR,IAEA,QAAQ,CACO,CACb,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -23,6 +23,8 @@ export interface SwiperProps<T> {
|
|
|
23
23
|
renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;
|
|
24
24
|
style?: StyleProp<ViewStyle>;
|
|
25
25
|
onIndexChanged?: (index: number) => void;
|
|
26
|
+
minDistanceForAction?: number;
|
|
27
|
+
minDistanceToCapture?: number;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
const Swiper = ({
|
|
@@ -45,6 +47,8 @@ const Swiper = ({
|
|
|
45
47
|
onSwipe,
|
|
46
48
|
onSwipedNext,
|
|
47
49
|
onSwipedPrevious,
|
|
50
|
+
minDistanceForAction,
|
|
51
|
+
minDistanceToCapture,
|
|
48
52
|
style,
|
|
49
53
|
}: SwiperProps<any>) => {
|
|
50
54
|
const [currentIndex, setCurrentIndex] = React.useState(0);
|
|
@@ -119,6 +123,8 @@ const Swiper = ({
|
|
|
119
123
|
timeout={timeout}
|
|
120
124
|
vertical={vertical}
|
|
121
125
|
onIndexChanged={onIndexChanged}
|
|
126
|
+
minDistanceForAction={minDistanceForAction}
|
|
127
|
+
minDistanceToCapture={minDistanceToCapture}
|
|
122
128
|
controlsProps={{
|
|
123
129
|
prevTitle,
|
|
124
130
|
nextTitle,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TextInput as NativeTextInput, Platform, } from "react-native";
|
|
3
3
|
import { useDebounce, useOnUpdate } from "../hooks";
|
|
4
|
-
const TextInput = React.forwardRef(({ onChangeTextDelayed, changeTextDelay = 500, webShowOutline = true, style, disabled, value, ...rest }, ref) => {
|
|
4
|
+
const TextInput = React.forwardRef(({ onChangeTextDelayed, changeTextDelay = 500, webShowOutline = true, style, disabled = false, editable = true, value, ...rest }, ref) => {
|
|
5
5
|
const delayedValue = useDebounce(value, changeTextDelay);
|
|
6
6
|
useOnUpdate(() => {
|
|
7
7
|
if (delayedValue !== undefined) {
|
|
8
8
|
onChangeTextDelayed === null || onChangeTextDelayed === void 0 ? void 0 : onChangeTextDelayed(delayedValue);
|
|
9
9
|
}
|
|
10
10
|
}, [delayedValue]);
|
|
11
|
-
return (React.createElement(NativeTextInput, { testID: "native-text-input", ref: ref, value: value, editable: !disabled, style: [
|
|
11
|
+
return (React.createElement(NativeTextInput, { testID: "native-text-input", ref: ref, value: value, editable: !disabled && editable, style: [
|
|
12
12
|
//@ts-ignore Web specific prop. Removes default blue outline that appears on the hidden TextInput
|
|
13
13
|
Platform.OS === "web" && !webShowOutline ? { outlineWidth: 0 } : {},
|
|
14
14
|
style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["TextInput.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iGAAiG;YACjG,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;YACnE,KAAK;SACN,KACG,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -20,7 +20,8 @@ const TextInput = React.forwardRef<NativeTextInput, TextInputProps>(
|
|
|
20
20
|
changeTextDelay = 500,
|
|
21
21
|
webShowOutline = true,
|
|
22
22
|
style,
|
|
23
|
-
disabled,
|
|
23
|
+
disabled = false,
|
|
24
|
+
editable = true,
|
|
24
25
|
value,
|
|
25
26
|
...rest
|
|
26
27
|
},
|
|
@@ -39,7 +40,7 @@ const TextInput = React.forwardRef<NativeTextInput, TextInputProps>(
|
|
|
39
40
|
testID="native-text-input"
|
|
40
41
|
ref={ref}
|
|
41
42
|
value={value}
|
|
42
|
-
editable={!disabled}
|
|
43
|
+
editable={!disabled && editable}
|
|
43
44
|
style={[
|
|
44
45
|
//@ts-ignore Web specific prop. Removes default blue outline that appears on the hidden TextInput
|
|
45
46
|
Platform.OS === "web" && !webShowOutline ? { outlineWidth: 0 } : {},
|