@draftbit/core 46.9.1-310331.2 → 46.9.1-328e35.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/BottomSheet/BottomSheet.js +88 -0
- package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +464 -0
- package/lib/commonjs/components/BottomSheet/index.js +13 -0
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
- package/lib/commonjs/components/CircleImage.js +15 -1
- package/lib/commonjs/components/Container.js +4 -15
- package/lib/commonjs/components/DeprecatedFAB.js +3 -21
- package/lib/commonjs/components/Elevation.js +14 -2
- package/lib/commonjs/components/NumberInput.js +3 -12
- package/lib/commonjs/components/Picker/PickerComponent.web.js +3 -20
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +5 -23
- package/lib/commonjs/components/TextField.js +76 -28
- package/lib/commonjs/index.js +7 -7
- package/lib/commonjs/mappings/ActionSheet.js +1 -1
- package/lib/commonjs/mappings/ActionSheetCancel.js +1 -1
- package/lib/commonjs/mappings/ActionSheetItem.js +1 -1
- package/lib/commonjs/mappings/BottomSheet.js +70 -0
- package/lib/commonjs/mappings/MapCallout.js +1 -1
- package/lib/commonjs/mappings/MapMarker.js +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +80 -0
- package/lib/module/components/BottomSheet/BottomSheetComponent.js +470 -0
- package/lib/module/components/BottomSheet/index.js +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/mappings/ActionSheet.js +1 -1
- package/lib/module/mappings/ActionSheetCancel.js +1 -1
- package/lib/module/mappings/ActionSheetItem.js +1 -1
- package/lib/module/mappings/BottomSheet.js +63 -0
- package/lib/module/mappings/MapCallout.js +2 -2
- package/lib/module/mappings/MapMarker.js +2 -2
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +20 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts +170 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts +2 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/ActionSheet.d.ts.map +1 -1
- package/lib/typescript/src/mappings/ActionSheetCancel.d.ts.map +1 -1
- package/lib/typescript/src/mappings/ActionSheetItem.d.ts.map +1 -1
- package/lib/typescript/src/mappings/BottomSheet.d.ts +115 -0
- package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/mappings/MapCallout.d.ts.map +1 -1
- package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/components/BottomSheet/BottomSheet.js +56 -0
- package/src/components/BottomSheet/BottomSheet.tsx +120 -0
- package/src/components/BottomSheet/BottomSheetComponent.js +437 -0
- package/src/components/BottomSheet/BottomSheetComponent.tsx +895 -0
- package/src/components/BottomSheet/index.js +1 -0
- package/src/components/BottomSheet/index.ts +1 -0
- package/src/index.js +1 -1
- package/src/index.tsx +1 -1
- package/src/mappings/ActionSheet.js +4 -1
- package/src/mappings/ActionSheet.ts +4 -1
- package/src/mappings/ActionSheetCancel.js +4 -1
- package/src/mappings/ActionSheetCancel.ts +4 -1
- package/src/mappings/ActionSheetItem.js +4 -1
- package/src/mappings/ActionSheetItem.ts +4 -1
- package/src/mappings/BottomSheet.js +63 -0
- package/src/mappings/BottomSheet.ts +77 -0
- package/src/mappings/MapCallout.js +6 -2
- package/src/mappings/MapCallout.ts +6 -2
- package/src/mappings/MapMarker.js +6 -2
- package/src/mappings/MapMarker.ts +6 -2
- package/lib/commonjs/components/YotubePlayer.js +0 -37
- package/lib/commonjs/mappings/YoutubePlayer.js +0 -44
- package/lib/module/components/YotubePlayer.js +0 -29
- package/lib/module/mappings/YoutubePlayer.js +0 -37
- package/lib/typescript/src/components/YotubePlayer.d.ts +0 -12
- package/lib/typescript/src/components/YotubePlayer.d.ts.map +0 -1
- package/lib/typescript/src/mappings/YoutubePlayer.d.ts +0 -37
- package/lib/typescript/src/mappings/YoutubePlayer.d.ts.map +0 -1
- package/src/components/YotubePlayer.js +0 -9
- package/src/components/YotubePlayer.tsx +0 -37
- package/src/mappings/YoutubePlayer.js +0 -37
- package/src/mappings/YoutubePlayer.ts +0 -43
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BottomSheet } from "./BottomSheet";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BottomSheet } from "./BottomSheet";
|
package/src/index.js
CHANGED
|
@@ -35,7 +35,7 @@ export { default as Shadow } from "./components/Shadow";
|
|
|
35
35
|
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
36
36
|
export { TabView, TabViewItem } from "./components/TabView";
|
|
37
37
|
export { default as Markdown } from "./components/Markdown";
|
|
38
|
-
export {
|
|
38
|
+
export { BottomSheet } from "./components/BottomSheet";
|
|
39
39
|
/* Deprecated: Fix or Delete! */
|
|
40
40
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
41
41
|
export { default as Picker } from "./components/Picker/Picker";
|
package/src/index.tsx
CHANGED
|
@@ -58,7 +58,7 @@ export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
|
58
58
|
export { TabView, TabViewItem } from "./components/TabView";
|
|
59
59
|
export { default as Markdown } from "./components/Markdown";
|
|
60
60
|
|
|
61
|
-
export {
|
|
61
|
+
export { BottomSheet } from "./components/BottomSheet";
|
|
62
62
|
|
|
63
63
|
/* Deprecated: Fix or Delete! */
|
|
64
64
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
@@ -4,7 +4,10 @@ export const SEED_DATA = {
|
|
|
4
4
|
tag: "ActionSheet",
|
|
5
5
|
description: "Action Sheet container",
|
|
6
6
|
category: COMPONENT_TYPES.actionsheet,
|
|
7
|
-
stylesPanelSections: [
|
|
7
|
+
stylesPanelSections: [
|
|
8
|
+
StylesPanelSections.Margins,
|
|
9
|
+
StylesPanelSections.Effects,
|
|
10
|
+
],
|
|
8
11
|
props: {
|
|
9
12
|
visible: createStaticBoolProp({
|
|
10
13
|
group: GROUPS.data,
|
|
@@ -10,7 +10,10 @@ export const SEED_DATA = {
|
|
|
10
10
|
tag: "ActionSheet",
|
|
11
11
|
description: "Action Sheet container",
|
|
12
12
|
category: COMPONENT_TYPES.actionsheet,
|
|
13
|
-
stylesPanelSections: [
|
|
13
|
+
stylesPanelSections: [
|
|
14
|
+
StylesPanelSections.Margins,
|
|
15
|
+
StylesPanelSections.Effects,
|
|
16
|
+
],
|
|
14
17
|
props: {
|
|
15
18
|
visible: createStaticBoolProp({
|
|
16
19
|
group: GROUPS.data,
|
|
@@ -3,7 +3,10 @@ export const SEED_DATA = {
|
|
|
3
3
|
name: "Action Sheet Cancel",
|
|
4
4
|
tag: "ActionSheetCancel",
|
|
5
5
|
description: "Action Sheet cancel",
|
|
6
|
-
stylesPanelSections: [
|
|
6
|
+
stylesPanelSections: [
|
|
7
|
+
StylesPanelSections.Margins,
|
|
8
|
+
StylesPanelSections.Effects,
|
|
9
|
+
],
|
|
7
10
|
category: COMPONENT_TYPES.actionsheet,
|
|
8
11
|
triggers: [Triggers.OnPress],
|
|
9
12
|
props: {
|
|
@@ -12,7 +12,10 @@ export const SEED_DATA = {
|
|
|
12
12
|
name: "Action Sheet Cancel",
|
|
13
13
|
tag: "ActionSheetCancel",
|
|
14
14
|
description: "Action Sheet cancel",
|
|
15
|
-
stylesPanelSections: [
|
|
15
|
+
stylesPanelSections: [
|
|
16
|
+
StylesPanelSections.Margins,
|
|
17
|
+
StylesPanelSections.Effects,
|
|
18
|
+
],
|
|
16
19
|
category: COMPONENT_TYPES.actionsheet,
|
|
17
20
|
triggers: [Triggers.OnPress],
|
|
18
21
|
props: {
|
|
@@ -4,7 +4,10 @@ export const SEED_DATA = {
|
|
|
4
4
|
tag: "ActionSheetItem",
|
|
5
5
|
description: "Action Sheet item",
|
|
6
6
|
category: COMPONENT_TYPES.actionsheet,
|
|
7
|
-
stylesPanelSections: [
|
|
7
|
+
stylesPanelSections: [
|
|
8
|
+
StylesPanelSections.Margins,
|
|
9
|
+
StylesPanelSections.Effects,
|
|
10
|
+
],
|
|
8
11
|
triggers: [Triggers.OnPress],
|
|
9
12
|
layout: {
|
|
10
13
|
textAlign: "center",
|
|
@@ -13,7 +13,10 @@ export const SEED_DATA = {
|
|
|
13
13
|
tag: "ActionSheetItem",
|
|
14
14
|
description: "Action Sheet item",
|
|
15
15
|
category: COMPONENT_TYPES.actionsheet,
|
|
16
|
-
stylesPanelSections: [
|
|
16
|
+
stylesPanelSections: [
|
|
17
|
+
StylesPanelSections.Margins,
|
|
18
|
+
StylesPanelSections.Effects,
|
|
19
|
+
],
|
|
17
20
|
triggers: [Triggers.OnPress],
|
|
18
21
|
layout: {
|
|
19
22
|
textAlign: "center",
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticNumberProp, createArrayProp, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Bottom Sheet",
|
|
4
|
+
tag: "BottomSheet",
|
|
5
|
+
description: "A draggable Bottom sheet that snaps to specific points. Renders children in ScrollView",
|
|
6
|
+
category: COMPONENT_TYPES.bottomsheet,
|
|
7
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
|
+
triggers: [Triggers.OnSettle],
|
|
9
|
+
props: {
|
|
10
|
+
onSettle: createActionProp({
|
|
11
|
+
label: "On settle",
|
|
12
|
+
description: "Action to execute when sheet settles on a snap point",
|
|
13
|
+
}),
|
|
14
|
+
snapPoints: createArrayProp({
|
|
15
|
+
label: "Snap points",
|
|
16
|
+
description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
|
|
17
|
+
defaultValue: ["10%", "50%", "80%"],
|
|
18
|
+
}),
|
|
19
|
+
initialSnapIndex: createStaticNumberProp({
|
|
20
|
+
label: "Initial snap index",
|
|
21
|
+
description: "Index of the snap point to be used as the initial point",
|
|
22
|
+
defaultValue: 0,
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
showHandle: createStaticBoolProp({
|
|
26
|
+
label: "Show handle",
|
|
27
|
+
description: "Whether to show the top sheet handle or not",
|
|
28
|
+
defaultValue: true,
|
|
29
|
+
}),
|
|
30
|
+
handleColor: createColorProp({
|
|
31
|
+
label: "Handle color",
|
|
32
|
+
description: "Color of the top handle",
|
|
33
|
+
defaultValue: "divider",
|
|
34
|
+
}),
|
|
35
|
+
topBorderRadius: createStaticNumberProp({
|
|
36
|
+
label: "Top border radius",
|
|
37
|
+
description: "Border radius of top corners",
|
|
38
|
+
defaultValue: 20,
|
|
39
|
+
required: false,
|
|
40
|
+
}),
|
|
41
|
+
borderWidth: createStaticNumberProp({
|
|
42
|
+
label: "Border width",
|
|
43
|
+
description: "Width of bottom sheet borders",
|
|
44
|
+
defaultValue: 1,
|
|
45
|
+
required: false,
|
|
46
|
+
}),
|
|
47
|
+
borderColor: createColorProp({
|
|
48
|
+
label: "Border color",
|
|
49
|
+
description: "Color of bottom sheet borders",
|
|
50
|
+
defaultValue: "divider",
|
|
51
|
+
}),
|
|
52
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
53
|
+
label: "Show Vertical Scroll Indicator",
|
|
54
|
+
description: "When true, shows a vertical scroll indicator. The default value is true.",
|
|
55
|
+
defaultValue: true,
|
|
56
|
+
}),
|
|
57
|
+
bounces: createStaticBoolProp({
|
|
58
|
+
label: "Bounce",
|
|
59
|
+
description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
|
|
60
|
+
defaultValue: true,
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createStaticBoolProp,
|
|
4
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
5
|
+
Triggers,
|
|
6
|
+
createActionProp,
|
|
7
|
+
createColorProp,
|
|
8
|
+
createStaticNumberProp,
|
|
9
|
+
createArrayProp,
|
|
10
|
+
} from "@draftbit/types";
|
|
11
|
+
|
|
12
|
+
export const SEED_DATA = {
|
|
13
|
+
name: "Bottom Sheet",
|
|
14
|
+
tag: "BottomSheet",
|
|
15
|
+
description:
|
|
16
|
+
"A draggable Bottom sheet that snaps to specific points. Renders children in ScrollView",
|
|
17
|
+
category: COMPONENT_TYPES.bottomsheet,
|
|
18
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
19
|
+
triggers: [Triggers.OnSettle],
|
|
20
|
+
props: {
|
|
21
|
+
onSettle: createActionProp({
|
|
22
|
+
label: "On settle",
|
|
23
|
+
description: "Action to execute when sheet settles on a snap point",
|
|
24
|
+
}),
|
|
25
|
+
snapPoints: createArrayProp({
|
|
26
|
+
label: "Snap points",
|
|
27
|
+
description:
|
|
28
|
+
"An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
|
|
29
|
+
defaultValue: ["10%", "50%", "80%"],
|
|
30
|
+
}),
|
|
31
|
+
initialSnapIndex: createStaticNumberProp({
|
|
32
|
+
label: "Initial snap index",
|
|
33
|
+
description: "Index of the snap point to be used as the initial point",
|
|
34
|
+
defaultValue: 0,
|
|
35
|
+
required: false,
|
|
36
|
+
}),
|
|
37
|
+
showHandle: createStaticBoolProp({
|
|
38
|
+
label: "Show handle",
|
|
39
|
+
description: "Whether to show the top sheet handle or not",
|
|
40
|
+
defaultValue: true,
|
|
41
|
+
}),
|
|
42
|
+
handleColor: createColorProp({
|
|
43
|
+
label: "Handle color",
|
|
44
|
+
description: "Color of the top handle",
|
|
45
|
+
defaultValue: "divider",
|
|
46
|
+
}),
|
|
47
|
+
topBorderRadius: createStaticNumberProp({
|
|
48
|
+
label: "Top border radius",
|
|
49
|
+
description: "Border radius of top corners",
|
|
50
|
+
defaultValue: 20,
|
|
51
|
+
required: false,
|
|
52
|
+
}),
|
|
53
|
+
borderWidth: createStaticNumberProp({
|
|
54
|
+
label: "Border width",
|
|
55
|
+
description: "Width of bottom sheet borders",
|
|
56
|
+
defaultValue: 1,
|
|
57
|
+
required: false,
|
|
58
|
+
}),
|
|
59
|
+
borderColor: createColorProp({
|
|
60
|
+
label: "Border color",
|
|
61
|
+
description: "Color of bottom sheet borders",
|
|
62
|
+
defaultValue: "divider",
|
|
63
|
+
}),
|
|
64
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
65
|
+
label: "Show Vertical Scroll Indicator",
|
|
66
|
+
description:
|
|
67
|
+
"When true, shows a vertical scroll indicator. The default value is true.",
|
|
68
|
+
defaultValue: true,
|
|
69
|
+
}),
|
|
70
|
+
bounces: createStaticBoolProp({
|
|
71
|
+
label: "Bounce",
|
|
72
|
+
description:
|
|
73
|
+
"When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
|
|
74
|
+
defaultValue: true,
|
|
75
|
+
}),
|
|
76
|
+
},
|
|
77
|
+
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createActionProp, createBoolProp, GROUPS, Triggers,
|
|
1
|
+
import { COMPONENT_TYPES, createActionProp, createBoolProp, GROUPS, Triggers, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Map Callout",
|
|
4
4
|
tag: "MapCallout",
|
|
5
5
|
packageName: "@draftbit/maps",
|
|
6
|
-
stylesPanelSections:
|
|
6
|
+
stylesPanelSections: [
|
|
7
|
+
StylesPanelSections.Size,
|
|
8
|
+
StylesPanelSections.Margins,
|
|
9
|
+
StylesPanelSections.Effects,
|
|
10
|
+
],
|
|
7
11
|
description: "An info window to display on top of a marker when it is clicked",
|
|
8
12
|
category: COMPONENT_TYPES.map,
|
|
9
13
|
triggers: [Triggers.OnPress],
|
|
@@ -4,14 +4,18 @@ import {
|
|
|
4
4
|
createBoolProp,
|
|
5
5
|
GROUPS,
|
|
6
6
|
Triggers,
|
|
7
|
-
|
|
7
|
+
StylesPanelSections,
|
|
8
8
|
} from "@draftbit/types";
|
|
9
9
|
|
|
10
10
|
export const SEED_DATA = {
|
|
11
11
|
name: "Map Callout",
|
|
12
12
|
tag: "MapCallout",
|
|
13
13
|
packageName: "@draftbit/maps",
|
|
14
|
-
stylesPanelSections:
|
|
14
|
+
stylesPanelSections: [
|
|
15
|
+
StylesPanelSections.Size,
|
|
16
|
+
StylesPanelSections.Margins,
|
|
17
|
+
StylesPanelSections.Effects,
|
|
18
|
+
],
|
|
15
19
|
description:
|
|
16
20
|
"An info window to display on top of a marker when it is clicked",
|
|
17
21
|
category: COMPONENT_TYPES.map,
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS,
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Map Marker",
|
|
4
4
|
tag: "MapMarker",
|
|
5
5
|
packageName: "@draftbit/maps",
|
|
6
6
|
description: "A marker to show inside map view",
|
|
7
7
|
category: COMPONENT_TYPES.map,
|
|
8
|
-
stylesPanelSections:
|
|
8
|
+
stylesPanelSections: [
|
|
9
|
+
StylesPanelSections.Size,
|
|
10
|
+
StylesPanelSections.Margins,
|
|
11
|
+
StylesPanelSections.Effects,
|
|
12
|
+
],
|
|
9
13
|
layout: {},
|
|
10
14
|
props: {
|
|
11
15
|
latitude: createNumberProp({
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
createNumberProp,
|
|
6
6
|
createTextProp,
|
|
7
7
|
GROUPS,
|
|
8
|
-
|
|
8
|
+
StylesPanelSections,
|
|
9
9
|
} from "@draftbit/types";
|
|
10
10
|
|
|
11
11
|
export const SEED_DATA = {
|
|
@@ -14,7 +14,11 @@ export const SEED_DATA = {
|
|
|
14
14
|
packageName: "@draftbit/maps",
|
|
15
15
|
description: "A marker to show inside map view",
|
|
16
16
|
category: COMPONENT_TYPES.map,
|
|
17
|
-
stylesPanelSections:
|
|
17
|
+
stylesPanelSections: [
|
|
18
|
+
StylesPanelSections.Size,
|
|
19
|
+
StylesPanelSections.Margins,
|
|
20
|
+
StylesPanelSections.Effects,
|
|
21
|
+
],
|
|
18
22
|
layout: {},
|
|
19
23
|
props: {
|
|
20
24
|
latitude: createNumberProp({
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNativeYoutubeIframe = _interopRequireDefault(require("react-native-youtube-iframe"));
|
|
9
|
-
var _utilities = require("../utilities");
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
const YoutubePlayer = _ref => {
|
|
12
|
-
let {
|
|
13
|
-
videoId,
|
|
14
|
-
playlist,
|
|
15
|
-
mute = false,
|
|
16
|
-
autoplay = false,
|
|
17
|
-
style
|
|
18
|
-
} = _ref;
|
|
19
|
-
const {
|
|
20
|
-
viewStyles
|
|
21
|
-
} = (0, _utilities.extractStyles)(style);
|
|
22
|
-
const {
|
|
23
|
-
height,
|
|
24
|
-
width
|
|
25
|
-
} = viewStyles;
|
|
26
|
-
return /*#__PURE__*/_react.default.createElement(_reactNativeYoutubeIframe.default, {
|
|
27
|
-
height: height,
|
|
28
|
-
width: width,
|
|
29
|
-
play: autoplay,
|
|
30
|
-
videoId: videoId,
|
|
31
|
-
playList: playlist,
|
|
32
|
-
mute: mute,
|
|
33
|
-
webViewStyle: style
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
var _default = YoutubePlayer;
|
|
37
|
-
exports.default = _default;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SEED_DATA = void 0;
|
|
7
|
-
var _types = require("@draftbit/types");
|
|
8
|
-
const SEED_DATA = {
|
|
9
|
-
name: "Youtube Player",
|
|
10
|
-
tag: "YoutubePlayer",
|
|
11
|
-
description: "Plays a youtube video form a Youtube video or playlist id",
|
|
12
|
-
doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
|
|
13
|
-
code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
|
|
14
|
-
category: _types.COMPONENT_TYPES.media,
|
|
15
|
-
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
16
|
-
layout: {
|
|
17
|
-
height: 250
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
videoId: (0, _types.createTextProp)({
|
|
21
|
-
label: "Video ID",
|
|
22
|
-
description: "VideoId of the Youtube video.",
|
|
23
|
-
defaultValue: "nwMUpDESXrI"
|
|
24
|
-
}),
|
|
25
|
-
playlist: (0, _types.createTextProp)({
|
|
26
|
-
label: "Playlist",
|
|
27
|
-
description: "Playlist of the Youtube videos.",
|
|
28
|
-
defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks"
|
|
29
|
-
}),
|
|
30
|
-
mute: (0, _types.createStaticBoolProp)({
|
|
31
|
-
label: "Mute Audio",
|
|
32
|
-
description: "Mute the audio of the video.",
|
|
33
|
-
defaultValue: false,
|
|
34
|
-
required: false
|
|
35
|
-
}),
|
|
36
|
-
autoplay: (0, _types.createStaticBoolProp)({
|
|
37
|
-
label: "Auto Play",
|
|
38
|
-
description: "Autoplay the video on load.",
|
|
39
|
-
defaultValue: false,
|
|
40
|
-
required: false
|
|
41
|
-
})
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import YoutubePlayerComponent from "react-native-youtube-iframe";
|
|
3
|
-
import { extractStyles } from "../utilities";
|
|
4
|
-
const YoutubePlayer = _ref => {
|
|
5
|
-
let {
|
|
6
|
-
videoId,
|
|
7
|
-
playlist,
|
|
8
|
-
mute = false,
|
|
9
|
-
autoplay = false,
|
|
10
|
-
style
|
|
11
|
-
} = _ref;
|
|
12
|
-
const {
|
|
13
|
-
viewStyles
|
|
14
|
-
} = extractStyles(style);
|
|
15
|
-
const {
|
|
16
|
-
height,
|
|
17
|
-
width
|
|
18
|
-
} = viewStyles;
|
|
19
|
-
return /*#__PURE__*/React.createElement(YoutubePlayerComponent, {
|
|
20
|
-
height: height,
|
|
21
|
-
width: width,
|
|
22
|
-
play: autoplay,
|
|
23
|
-
videoId: videoId,
|
|
24
|
-
playList: playlist,
|
|
25
|
-
mute: mute,
|
|
26
|
-
webViewStyle: style
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
export default YoutubePlayer;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { BLOCK_STYLES_SECTIONS, COMPONENT_TYPES, createStaticBoolProp, createTextProp } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Youtube Player",
|
|
4
|
-
tag: "YoutubePlayer",
|
|
5
|
-
description: "Plays a youtube video form a Youtube video or playlist id",
|
|
6
|
-
doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
|
|
7
|
-
code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
|
|
8
|
-
category: COMPONENT_TYPES.media,
|
|
9
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
10
|
-
layout: {
|
|
11
|
-
height: 250
|
|
12
|
-
},
|
|
13
|
-
props: {
|
|
14
|
-
videoId: createTextProp({
|
|
15
|
-
label: "Video ID",
|
|
16
|
-
description: "VideoId of the Youtube video.",
|
|
17
|
-
defaultValue: "nwMUpDESXrI"
|
|
18
|
-
}),
|
|
19
|
-
playlist: createTextProp({
|
|
20
|
-
label: "Playlist",
|
|
21
|
-
description: "Playlist of the Youtube videos.",
|
|
22
|
-
defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks"
|
|
23
|
-
}),
|
|
24
|
-
mute: createStaticBoolProp({
|
|
25
|
-
label: "Mute Audio",
|
|
26
|
-
description: "Mute the audio of the video.",
|
|
27
|
-
defaultValue: false,
|
|
28
|
-
required: false
|
|
29
|
-
}),
|
|
30
|
-
autoplay: createStaticBoolProp({
|
|
31
|
-
label: "Auto Play",
|
|
32
|
-
description: "Autoplay the video on load.",
|
|
33
|
-
defaultValue: false,
|
|
34
|
-
required: false
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
interface YoutubePlayerProps {
|
|
4
|
-
videoId?: string;
|
|
5
|
-
playlist?: string;
|
|
6
|
-
mute?: boolean;
|
|
7
|
-
autoplay?: boolean;
|
|
8
|
-
style?: StyleProp<ViewStyle>;
|
|
9
|
-
}
|
|
10
|
-
declare const YoutubePlayer: React.FC<YoutubePlayerProps>;
|
|
11
|
-
export default YoutubePlayer;
|
|
12
|
-
//# sourceMappingURL=YotubePlayer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"YotubePlayer.d.ts","sourceRoot":"","sources":["../../../../src/components/YotubePlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpD,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqB/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare const SEED_DATA: {
|
|
2
|
-
name: string;
|
|
3
|
-
tag: string;
|
|
4
|
-
description: string;
|
|
5
|
-
doc_link: string;
|
|
6
|
-
code_link: string;
|
|
7
|
-
category: string;
|
|
8
|
-
stylesPanelSections: string[];
|
|
9
|
-
layout: {
|
|
10
|
-
height: number;
|
|
11
|
-
};
|
|
12
|
-
props: {
|
|
13
|
-
videoId: any;
|
|
14
|
-
playlist: any;
|
|
15
|
-
mute: {
|
|
16
|
-
label: string;
|
|
17
|
-
description: string;
|
|
18
|
-
formType: string;
|
|
19
|
-
propType: string;
|
|
20
|
-
defaultValue: boolean;
|
|
21
|
-
editable: boolean;
|
|
22
|
-
required: boolean;
|
|
23
|
-
group: string;
|
|
24
|
-
};
|
|
25
|
-
autoplay: {
|
|
26
|
-
label: string;
|
|
27
|
-
description: string;
|
|
28
|
-
formType: string;
|
|
29
|
-
propType: string;
|
|
30
|
-
defaultValue: boolean;
|
|
31
|
-
editable: boolean;
|
|
32
|
-
required: boolean;
|
|
33
|
-
group: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=YoutubePlayer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"YoutubePlayer.d.ts","sourceRoot":"","sources":["../../../../src/mappings/YoutubePlayer.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCrB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import YoutubePlayerComponent from "react-native-youtube-iframe";
|
|
3
|
-
import { extractStyles } from "../utilities";
|
|
4
|
-
const YoutubePlayer = ({ videoId, playlist, mute = false, autoplay = false, style, }) => {
|
|
5
|
-
const { viewStyles } = extractStyles(style);
|
|
6
|
-
const { height, width } = viewStyles;
|
|
7
|
-
return (React.createElement(YoutubePlayerComponent, { height: height, width: width, play: autoplay, videoId: videoId, playList: playlist, mute: mute, webViewStyle: style }));
|
|
8
|
-
};
|
|
9
|
-
export default YoutubePlayer;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
import YoutubePlayerComponent from "react-native-youtube-iframe";
|
|
4
|
-
import { extractStyles } from "../utilities";
|
|
5
|
-
|
|
6
|
-
interface YoutubePlayerProps {
|
|
7
|
-
videoId?: string;
|
|
8
|
-
playlist?: string;
|
|
9
|
-
mute?: boolean;
|
|
10
|
-
autoplay?: boolean;
|
|
11
|
-
style?: StyleProp<ViewStyle>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const YoutubePlayer: React.FC<YoutubePlayerProps> = ({
|
|
15
|
-
videoId,
|
|
16
|
-
playlist,
|
|
17
|
-
mute = false,
|
|
18
|
-
autoplay = false,
|
|
19
|
-
style,
|
|
20
|
-
}) => {
|
|
21
|
-
const { viewStyles } = extractStyles(style);
|
|
22
|
-
const { height, width } = viewStyles;
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<YoutubePlayerComponent
|
|
26
|
-
height={height}
|
|
27
|
-
width={width}
|
|
28
|
-
play={autoplay}
|
|
29
|
-
videoId={videoId}
|
|
30
|
-
playList={playlist}
|
|
31
|
-
mute={mute}
|
|
32
|
-
webViewStyle={style}
|
|
33
|
-
/>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default YoutubePlayer;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { BLOCK_STYLES_SECTIONS, COMPONENT_TYPES, createStaticBoolProp, createTextProp, } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Youtube Player",
|
|
4
|
-
tag: "YoutubePlayer",
|
|
5
|
-
description: "Plays a youtube video form a Youtube video or playlist id",
|
|
6
|
-
doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
|
|
7
|
-
code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
|
|
8
|
-
category: COMPONENT_TYPES.media,
|
|
9
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
10
|
-
layout: {
|
|
11
|
-
height: 250,
|
|
12
|
-
},
|
|
13
|
-
props: {
|
|
14
|
-
videoId: createTextProp({
|
|
15
|
-
label: "Video ID",
|
|
16
|
-
description: "VideoId of the Youtube video.",
|
|
17
|
-
defaultValue: "nwMUpDESXrI",
|
|
18
|
-
}),
|
|
19
|
-
playlist: createTextProp({
|
|
20
|
-
label: "Playlist",
|
|
21
|
-
description: "Playlist of the Youtube videos.",
|
|
22
|
-
defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks",
|
|
23
|
-
}),
|
|
24
|
-
mute: createStaticBoolProp({
|
|
25
|
-
label: "Mute Audio",
|
|
26
|
-
description: "Mute the audio of the video.",
|
|
27
|
-
defaultValue: false,
|
|
28
|
-
required: false,
|
|
29
|
-
}),
|
|
30
|
-
autoplay: createStaticBoolProp({
|
|
31
|
-
label: "Auto Play",
|
|
32
|
-
description: "Autoplay the video on load.",
|
|
33
|
-
defaultValue: false,
|
|
34
|
-
required: false,
|
|
35
|
-
}),
|
|
36
|
-
},
|
|
37
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BLOCK_STYLES_SECTIONS,
|
|
3
|
-
COMPONENT_TYPES,
|
|
4
|
-
createStaticBoolProp,
|
|
5
|
-
createTextProp,
|
|
6
|
-
} from "@draftbit/types";
|
|
7
|
-
|
|
8
|
-
export const SEED_DATA = {
|
|
9
|
-
name: "Youtube Player",
|
|
10
|
-
tag: "YoutubePlayer",
|
|
11
|
-
description: "Plays a youtube video form a Youtube video or playlist id",
|
|
12
|
-
doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
|
|
13
|
-
code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
|
|
14
|
-
category: COMPONENT_TYPES.media,
|
|
15
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
16
|
-
layout: {
|
|
17
|
-
height: 250,
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
videoId: createTextProp({
|
|
21
|
-
label: "Video ID",
|
|
22
|
-
description: "VideoId of the Youtube video.",
|
|
23
|
-
defaultValue: "nwMUpDESXrI",
|
|
24
|
-
}),
|
|
25
|
-
playlist: createTextProp({
|
|
26
|
-
label: "Playlist",
|
|
27
|
-
description: "Playlist of the Youtube videos.",
|
|
28
|
-
defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks",
|
|
29
|
-
}),
|
|
30
|
-
mute: createStaticBoolProp({
|
|
31
|
-
label: "Mute Audio",
|
|
32
|
-
description: "Mute the audio of the video.",
|
|
33
|
-
defaultValue: false,
|
|
34
|
-
required: false,
|
|
35
|
-
}),
|
|
36
|
-
autoplay: createStaticBoolProp({
|
|
37
|
-
label: "Auto Play",
|
|
38
|
-
description: "Autoplay the video on load.",
|
|
39
|
-
defaultValue: false,
|
|
40
|
-
required: false,
|
|
41
|
-
}),
|
|
42
|
-
},
|
|
43
|
-
};
|