@draftbit/core 42.4.2-24a0ec.2 → 42.4.2-717ab1.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/Accordion/AccordionItem.js +16 -5
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/components/AspectRatio.js +15 -2
- package/lib/commonjs/components/AspectRatio.js.map +1 -1
- package/lib/commonjs/components/AvatarEdit.js +16 -5
- package/lib/commonjs/components/AvatarEdit.js.map +1 -1
- package/lib/commonjs/components/Button.js +25 -11
- package/lib/commonjs/components/Button.js.map +1 -1
- package/lib/commonjs/components/CardBlock.js +17 -5
- package/lib/commonjs/components/CardBlock.js.map +1 -1
- package/lib/commonjs/components/CardContainer.js +14 -5
- package/lib/commonjs/components/CardContainer.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/CardContainerShortImage.js +5 -16
- package/lib/commonjs/components/CardContainerShortImage.js.map +1 -1
- package/lib/commonjs/components/CardInline.js.map +1 -1
- package/lib/commonjs/components/Carousel.js +15 -5
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +14 -6
- package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/CircleImage.js +18 -5
- package/lib/commonjs/components/CircleImage.js.map +1 -1
- package/lib/commonjs/components/Config.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +15 -4
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/Divider.js +5 -18
- package/lib/commonjs/components/Divider.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/FormRow.js +18 -5
- package/lib/commonjs/components/FormRow.js.map +1 -1
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/HeaderLarge.js.map +1 -1
- package/lib/commonjs/components/HeaderMedium.js.map +1 -1
- package/lib/commonjs/components/HeaderOverline.js.map +1 -1
- package/lib/commonjs/components/IconButton.js +18 -5
- package/lib/commonjs/components/IconButton.js.map +1 -1
- package/lib/commonjs/components/Image.js +16 -6
- package/lib/commonjs/components/Image.js.map +1 -1
- package/lib/commonjs/components/Layout.js +41 -22
- package/lib/commonjs/components/Layout.js.map +1 -1
- package/lib/commonjs/components/Markdown.js +45 -0
- package/lib/commonjs/components/Markdown.js.map +1 -0
- package/lib/commonjs/components/NumberInput.js +15 -3
- package/lib/commonjs/components/NumberInput.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerTypes.js +2 -1
- package/lib/commonjs/components/Portal/PortalManager.js.map +1 -1
- package/lib/commonjs/components/ProgressBar.js +19 -6
- package/lib/commonjs/components/ProgressBar.js.map +1 -1
- package/lib/commonjs/components/ProgressCircle.js.map +1 -1
- package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.js +14 -5
- package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +11 -2
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +15 -5
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/components/Row.js.map +1 -1
- package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
- package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -1
- package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
- package/lib/commonjs/components/ScreenContainer.js +18 -5
- package/lib/commonjs/components/ScreenContainer.js.map +1 -1
- package/lib/commonjs/components/Slider.js +17 -5
- package/lib/commonjs/components/Slider.js.map +1 -1
- package/lib/commonjs/components/Stepper.js.map +1 -1
- package/lib/commonjs/components/Surface.js +11 -4
- package/lib/commonjs/components/Surface.js.map +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/commonjs/components/Swiper/index.js.map +1 -1
- package/lib/commonjs/components/Switch.js +10 -19
- package/lib/commonjs/components/Switch.js.map +1 -1
- package/lib/commonjs/components/TextInput.js +12 -2
- package/lib/commonjs/components/TextInput.js.map +1 -1
- package/lib/commonjs/components/ToggleButton.js +17 -5
- package/lib/commonjs/components/ToggleButton.js.map +1 -1
- package/lib/commonjs/components/Touchable.js +16 -5
- package/lib/commonjs/components/Touchable.js.map +1 -1
- package/lib/commonjs/components/Touchable.web.js.map +1 -1
- package/lib/commonjs/components/Typography.js.map +1 -1
- package/lib/commonjs/index.js +3 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles/fonts.js.map +1 -1
- package/lib/commonjs/styles/shadow.js.map +1 -1
- package/lib/module/components/Markdown.js +26 -0
- package/lib/module/components/Markdown.js.map +1 -0
- package/lib/module/components/Surface.js +2 -4
- package/lib/module/components/Surface.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/components/Markdown.d.ts +21 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/package.json +4 -5
- package/src/components/Markdown.js +21 -0
- package/src/components/Markdown.tsx +30 -0
- package/src/index.js +1 -1
- package/src/index.tsx +1 -1
- package/lib/commonjs/components/Youtube.js +0 -73
- package/lib/commonjs/components/Youtube.js.map +0 -1
- package/lib/module/components/Youtube.js +0 -59
- package/lib/module/components/Youtube.js.map +0 -1
- package/lib/typescript/src/components/Youtube.d.ts +0 -43
- package/src/components/Youtube.js +0 -38
- package/src/components/Youtube.tsx +0 -66
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SEED_DATA = exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _types = require("@draftbit/types");
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _reactNativeYoutubeIframe = _interopRequireDefault(require("react-native-youtube-iframe"));
|
|
13
|
-
|
|
14
|
-
var _utilities = require("../utilities");
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
const Youtube = ({
|
|
19
|
-
videoId,
|
|
20
|
-
playlist,
|
|
21
|
-
style,
|
|
22
|
-
mute,
|
|
23
|
-
autoplay
|
|
24
|
-
}) => {
|
|
25
|
-
const {
|
|
26
|
-
viewStyles: {
|
|
27
|
-
height,
|
|
28
|
-
width
|
|
29
|
-
}
|
|
30
|
-
} = (0, _utilities.extractStyles)(style);
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(_reactNativeYoutubeIframe.default, {
|
|
32
|
-
height: height,
|
|
33
|
-
width: width,
|
|
34
|
-
play: autoplay,
|
|
35
|
-
videoId: videoId,
|
|
36
|
-
playList: playlist,
|
|
37
|
-
mute: mute
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var _default = Youtube;
|
|
42
|
-
exports.default = _default;
|
|
43
|
-
const SEED_DATA = {
|
|
44
|
-
name: "Youtube",
|
|
45
|
-
tag: "Youtube",
|
|
46
|
-
description: "Youtube Component",
|
|
47
|
-
category: _types.COMPONENT_TYPES.media,
|
|
48
|
-
layout: {
|
|
49
|
-
width: "100%"
|
|
50
|
-
},
|
|
51
|
-
props: {
|
|
52
|
-
videoId: (0, _types.createTextProp)({
|
|
53
|
-
label: "VideoId",
|
|
54
|
-
description: "Youtube Video ID"
|
|
55
|
-
}),
|
|
56
|
-
playlist: (0, _types.createTextProp)({
|
|
57
|
-
label: "PlayList",
|
|
58
|
-
description: "Playlist ID"
|
|
59
|
-
}),
|
|
60
|
-
mute: (0, _types.createBoolProp)({
|
|
61
|
-
label: "Mute",
|
|
62
|
-
description: "Whether to mute video",
|
|
63
|
-
defaultValue: false
|
|
64
|
-
}),
|
|
65
|
-
autoplay: (0, _types.createBoolProp)({
|
|
66
|
-
label: "Autoplay",
|
|
67
|
-
description: "Whether to Autoplay video",
|
|
68
|
-
defaultValue: false
|
|
69
|
-
})
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
exports.SEED_DATA = SEED_DATA;
|
|
73
|
-
//# sourceMappingURL=Youtube.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["Youtube.tsx"],"names":["Youtube","videoId","playlist","style","mute","autoplay","viewStyles","height","width","SEED_DATA","name","tag","description","category","COMPONENT_TYPES","media","layout","props","label","defaultValue"],"mappings":";;;;;;;AAAA;;AAKA;;AAEA;;AACA;;;;AAUA,MAAMA,OAAO,GAAG,CAAC;AAAEC,EAAAA,OAAF;AAAWC,EAAAA,QAAX;AAAqBC,EAAAA,KAArB;AAA4BC,EAAAA,IAA5B;AAAkCC,EAAAA;AAAlC,CAAD,KAAyD;AACvE,QAAM;AACJC,IAAAA,UAAU,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AADR,MAEF,8BAAcL,KAAd,CAFJ;AAIA,sBACE,6BAAC,iCAAD;AACE,IAAA,MAAM,EAAEI,MADV;AAEE,IAAA,KAAK,EAAEC,KAFT;AAGE,IAAA,IAAI,EAAEH,QAHR;AAIE,IAAA,OAAO,EAAEJ,OAJX;AAKE,IAAA,QAAQ,EAAEC,QALZ;AAME,IAAA,IAAI,EAAEE;AANR,IADF;AAUD,CAfD;;eAiBeJ,O;;AAER,MAAMS,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,SADiB;AAEvBC,EAAAA,GAAG,EAAE,SAFkB;AAGvBC,EAAAA,WAAW,EAAE,mBAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAJH;AAKvBC,EAAAA,MAAM,EAAE;AACNR,IAAAA,KAAK,EAAE;AADD,GALe;AAQvBS,EAAAA,KAAK,EAAE;AACLhB,IAAAA,OAAO,EAAE,2BAAe;AACtBiB,MAAAA,KAAK,EAAE,SADe;AAEtBN,MAAAA,WAAW,EAAE;AAFS,KAAf,CADJ;AAKLV,IAAAA,QAAQ,EAAE,2BAAe;AACvBgB,MAAAA,KAAK,EAAE,UADgB;AAEvBN,MAAAA,WAAW,EAAE;AAFU,KAAf,CALL;AASLR,IAAAA,IAAI,EAAE,2BAAe;AACnBc,MAAAA,KAAK,EAAE,MADY;AAEnBN,MAAAA,WAAW,EAAE,uBAFM;AAGnBO,MAAAA,YAAY,EAAE;AAHK,KAAf,CATD;AAcLd,IAAAA,QAAQ,EAAE,2BAAe;AACvBa,MAAAA,KAAK,EAAE,UADgB;AAEvBN,MAAAA,WAAW,EAAE,2BAFU;AAGvBO,MAAAA,YAAY,EAAE;AAHS,KAAf;AAdL;AARgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createTextProp,\n} from \"@draftbit/types\";\nimport React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport YoutubePlayer from \"react-native-youtube-iframe\";\nimport { extractStyles } from \"../utilities\";\n\ntype Props = {\n videoId: string;\n playlist: string;\n style: StyleProp<ViewStyle>;\n mute: boolean;\n autoplay: boolean;\n};\n\nconst Youtube = ({ videoId, playlist, style, mute, autoplay }: Props) => {\n const {\n viewStyles: { height, width },\n } = extractStyles(style);\n\n return (\n <YoutubePlayer\n height={height}\n width={width}\n play={autoplay}\n videoId={videoId}\n playList={playlist}\n mute={mute}\n />\n );\n};\n\nexport default Youtube;\n\nexport const SEED_DATA = {\n name: \"Youtube\",\n tag: \"Youtube\",\n description: \"Youtube Component\",\n category: COMPONENT_TYPES.media,\n layout: {\n width: \"100%\",\n },\n props: {\n videoId: createTextProp({\n label: \"VideoId\",\n description: \"Youtube Video ID\",\n }),\n playlist: createTextProp({\n label: \"PlayList\",\n description: \"Playlist ID\",\n }),\n mute: createBoolProp({\n label: \"Mute\",\n description: \"Whether to mute video\",\n defaultValue: false,\n }),\n autoplay: createBoolProp({\n label: \"Autoplay\",\n description: \"Whether to Autoplay video\",\n defaultValue: false,\n }),\n },\n};\n"]}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createBoolProp, createTextProp } from "@draftbit/types";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import YoutubePlayer from "react-native-youtube-iframe";
|
|
4
|
-
import { extractStyles } from "../utilities";
|
|
5
|
-
|
|
6
|
-
const Youtube = ({
|
|
7
|
-
videoId,
|
|
8
|
-
playlist,
|
|
9
|
-
style,
|
|
10
|
-
mute,
|
|
11
|
-
autoplay
|
|
12
|
-
}) => {
|
|
13
|
-
const {
|
|
14
|
-
viewStyles: {
|
|
15
|
-
height,
|
|
16
|
-
width
|
|
17
|
-
}
|
|
18
|
-
} = extractStyles(style);
|
|
19
|
-
return /*#__PURE__*/React.createElement(YoutubePlayer, {
|
|
20
|
-
height: height,
|
|
21
|
-
width: width,
|
|
22
|
-
play: autoplay,
|
|
23
|
-
videoId: videoId,
|
|
24
|
-
playList: playlist,
|
|
25
|
-
mute: mute
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export default Youtube;
|
|
30
|
-
export const SEED_DATA = {
|
|
31
|
-
name: "Youtube",
|
|
32
|
-
tag: "Youtube",
|
|
33
|
-
description: "Youtube Component",
|
|
34
|
-
category: COMPONENT_TYPES.media,
|
|
35
|
-
layout: {
|
|
36
|
-
width: "100%"
|
|
37
|
-
},
|
|
38
|
-
props: {
|
|
39
|
-
videoId: createTextProp({
|
|
40
|
-
label: "VideoId",
|
|
41
|
-
description: "Youtube Video ID"
|
|
42
|
-
}),
|
|
43
|
-
playlist: createTextProp({
|
|
44
|
-
label: "PlayList",
|
|
45
|
-
description: "Playlist ID"
|
|
46
|
-
}),
|
|
47
|
-
mute: createBoolProp({
|
|
48
|
-
label: "Mute",
|
|
49
|
-
description: "Whether to mute video",
|
|
50
|
-
defaultValue: false
|
|
51
|
-
}),
|
|
52
|
-
autoplay: createBoolProp({
|
|
53
|
-
label: "Autoplay",
|
|
54
|
-
description: "Whether to Autoplay video",
|
|
55
|
-
defaultValue: false
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=Youtube.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["Youtube.tsx"],"names":["COMPONENT_TYPES","createBoolProp","createTextProp","React","YoutubePlayer","extractStyles","Youtube","videoId","playlist","style","mute","autoplay","viewStyles","height","width","SEED_DATA","name","tag","description","category","media","layout","props","label","defaultValue"],"mappings":"AAAA,SACEA,eADF,EAEEC,cAFF,EAGEC,cAHF,QAIO,iBAJP;AAKA,OAAOC,KAAP,MAAkB,OAAlB;AAEA,OAAOC,aAAP,MAA0B,6BAA1B;AACA,SAASC,aAAT,QAA8B,cAA9B;;AAUA,MAAMC,OAAO,GAAG,CAAC;AAAEC,EAAAA,OAAF;AAAWC,EAAAA,QAAX;AAAqBC,EAAAA,KAArB;AAA4BC,EAAAA,IAA5B;AAAkCC,EAAAA;AAAlC,CAAD,KAAyD;AACvE,QAAM;AACJC,IAAAA,UAAU,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AADR,MAEFT,aAAa,CAACI,KAAD,CAFjB;AAIA,sBACE,oBAAC,aAAD;AACE,IAAA,MAAM,EAAEI,MADV;AAEE,IAAA,KAAK,EAAEC,KAFT;AAGE,IAAA,IAAI,EAAEH,QAHR;AAIE,IAAA,OAAO,EAAEJ,OAJX;AAKE,IAAA,QAAQ,EAAEC,QALZ;AAME,IAAA,IAAI,EAAEE;AANR,IADF;AAUD,CAfD;;AAiBA,eAAeJ,OAAf;AAEA,OAAO,MAAMS,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,SADiB;AAEvBC,EAAAA,GAAG,EAAE,SAFkB;AAGvBC,EAAAA,WAAW,EAAE,mBAHU;AAIvBC,EAAAA,QAAQ,EAAEnB,eAAe,CAACoB,KAJH;AAKvBC,EAAAA,MAAM,EAAE;AACNP,IAAAA,KAAK,EAAE;AADD,GALe;AAQvBQ,EAAAA,KAAK,EAAE;AACLf,IAAAA,OAAO,EAAEL,cAAc,CAAC;AACtBqB,MAAAA,KAAK,EAAE,SADe;AAEtBL,MAAAA,WAAW,EAAE;AAFS,KAAD,CADlB;AAKLV,IAAAA,QAAQ,EAAEN,cAAc,CAAC;AACvBqB,MAAAA,KAAK,EAAE,UADgB;AAEvBL,MAAAA,WAAW,EAAE;AAFU,KAAD,CALnB;AASLR,IAAAA,IAAI,EAAET,cAAc,CAAC;AACnBsB,MAAAA,KAAK,EAAE,MADY;AAEnBL,MAAAA,WAAW,EAAE,uBAFM;AAGnBM,MAAAA,YAAY,EAAE;AAHK,KAAD,CATf;AAcLb,IAAAA,QAAQ,EAAEV,cAAc,CAAC;AACvBsB,MAAAA,KAAK,EAAE,UADgB;AAEvBL,MAAAA,WAAW,EAAE,2BAFU;AAGvBM,MAAAA,YAAY,EAAE;AAHS,KAAD;AAdnB;AARgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createTextProp,\n} from \"@draftbit/types\";\nimport React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport YoutubePlayer from \"react-native-youtube-iframe\";\nimport { extractStyles } from \"../utilities\";\n\ntype Props = {\n videoId: string;\n playlist: string;\n style: StyleProp<ViewStyle>;\n mute: boolean;\n autoplay: boolean;\n};\n\nconst Youtube = ({ videoId, playlist, style, mute, autoplay }: Props) => {\n const {\n viewStyles: { height, width },\n } = extractStyles(style);\n\n return (\n <YoutubePlayer\n height={height}\n width={width}\n play={autoplay}\n videoId={videoId}\n playList={playlist}\n mute={mute}\n />\n );\n};\n\nexport default Youtube;\n\nexport const SEED_DATA = {\n name: \"Youtube\",\n tag: \"Youtube\",\n description: \"Youtube Component\",\n category: COMPONENT_TYPES.media,\n layout: {\n width: \"100%\",\n },\n props: {\n videoId: createTextProp({\n label: \"VideoId\",\n description: \"Youtube Video ID\",\n }),\n playlist: createTextProp({\n label: \"PlayList\",\n description: \"Playlist ID\",\n }),\n mute: createBoolProp({\n label: \"Mute\",\n description: \"Whether to mute video\",\n defaultValue: false,\n }),\n autoplay: createBoolProp({\n label: \"Autoplay\",\n description: \"Whether to Autoplay video\",\n defaultValue: false,\n }),\n },\n};\n"]}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
2
|
-
declare type Props = {
|
|
3
|
-
videoId: string;
|
|
4
|
-
playlist: string;
|
|
5
|
-
style: StyleProp<ViewStyle>;
|
|
6
|
-
mute: boolean;
|
|
7
|
-
autoplay: boolean;
|
|
8
|
-
};
|
|
9
|
-
declare const Youtube: ({ videoId, playlist, style, mute, autoplay }: Props) => JSX.Element;
|
|
10
|
-
export default Youtube;
|
|
11
|
-
export declare const SEED_DATA: {
|
|
12
|
-
name: string;
|
|
13
|
-
tag: string;
|
|
14
|
-
description: string;
|
|
15
|
-
category: string;
|
|
16
|
-
layout: {
|
|
17
|
-
width: string;
|
|
18
|
-
};
|
|
19
|
-
props: {
|
|
20
|
-
videoId: any;
|
|
21
|
-
playlist: any;
|
|
22
|
-
mute: {
|
|
23
|
-
label: string;
|
|
24
|
-
description: string;
|
|
25
|
-
formType: string;
|
|
26
|
-
propType: string;
|
|
27
|
-
defaultValue: boolean;
|
|
28
|
-
editable: boolean;
|
|
29
|
-
required: boolean;
|
|
30
|
-
group: string;
|
|
31
|
-
};
|
|
32
|
-
autoplay: {
|
|
33
|
-
label: string;
|
|
34
|
-
description: string;
|
|
35
|
-
formType: string;
|
|
36
|
-
propType: string;
|
|
37
|
-
defaultValue: boolean;
|
|
38
|
-
editable: boolean;
|
|
39
|
-
required: boolean;
|
|
40
|
-
group: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createBoolProp, createTextProp, } from "@draftbit/types";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import YoutubePlayer from "react-native-youtube-iframe";
|
|
4
|
-
import { extractStyles } from "../utilities";
|
|
5
|
-
const Youtube = ({ videoId, playlist, style, mute, autoplay }) => {
|
|
6
|
-
const { viewStyles: { height, width }, } = extractStyles(style);
|
|
7
|
-
return (React.createElement(YoutubePlayer, { height: height, width: width, play: autoplay, videoId: videoId, playList: playlist, mute: mute }));
|
|
8
|
-
};
|
|
9
|
-
export default Youtube;
|
|
10
|
-
export const SEED_DATA = {
|
|
11
|
-
name: "Youtube",
|
|
12
|
-
tag: "Youtube",
|
|
13
|
-
description: "Youtube Component",
|
|
14
|
-
category: COMPONENT_TYPES.media,
|
|
15
|
-
layout: {
|
|
16
|
-
width: "100%",
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
videoId: createTextProp({
|
|
20
|
-
label: "VideoId",
|
|
21
|
-
description: "Youtube Video ID",
|
|
22
|
-
}),
|
|
23
|
-
playlist: createTextProp({
|
|
24
|
-
label: "PlayList",
|
|
25
|
-
description: "Playlist ID",
|
|
26
|
-
}),
|
|
27
|
-
mute: createBoolProp({
|
|
28
|
-
label: "Mute",
|
|
29
|
-
description: "Whether to mute video",
|
|
30
|
-
defaultValue: false,
|
|
31
|
-
}),
|
|
32
|
-
autoplay: createBoolProp({
|
|
33
|
-
label: "Autoplay",
|
|
34
|
-
description: "Whether to Autoplay video",
|
|
35
|
-
defaultValue: false,
|
|
36
|
-
}),
|
|
37
|
-
},
|
|
38
|
-
};
|
|
@@ -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
|
-
};
|