@draftbit/core 44.2.2 → 44.2.3-f311f8.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 +21 -5
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/components/AnimatedCircularProgress.js +11 -3
- package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
- package/lib/commonjs/components/DeprecatedFAB.js +20 -4
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/Picker/Picker.js +4 -0
- package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
- package/lib/commonjs/components/TextField.js +23 -7
- package/lib/commonjs/components/TextField.js.map +1 -1
- package/lib/commonjs/components/Touchable.js +16 -3
- package/lib/commonjs/components/Touchable.js.map +1 -1
- package/lib/commonjs/components/Youtube.js +74 -0
- package/lib/commonjs/components/Youtube.js.map +1 -0
- package/lib/commonjs/index.js +8 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/Carousel.js +1 -1
- package/lib/commonjs/mappings/Carousel.js.map +1 -1
- package/lib/commonjs/mappings/DatePicker.js +42 -41
- package/lib/commonjs/mappings/DatePicker.js.map +1 -1
- package/lib/commonjs/mappings/KeyboardAwareScrollView.js.map +1 -1
- package/lib/commonjs/mappings/Layout.js.map +1 -1
- package/lib/commonjs/mappings/MapMarker.js.map +1 -1
- package/lib/commonjs/mappings/Surface.js.map +1 -1
- package/lib/commonjs/mappings/TextField.js.map +1 -1
- package/lib/commonjs/mappings/Video.js.map +1 -1
- package/lib/commonjs/styles/DefaultTheme.js.map +1 -1
- package/lib/commonjs/styles/shadow.js.map +1 -1
- package/lib/module/components/Youtube.js +60 -0
- package/lib/module/components/Youtube.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/Carousel.js +1 -1
- package/lib/module/mappings/Carousel.js.map +1 -1
- package/lib/module/mappings/DatePicker.js +42 -41
- package/lib/module/mappings/DatePicker.js.map +1 -1
- package/lib/typescript/src/components/Youtube.d.ts +44 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/mappings/DatePicker.d.ts +0 -41
- package/package.json +5 -3
- package/src/components/Youtube.js +38 -0
- package/src/components/Youtube.tsx +66 -0
- package/src/index.js +1 -0
- package/src/index.tsx +1 -0
- package/src/mappings/Carousel.js +1 -1
- package/src/mappings/Carousel.ts +1 -1
- package/src/mappings/DatePicker.js +42 -41
- package/src/mappings/DatePicker.ts +42 -42
|
@@ -0,0 +1,60 @@
|
|
|
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 = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
videoId,
|
|
9
|
+
playlist,
|
|
10
|
+
style,
|
|
11
|
+
mute,
|
|
12
|
+
autoplay
|
|
13
|
+
} = _ref;
|
|
14
|
+
const {
|
|
15
|
+
viewStyles: {
|
|
16
|
+
height,
|
|
17
|
+
width
|
|
18
|
+
}
|
|
19
|
+
} = extractStyles(style);
|
|
20
|
+
return /*#__PURE__*/React.createElement(YoutubePlayer, {
|
|
21
|
+
height: height,
|
|
22
|
+
width: width,
|
|
23
|
+
play: autoplay,
|
|
24
|
+
videoId: videoId,
|
|
25
|
+
playList: playlist,
|
|
26
|
+
mute: mute
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default Youtube;
|
|
31
|
+
export const SEED_DATA = {
|
|
32
|
+
name: "Youtube",
|
|
33
|
+
tag: "Youtube",
|
|
34
|
+
description: "Youtube Component",
|
|
35
|
+
category: COMPONENT_TYPES.media,
|
|
36
|
+
layout: {
|
|
37
|
+
width: "100%"
|
|
38
|
+
},
|
|
39
|
+
props: {
|
|
40
|
+
videoId: createTextProp({
|
|
41
|
+
label: "VideoId",
|
|
42
|
+
description: "Youtube Video ID"
|
|
43
|
+
}),
|
|
44
|
+
playlist: createTextProp({
|
|
45
|
+
label: "PlayList",
|
|
46
|
+
description: "Playlist ID"
|
|
47
|
+
}),
|
|
48
|
+
mute: createBoolProp({
|
|
49
|
+
label: "Mute",
|
|
50
|
+
description: "Whether to mute video",
|
|
51
|
+
defaultValue: false
|
|
52
|
+
}),
|
|
53
|
+
autoplay: createBoolProp({
|
|
54
|
+
label: "Autoplay",
|
|
55
|
+
description: "Whether to Autoplay video",
|
|
56
|
+
defaultValue: false
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=Youtube.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,QAAyD;AAAA,MAAxD;AAAEC,IAAAA,OAAF;AAAWC,IAAAA,QAAX;AAAqBC,IAAAA,KAArB;AAA4BC,IAAAA,IAA5B;AAAkCC,IAAAA;AAAlC,GAAwD;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"]}
|
package/lib/module/index.js
CHANGED
|
@@ -49,5 +49,6 @@ export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImag
|
|
|
49
49
|
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
50
50
|
export { default as Slider } from "./components/Slider";
|
|
51
51
|
export { default as Stepper } from "./components/Stepper";
|
|
52
|
-
export { useAuthState } from "./components/useAuthState";
|
|
52
|
+
export { useAuthState } from "./components/useAuthState";
|
|
53
|
+
export { default as Youtube } from "./components/Youtube"; // a comment to fix sourcemap comment issue
|
|
53
54
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.tsx"],"names":["injectIcon","withTheme","ThemeProvider","default","Provider","DefaultTheme","Link","Banner","ButtonSolid","ButtonOutline","Avatar","AvatarEdit","Card","Carousel","Checkbox","CheckboxGroup","CheckboxRow","CircleImage","Container","Divider","FAB","FieldSearchBarFull","IconButton","Image","NumberInput","ScreenContainer","StarRating","Surface","Switch","SwitchRow","TextField","ToggleButton","Touchable","AccordionGroup","AccordionItem","ActionSheet","ActionSheetItem","ActionSheetCancel","Swiper","SwiperItem","Center","Circle","Square","Row","Stack","Spacer","RadioButton","RadioButtonGroup","RadioButtonRow","RadioButtonFieldGroup","Button","CardBlock","CardContainer","CardContainerRating","CardInline","DatePicker","HeaderLarge","HeaderMedium","HeaderOverline","Picker","ProgressBar","ProgressCircle","RowBodyIcon","RowHeadlineImageCaption","RowHeadlineImageIcon","Slider","Stepper","useAuthState"],"mappings":"AAAA,SAASA,UAAT,QAA2B,mBAA3B;AACA,SAASC,SAAT,EAAoBC,aAApB,QAAyC,WAAzC;AACA,SAASC,OAAO,IAAIC,QAApB,QAAoC,YAApC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,uBAAxC;AAEA,SAASC,IAAT,QAAqB,mBAArB;AACA,SAASH,OAAO,IAAII,MAApB,QAAkC,qBAAlC;AACA,SAASC,WAAT,EAAsBC,aAAtB,QAA2C,qBAA3C;AACA,SAASN,OAAO,IAAIO,MAApB,QAAkC,0BAAlC;AACA,SAASP,OAAO,IAAIQ,UAApB,QAAsC,yBAAtC;AACA,SAASR,OAAO,IAAIS,IAApB,QAAgC,mBAAhC;AACA,SAAST,OAAO,IAAIU,QAApB,QAAoC,uBAApC;AACA,SAASC,QAAT,EAAmBC,aAAnB,EAAkCC,WAAlC,QAAqD,uBAArD;AACA,SAASb,OAAO,IAAIc,WAApB,QAAuC,0BAAvC;AACA,SAASd,OAAO,IAAIe,SAApB,QAAqC,wBAArC;AACA,SAASf,OAAO,IAAIgB,OAApB,QAAmC,sBAAnC;AACA,SAAShB,OAAO,IAAIiB,GAApB,QAA+B,kBAA/B;AACA,SAASjB,OAAO,IAAIkB,kBAApB,QAA8C,iCAA9C;AACA,SAASlB,OAAO,IAAImB,UAApB,QAAsC,yBAAtC;AACA,SAASnB,OAAO,IAAIoB,KAApB,QAAiC,oBAAjC;AACA,SAASpB,OAAO,IAAIqB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AACA,SAASzD,OAAO,IAAI0D,cAApB,QAA0C,6BAA1C;AACA,SAAS1D,OAAO,IAAI2D,WAApB,QAAuC,0BAAvC;AACA,SAAS3D,OAAO,IAAI4D,uBAApB,QAAmD,sCAAnD;AACA,SAAS5D,OAAO,IAAI6D,oBAApB,QAAgD,mCAAhD;AACA,SAAS7D,OAAO,IAAI8D,MAApB,QAAkC,qBAAlC;AACA,SAAS9D,OAAO,IAAI+D,OAApB,QAAmC,sBAAnC;AACA,SAASC,YAAT,QAA6B,2BAA7B,C,CAEA","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\n\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 {\n ActionSheet,\n ActionSheetItem,\n ActionSheetCancel,\n} from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\n\nexport {\n Center,\n Circle,\n Square,\n Row,\n Stack,\n Spacer,\n} from \"./components/Layout\";\n\nexport {\n RadioButton,\n RadioButtonGroup,\n RadioButtonRow,\n RadioButtonFieldGroup,\n} from \"./components/RadioButton/index\";\n\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\n// a comment to fix sourcemap comment issue\n"]}
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":["injectIcon","withTheme","ThemeProvider","default","Provider","DefaultTheme","Link","Banner","ButtonSolid","ButtonOutline","Avatar","AvatarEdit","Card","Carousel","Checkbox","CheckboxGroup","CheckboxRow","CircleImage","Container","Divider","FAB","FieldSearchBarFull","IconButton","Image","NumberInput","ScreenContainer","StarRating","Surface","Switch","SwitchRow","TextField","ToggleButton","Touchable","AccordionGroup","AccordionItem","ActionSheet","ActionSheetItem","ActionSheetCancel","Swiper","SwiperItem","Center","Circle","Square","Row","Stack","Spacer","RadioButton","RadioButtonGroup","RadioButtonRow","RadioButtonFieldGroup","Button","CardBlock","CardContainer","CardContainerRating","CardInline","DatePicker","HeaderLarge","HeaderMedium","HeaderOverline","Picker","ProgressBar","ProgressCircle","RowBodyIcon","RowHeadlineImageCaption","RowHeadlineImageIcon","Slider","Stepper","useAuthState","Youtube"],"mappings":"AAAA,SAASA,UAAT,QAA2B,mBAA3B;AACA,SAASC,SAAT,EAAoBC,aAApB,QAAyC,WAAzC;AACA,SAASC,OAAO,IAAIC,QAApB,QAAoC,YAApC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,uBAAxC;AAEA,SAASC,IAAT,QAAqB,mBAArB;AACA,SAASH,OAAO,IAAII,MAApB,QAAkC,qBAAlC;AACA,SAASC,WAAT,EAAsBC,aAAtB,QAA2C,qBAA3C;AACA,SAASN,OAAO,IAAIO,MAApB,QAAkC,0BAAlC;AACA,SAASP,OAAO,IAAIQ,UAApB,QAAsC,yBAAtC;AACA,SAASR,OAAO,IAAIS,IAApB,QAAgC,mBAAhC;AACA,SAAST,OAAO,IAAIU,QAApB,QAAoC,uBAApC;AACA,SAASC,QAAT,EAAmBC,aAAnB,EAAkCC,WAAlC,QAAqD,uBAArD;AACA,SAASb,OAAO,IAAIc,WAApB,QAAuC,0BAAvC;AACA,SAASd,OAAO,IAAIe,SAApB,QAAqC,wBAArC;AACA,SAASf,OAAO,IAAIgB,OAApB,QAAmC,sBAAnC;AACA,SAAShB,OAAO,IAAIiB,GAApB,QAA+B,kBAA/B;AACA,SAASjB,OAAO,IAAIkB,kBAApB,QAA8C,iCAA9C;AACA,SAASlB,OAAO,IAAImB,UAApB,QAAsC,yBAAtC;AACA,SAASnB,OAAO,IAAIoB,KAApB,QAAiC,oBAAjC;AACA,SAASpB,OAAO,IAAIqB,WAApB,QAAuC,0BAAvC;AACA,SAASrB,OAAO,IAAIsB,eAApB,QAA2C,8BAA3C;AACA,SAAStB,OAAO,I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BAAvC;AACA,SAAS3D,OAAO,IAAI4D,uBAApB,QAAmD,sCAAnD;AACA,SAAS5D,OAAO,IAAI6D,oBAApB,QAAgD,mCAAhD;AACA,SAAS7D,OAAO,IAAI8D,MAApB,QAAkC,qBAAlC;AACA,SAAS9D,OAAO,IAAI+D,OAApB,QAAmC,sBAAnC;AACA,SAASC,YAAT,QAA6B,2BAA7B;AACA,SAAShE,OAAO,IAAIiE,OAApB,QAAmC,sBAAnC,C,CAEA","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\n\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 {\n ActionSheet,\n ActionSheetItem,\n ActionSheetCancel,\n} from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\n\nexport {\n Center,\n Circle,\n Square,\n Row,\n Stack,\n Spacer,\n} from \"./components/Layout\";\n\nexport {\n RadioButton,\n RadioButtonGroup,\n RadioButtonRow,\n RadioButtonFieldGroup,\n} from \"./components/RadioButton/index\";\n\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\";\nexport { default as Youtube } from \"./components/Youtube\";\n\n// a comment to fix sourcemap comment issue\n"]}
|
|
@@ -2,7 +2,7 @@ import { COMPONENT_TYPES, createResizeModeProp, createColorProp } from "@draftbi
|
|
|
2
2
|
export const SEED_DATA = [{
|
|
3
3
|
name: "Carousel",
|
|
4
4
|
tag: "Carousel",
|
|
5
|
-
category: COMPONENT_TYPES.
|
|
5
|
+
category: COMPONENT_TYPES.deprecated,
|
|
6
6
|
description: "A horizontal scrolling carousel of images",
|
|
7
7
|
layout: {
|
|
8
8
|
height: 250
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Carousel.ts"],"names":["COMPONENT_TYPES","createResizeModeProp","createColorProp","SEED_DATA","name","tag","category","
|
|
1
|
+
{"version":3,"sources":["Carousel.ts"],"names":["COMPONENT_TYPES","createResizeModeProp","createColorProp","SEED_DATA","name","tag","category","deprecated","description","layout","height","props","resizeMode","dotColor","label"],"mappings":"AAAA,SACEA,eADF,EAEEC,oBAFF,EAGEC,eAHF,QAIO,iBAJP;AAMA,OAAO,MAAMC,SAAS,GAAG,CACvB;AACEC,EAAAA,IAAI,EAAE,UADR;AAEEC,EAAAA,GAAG,EAAE,UAFP;AAGEC,EAAAA,QAAQ,EAAEN,eAAe,CAACO,UAH5B;AAIEC,EAAAA,WAAW,EAAE,2CAJf;AAKEC,EAAAA,MAAM,EAAE;AACNC,IAAAA,MAAM,EAAE;AADF,GALV;AAQEC,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAEX,oBAAoB,EAD3B;AAELY,IAAAA,QAAQ,EAAEX,eAAe,CAAC;AACxBY,MAAAA,KAAK,EAAE;AADiB,KAAD;AAFpB;AART,CADuB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createResizeModeProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = [\n {\n name: \"Carousel\",\n tag: \"Carousel\",\n category: COMPONENT_TYPES.deprecated,\n description: \"A horizontal scrolling carousel of images\",\n layout: {\n height: 250,\n },\n props: {\n resizeMode: createResizeModeProp(),\n dotColor: createColorProp({\n label: \"Dot color\",\n }),\n },\n },\n];\n"]}
|
|
@@ -31,37 +31,38 @@ const SEED_DATA_PROPS = {
|
|
|
31
31
|
required: false,
|
|
32
32
|
group: GROUPS.basic
|
|
33
33
|
},
|
|
34
|
-
locale: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
minuteInterval: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
timeZoneOffsetInMinutes: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
34
|
+
// locale: {
|
|
35
|
+
// label: "Locale",
|
|
36
|
+
// description: "Locale for the datepicker. Must be a valid Locale",
|
|
37
|
+
// formType: FORM_TYPES.string,
|
|
38
|
+
// propType: PROP_TYPES.STRING,
|
|
39
|
+
// defaultValue: null,
|
|
40
|
+
// editable: true,
|
|
41
|
+
// required: false,
|
|
42
|
+
// group: GROUPS.basic,
|
|
43
|
+
// },
|
|
44
|
+
// minuteInterval: {
|
|
45
|
+
// label: "Minute Interval",
|
|
46
|
+
// description: "The interval at which minutes can be selected",
|
|
47
|
+
// formType: FORM_TYPES.flatArray,
|
|
48
|
+
// propType: PROP_TYPES.NUMBER,
|
|
49
|
+
// options: [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30],
|
|
50
|
+
// defaultValue: null,
|
|
51
|
+
// editable: true,
|
|
52
|
+
// required: false,
|
|
53
|
+
// group: GROUPS.basic,
|
|
54
|
+
// },
|
|
55
|
+
// timeZoneOffsetInMinutes: {
|
|
56
|
+
// label: "Time zone offset",
|
|
57
|
+
// description:
|
|
58
|
+
// "By default, the datepicker uses the device's timezone. This will allow you to offset it",
|
|
59
|
+
// formType: FORM_TYPES.number,
|
|
60
|
+
// propType: PROP_TYPES.NUMBER,
|
|
61
|
+
// defaultValue: null,
|
|
62
|
+
// editable: true,
|
|
63
|
+
// required: false,
|
|
64
|
+
// group: GROUPS.basic,
|
|
65
|
+
// },
|
|
65
66
|
disabled: {
|
|
66
67
|
label: "Disabled",
|
|
67
68
|
description: "Whether the picker should be disabled. Will prevent selection and show a greyed out state.",
|
|
@@ -72,16 +73,16 @@ const SEED_DATA_PROPS = {
|
|
|
72
73
|
required: false,
|
|
73
74
|
group: GROUPS.basic
|
|
74
75
|
},
|
|
75
|
-
error: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
},
|
|
76
|
+
// error: {
|
|
77
|
+
// label: "Error",
|
|
78
|
+
// description: "Whether the picker should display the error state",
|
|
79
|
+
// formType: FORM_TYPES.boolean,
|
|
80
|
+
// propType: PROP_TYPES.BOOLEAN,
|
|
81
|
+
// defaultValue: false,
|
|
82
|
+
// editable: true,
|
|
83
|
+
// required: false,
|
|
84
|
+
// group: GROUPS.data,
|
|
85
|
+
// },
|
|
85
86
|
leftIconName: {
|
|
86
87
|
label: "Left icon name",
|
|
87
88
|
description: "The icon to display on the left",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DatePicker.ts"],"names":["COMPONENT_TYPES","FORM_TYPES","PROP_TYPES","FIELD_NAME","GROUPS","Triggers","SEED_DATA_PROPS","label","description","formType","string","propType","STRING","defaultValue","editable","required","group","data","mode","flatArray","options","basic","assistiveText","
|
|
1
|
+
{"version":3,"sources":["DatePicker.ts"],"names":["COMPONENT_TYPES","FORM_TYPES","PROP_TYPES","FIELD_NAME","GROUPS","Triggers","SEED_DATA_PROPS","label","description","formType","string","propType","STRING","defaultValue","editable","required","group","data","mode","flatArray","options","basic","assistiveText","disabled","boolean","BOOLEAN","leftIconName","icon","leftIconMode","rightIconName","fieldName","handlerPropName","valuePropName","SEED_DATA","name","tag","category","input","layout","triggers","OnDateChange","props","type"],"mappings":"AAAA,SACEA,eADF,EAEEC,UAFF,EAGEC,UAHF,EAIEC,UAJF,EAKEC,MALF,EAMEC,QANF,QAOO,iBAPP;AASA,MAAMC,eAAe,GAAG;AACtBC,EAAAA,KAAK,EAAE;AACLA,IAAAA,KAAK,EAAE,OADF;AAELC,IAAAA,WAAW,EAAE,yCAFR;AAGLC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AAE,IALD;AAMbC,IAAAA,QAAQ,EAAE,IANG;AAObC,IAAAA,QAAQ,EAAE,KAPG;AAQbC,IAAAA,KAAK,EAAEZ,MAAM,CAACiB;AARD,GA3GO;AAqHtBS,EAAAA,SAAS,EAAE,EACT,GAAG3B,UADM;AAET4B,IAAAA,eAAe,EAAE,cAFR;AAGTC,IAAAA,aAAa,EAAE,MAHN;AAITnB,IAAAA,YAAY,EAAE;AAJL;AArHW,CAAxB;AA6HA,OAAO,MAAMoB,SAAS,GAAG,CACvB;AACEC,EAAAA,IAAI,EAAE,aADR;AAEEC,EAAAA,GAAG,EAAE,YAFP;AAGE3B,EAAAA,WAAW,EAAE,0DAHf;AAIE4B,EAAAA,QAAQ,EAAEpC,eAAe,CAACqC,KAJ5B;AAKEC,EAAAA,MAAM,EAAE,IALV;AAMEC,EAAAA,QAAQ,EAAE,CAAClC,QAAQ,CAACmC,YAAV,CANZ;AAOEC,EAAAA,KAAK,EAAE,EACL,GAAGnC,eADE;AAELoC,IAAAA,IAAI,EAAE;AACJnC,MAAAA,KAAK,EAAE,YADH;AAEJC,MAAAA,WAAW,EAAE,oBAFT;AAGJC,MAAAA,QAAQ,EAAER,UAAU,CAACkB,SAHjB;AAIJR,MAAAA,QAAQ,EAAET,UAAU,CAACU,MAJjB;AAKJC,MAAAA,YAAY,EAAE,OALV;AAMJO,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,WAAV,CANL;AAOJN,MAAAA,QAAQ,EAAE,IAPN;AAQJC,MAAAA,QAAQ,EAAE,IARN;AASJC,MAAAA,KAAK,EAAEZ,MAAM,CAACiB;AATV;AAFD;AAPT,CADuB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n FIELD_NAME,\n GROUPS,\n Triggers,\n} from \"@draftbit/types\";\n\nconst SEED_DATA_PROPS = {\n label: {\n label: \"Label\",\n description: \"The label to be displayed on the picker\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"Date\",\n editable: true,\n required: true,\n group: GROUPS.data,\n },\n mode: {\n label: \"Mode\",\n description: \"Choose between date, time and datetime\",\n defaultValue: \"date\",\n editable: true,\n required: true,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n options: [\"date\", \"time\", \"datetime\"],\n group: GROUPS.basic,\n },\n assistiveText: {\n label: \"Assistive text\",\n description: \"Helper text to display below the picker\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n editable: true,\n required: false,\n group: GROUPS.basic,\n },\n // locale: {\n // label: \"Locale\",\n // description: \"Locale for the datepicker. Must be a valid Locale\",\n // formType: FORM_TYPES.string,\n // propType: PROP_TYPES.STRING,\n // defaultValue: null,\n // editable: true,\n // required: false,\n // group: GROUPS.basic,\n // },\n // minuteInterval: {\n // label: \"Minute Interval\",\n // description: \"The interval at which minutes can be selected\",\n // formType: FORM_TYPES.flatArray,\n // propType: PROP_TYPES.NUMBER,\n // options: [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30],\n // defaultValue: null,\n // editable: true,\n // required: false,\n // group: GROUPS.basic,\n // },\n // timeZoneOffsetInMinutes: {\n // label: \"Time zone offset\",\n // description:\n // \"By default, the datepicker uses the device's timezone. This will allow you to offset it\",\n // formType: FORM_TYPES.number,\n // propType: PROP_TYPES.NUMBER,\n // defaultValue: null,\n // editable: true,\n // required: false,\n // group: GROUPS.basic,\n // },\n disabled: {\n label: \"Disabled\",\n description:\n \"Whether the picker should be disabled. Will prevent selection and show a greyed out state.\",\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: false,\n editable: true,\n required: false,\n group: GROUPS.basic,\n },\n // error: {\n // label: \"Error\",\n // description: \"Whether the picker should display the error state\",\n // formType: FORM_TYPES.boolean,\n // propType: PROP_TYPES.BOOLEAN,\n // defaultValue: false,\n // editable: true,\n // required: false,\n // group: GROUPS.data,\n // },\n leftIconName: {\n label: \"Left icon name\",\n description: \"The icon to display on the left\",\n formType: FORM_TYPES.icon,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n editable: true,\n required: false,\n group: GROUPS.basic,\n },\n leftIconMode: {\n label: \"Left icon mode\",\n description:\n \"The mode of the icon to display on the left. 'inset' or 'outset'.\",\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n defaultValue: \"inset\",\n options: [\"inset\", \"outset\"],\n editable: true,\n required: true,\n group: GROUPS.basic,\n },\n rightIconName: {\n label: \"Right icon name\",\n description: \"The icon to display on the right\",\n formType: FORM_TYPES.icon,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n editable: true,\n required: false,\n group: GROUPS.basic,\n },\n fieldName: {\n ...FIELD_NAME,\n handlerPropName: \"onDateChange\",\n valuePropName: \"date\",\n defaultValue: \"date\",\n },\n};\n\nexport const SEED_DATA = [\n {\n name: \"Date Picker\",\n tag: \"DatePicker\",\n description: \"A component used to select a date from a visual calendar\",\n category: COMPONENT_TYPES.input,\n layout: null,\n triggers: [Triggers.OnDateChange],\n props: {\n ...SEED_DATA_PROPS,\n type: {\n label: \"Appearance\",\n description: \"Type of Datepicker\",\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n defaultValue: \"solid\",\n options: [\"solid\", \"underline\"],\n editable: true,\n required: true,\n group: GROUPS.basic,\n },\n },\n },\n];\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
declare type Props = {
|
|
4
|
+
videoId: string;
|
|
5
|
+
playlist: string;
|
|
6
|
+
style: StyleProp<ViewStyle>;
|
|
7
|
+
mute: boolean;
|
|
8
|
+
autoplay: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Youtube: ({ videoId, playlist, style, mute, autoplay }: Props) => JSX.Element;
|
|
11
|
+
export default Youtube;
|
|
12
|
+
export declare const SEED_DATA: {
|
|
13
|
+
name: string;
|
|
14
|
+
tag: string;
|
|
15
|
+
description: string;
|
|
16
|
+
category: string;
|
|
17
|
+
layout: {
|
|
18
|
+
width: string;
|
|
19
|
+
};
|
|
20
|
+
props: {
|
|
21
|
+
videoId: any;
|
|
22
|
+
playlist: any;
|
|
23
|
+
mute: {
|
|
24
|
+
label: string;
|
|
25
|
+
description: string;
|
|
26
|
+
formType: string;
|
|
27
|
+
propType: string;
|
|
28
|
+
defaultValue: boolean;
|
|
29
|
+
editable: boolean;
|
|
30
|
+
required: boolean;
|
|
31
|
+
group: string;
|
|
32
|
+
};
|
|
33
|
+
autoplay: {
|
|
34
|
+
label: string;
|
|
35
|
+
description: string;
|
|
36
|
+
formType: string;
|
|
37
|
+
propType: string;
|
|
38
|
+
defaultValue: boolean;
|
|
39
|
+
editable: boolean;
|
|
40
|
+
required: boolean;
|
|
41
|
+
group: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -48,3 +48,4 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
|
|
|
48
48
|
export { default as Slider } from "./components/Slider";
|
|
49
49
|
export { default as Stepper } from "./components/Stepper";
|
|
50
50
|
export { useAuthState } from "./components/useAuthState";
|
|
51
|
+
export { default as Youtube } from "./components/Youtube";
|
|
@@ -48,37 +48,6 @@ export declare const SEED_DATA: {
|
|
|
48
48
|
required: boolean;
|
|
49
49
|
group: string;
|
|
50
50
|
};
|
|
51
|
-
locale: {
|
|
52
|
-
label: string;
|
|
53
|
-
description: string;
|
|
54
|
-
formType: string;
|
|
55
|
-
propType: string;
|
|
56
|
-
defaultValue: null;
|
|
57
|
-
editable: boolean;
|
|
58
|
-
required: boolean;
|
|
59
|
-
group: string;
|
|
60
|
-
};
|
|
61
|
-
minuteInterval: {
|
|
62
|
-
label: string;
|
|
63
|
-
description: string;
|
|
64
|
-
formType: string;
|
|
65
|
-
propType: string;
|
|
66
|
-
options: number[];
|
|
67
|
-
defaultValue: null;
|
|
68
|
-
editable: boolean;
|
|
69
|
-
required: boolean;
|
|
70
|
-
group: string;
|
|
71
|
-
};
|
|
72
|
-
timeZoneOffsetInMinutes: {
|
|
73
|
-
label: string;
|
|
74
|
-
description: string;
|
|
75
|
-
formType: string;
|
|
76
|
-
propType: string;
|
|
77
|
-
defaultValue: null;
|
|
78
|
-
editable: boolean;
|
|
79
|
-
required: boolean;
|
|
80
|
-
group: string;
|
|
81
|
-
};
|
|
82
51
|
disabled: {
|
|
83
52
|
label: string;
|
|
84
53
|
description: string;
|
|
@@ -89,16 +58,6 @@ export declare const SEED_DATA: {
|
|
|
89
58
|
required: boolean;
|
|
90
59
|
group: string;
|
|
91
60
|
};
|
|
92
|
-
error: {
|
|
93
|
-
label: string;
|
|
94
|
-
description: string;
|
|
95
|
-
formType: string;
|
|
96
|
-
propType: string;
|
|
97
|
-
defaultValue: boolean;
|
|
98
|
-
editable: boolean;
|
|
99
|
-
required: boolean;
|
|
100
|
-
group: string;
|
|
101
|
-
};
|
|
102
61
|
leftIconName: {
|
|
103
62
|
label: string;
|
|
104
63
|
description: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "44.2.2",
|
|
3
|
+
"version": "44.2.3-f311f8.2+f311f831",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -54,7 +54,9 @@
|
|
|
54
54
|
"lodash.tonumber": "^4.0.3",
|
|
55
55
|
"react-native-modal-datetime-picker": "^13.0.0",
|
|
56
56
|
"react-native-typography": "^1.4.1",
|
|
57
|
-
"react-native-web-swiper": "^2.2.3"
|
|
57
|
+
"react-native-web-swiper": "^2.2.3",
|
|
58
|
+
"react-native-web-webview": "^1.0.2",
|
|
59
|
+
"react-native-youtube-iframe": "^2.2.2"
|
|
58
60
|
},
|
|
59
61
|
"devDependencies": {
|
|
60
62
|
"@types/color": "^3.0.1",
|
|
@@ -78,5 +80,5 @@
|
|
|
78
80
|
]
|
|
79
81
|
]
|
|
80
82
|
},
|
|
81
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "f311f83116a43667cc85f62adb9eb60f4716fd61"
|
|
82
84
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
};
|
package/src/index.js
CHANGED
|
@@ -49,4 +49,5 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
|
|
|
49
49
|
export { default as Slider } from "./components/Slider";
|
|
50
50
|
export { default as Stepper } from "./components/Stepper";
|
|
51
51
|
export { useAuthState } from "./components/useAuthState";
|
|
52
|
+
export { default as Youtube } from "./components/Youtube";
|
|
52
53
|
// a comment to fix sourcemap comment issue
|
package/src/index.tsx
CHANGED
|
@@ -69,5 +69,6 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
|
|
|
69
69
|
export { default as Slider } from "./components/Slider";
|
|
70
70
|
export { default as Stepper } from "./components/Stepper";
|
|
71
71
|
export { useAuthState } from "./components/useAuthState";
|
|
72
|
+
export { default as Youtube } from "./components/Youtube";
|
|
72
73
|
|
|
73
74
|
// a comment to fix sourcemap comment issue
|
package/src/mappings/Carousel.js
CHANGED
package/src/mappings/Carousel.ts
CHANGED