@draftbit/core 46.2.4-463c2c.0 → 46.2.4-47dc09.5
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/Config.js +1 -0
- package/lib/commonjs/components/DeprecatedButton.js +4 -22
- package/lib/commonjs/components/SVG.js +49 -0
- package/lib/commonjs/components/TabView/TabView.js +102 -0
- package/lib/commonjs/components/TabView/TabViewItem.js +26 -0
- package/lib/commonjs/components/TabView/index.js +23 -0
- package/lib/commonjs/components/TextField.js +2 -1
- package/lib/commonjs/index.js +22 -8
- package/lib/commonjs/mappings/Image.js +2 -2
- package/lib/commonjs/mappings/MapView.js +1 -0
- package/lib/commonjs/mappings/NumberInput.js +146 -149
- package/lib/commonjs/mappings/SVG.js +23 -0
- package/lib/commonjs/mappings/TabView.js +79 -0
- package/lib/commonjs/mappings/TextArea.js +188 -193
- package/lib/commonjs/mappings/TextField.js +7 -8
- package/lib/commonjs/mappings/TextInput.js +178 -180
- package/lib/module/components/Config.js +1 -0
- package/lib/module/components/SVG.js +32 -0
- package/lib/module/components/TabView/TabView.js +87 -0
- package/lib/module/components/TabView/TabViewItem.js +18 -0
- package/lib/module/components/TabView/index.js +2 -0
- package/lib/module/components/TextField.js +2 -1
- package/lib/module/index.js +3 -2
- package/lib/module/mappings/Image.js +2 -2
- package/lib/module/mappings/MapView.js +1 -0
- package/lib/module/mappings/NumberInput.js +146 -149
- package/lib/module/mappings/SVG.js +14 -0
- package/lib/module/mappings/TabView.js +70 -0
- package/lib/module/mappings/TextArea.js +188 -193
- package/lib/module/mappings/TextField.js +7 -8
- package/lib/module/mappings/TextInput.js +178 -180
- package/lib/typescript/src/components/Config.d.ts +1 -0
- package/lib/typescript/src/components/SVG.d.ts +8 -0
- package/lib/typescript/src/components/TabView/TabView.d.ts +19 -0
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +10 -0
- package/lib/typescript/src/components/TabView/index.d.ts +2 -0
- package/lib/typescript/src/components/TextField.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/mappings/MapView.d.ts +1 -0
- package/lib/typescript/src/mappings/SVG.d.ts +22 -0
- package/lib/typescript/src/mappings/TabView.d.ts +111 -0
- package/lib/typescript/src/mappings/TextArea.d.ts +42 -42
- package/lib/typescript/src/mappings/TextField.d.ts +120 -110
- package/package.json +7 -6
- package/src/components/Config.js +1 -0
- package/src/components/Config.ts +1 -0
- package/src/components/SVG.js +14 -0
- package/src/components/SVG.tsx +35 -0
- package/src/components/TabView/TabView.js +34 -0
- package/src/components/TabView/TabView.tsx +97 -0
- package/src/components/TabView/TabViewItem.js +5 -0
- package/src/components/TabView/TabViewItem.tsx +21 -0
- package/src/components/TabView/index.js +2 -0
- package/src/components/TabView/index.ts +2 -0
- package/src/components/TextField.js +2 -2
- package/src/components/TextField.tsx +3 -1
- package/src/index.js +2 -1
- package/src/index.tsx +2 -1
- package/src/mappings/Image.js +2 -2
- package/src/mappings/Image.ts +2 -2
- package/src/mappings/MapView.js +1 -0
- package/src/mappings/MapView.ts +1 -0
- package/src/mappings/NumberInput.js +160 -163
- package/src/mappings/NumberInput.ts +165 -168
- package/src/mappings/SVG.js +14 -0
- package/src/mappings/SVG.ts +15 -0
- package/src/mappings/TabView.js +73 -0
- package/src/mappings/TabView.ts +80 -0
- package/src/mappings/TextArea.js +213 -220
- package/src/mappings/TextArea.ts +219 -227
- package/src/mappings/TextField.js +6 -9
- package/src/mappings/TextField.ts +7 -11
- package/src/mappings/TextInput.js +205 -208
- package/src/mappings/TextInput.ts +212 -215
- package/lib/commonjs/components/Youtube.js +0 -73
- package/lib/module/components/Youtube.js +0 -59
- package/lib/typescript/src/components/Youtube.d.ts +0 -44
- package/src/components/Youtube.js +0 -38
- package/src/components/Youtube.tsx +0 -66
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
COMPONENT_TYPES,
|
|
3
|
-
createBoolProp,
|
|
4
|
-
createTextProp,
|
|
5
|
-
} from "@draftbit/types";
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
8
|
-
import YoutubePlayer from "react-native-youtube-iframe";
|
|
9
|
-
import { extractStyles } from "../utilities";
|
|
10
|
-
|
|
11
|
-
type Props = {
|
|
12
|
-
videoId: string;
|
|
13
|
-
playlist: string;
|
|
14
|
-
style: StyleProp<ViewStyle>;
|
|
15
|
-
mute: boolean;
|
|
16
|
-
autoplay: boolean;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const Youtube = ({ videoId, playlist, style, mute, autoplay }: Props) => {
|
|
20
|
-
const {
|
|
21
|
-
viewStyles: { height, width },
|
|
22
|
-
} = extractStyles(style);
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<YoutubePlayer
|
|
26
|
-
height={height}
|
|
27
|
-
width={width}
|
|
28
|
-
play={autoplay}
|
|
29
|
-
videoId={videoId}
|
|
30
|
-
playList={playlist}
|
|
31
|
-
mute={mute}
|
|
32
|
-
/>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default Youtube;
|
|
37
|
-
|
|
38
|
-
export const SEED_DATA = {
|
|
39
|
-
name: "Youtube",
|
|
40
|
-
tag: "Youtube",
|
|
41
|
-
description: "Youtube Component",
|
|
42
|
-
category: COMPONENT_TYPES.media,
|
|
43
|
-
layout: {
|
|
44
|
-
width: "100%",
|
|
45
|
-
},
|
|
46
|
-
props: {
|
|
47
|
-
videoId: createTextProp({
|
|
48
|
-
label: "VideoId",
|
|
49
|
-
description: "Youtube Video ID",
|
|
50
|
-
}),
|
|
51
|
-
playlist: createTextProp({
|
|
52
|
-
label: "PlayList",
|
|
53
|
-
description: "Playlist ID",
|
|
54
|
-
}),
|
|
55
|
-
mute: createBoolProp({
|
|
56
|
-
label: "Mute",
|
|
57
|
-
description: "Whether to mute video",
|
|
58
|
-
defaultValue: false,
|
|
59
|
-
}),
|
|
60
|
-
autoplay: createBoolProp({
|
|
61
|
-
label: "Autoplay",
|
|
62
|
-
description: "Whether to Autoplay video",
|
|
63
|
-
defaultValue: false,
|
|
64
|
-
}),
|
|
65
|
-
},
|
|
66
|
-
};
|