@draftbit/core 46.2.4-a6c053.5 → 46.2.4-b5dfee.10
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 -1
- package/lib/commonjs/components/SVG.js +4 -5
- package/lib/commonjs/components/Youtube.js +73 -0
- package/lib/commonjs/index.js +8 -38
- package/lib/commonjs/mappings/SVG.js +2 -1
- package/lib/commonjs/mappings/Youtube.js +42 -0
- package/lib/commonjs/utilities.js +2 -2
- package/lib/module/components/Config.js +1 -1
- package/lib/module/components/SVG.js +4 -5
- package/lib/module/components/Youtube.js +59 -0
- package/lib/module/constants.js +1 -0
- package/lib/module/index.js +2 -2
- package/lib/module/mappings/SVG.js +3 -2
- package/lib/module/mappings/Youtube.js +33 -0
- package/lib/module/utilities.js +3 -3
- package/lib/typescript/src/components/SVG.d.ts +2 -2
- package/lib/typescript/src/components/Youtube.d.ts +44 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/mappings/SVG.d.ts +1 -0
- package/lib/typescript/src/mappings/Youtube.d.ts +36 -0
- package/lib/typescript/src/utilities.d.ts +3 -3
- package/package.json +7 -5
- package/src/components/Config.js +1 -1
- package/src/components/Config.ts +1 -1
- package/src/components/SVG.js +4 -5
- package/src/components/SVG.tsx +7 -7
- package/src/components/Youtube.js +38 -0
- package/src/components/Youtube.tsx +66 -0
- package/src/index.js +1 -1
- package/src/index.tsx +1 -9
- package/src/mappings/SVG.js +8 -2
- package/src/mappings/SVG.ts +12 -2
- package/src/mappings/Youtube.js +33 -0
- package/src/mappings/Youtube.ts +39 -0
- package/src/utilities.js +2 -5
- package/src/utilities.ts +2 -13
- package/lib/commonjs/components/Table/Table.js +0 -35
- package/lib/commonjs/components/Table/TableCell.js +0 -50
- package/lib/commonjs/components/Table/TableHeader.js +0 -41
- package/lib/commonjs/components/Table/TablePaginator.js +0 -17
- package/lib/commonjs/components/Table/TableRow.js +0 -47
- package/lib/commonjs/components/Table/TableTitle.js +0 -60
- package/lib/commonjs/components/Table/index.js +0 -55
- package/lib/commonjs/mappings/Table.js +0 -103
- package/lib/module/components/Table/Table.js +0 -23
- package/lib/module/components/Table/TableCell.js +0 -37
- package/lib/module/components/Table/TableHeader.js +0 -27
- package/lib/module/components/Table/TablePaginator.js +0 -6
- package/lib/module/components/Table/TableRow.js +0 -33
- package/lib/module/components/Table/TableTitle.js +0 -47
- package/lib/module/components/Table/index.js +0 -6
- package/lib/module/mappings/Table.js +0 -94
- package/lib/typescript/src/components/Table/Table.d.ts +0 -8
- package/lib/typescript/src/components/Table/TableCell.d.ts +0 -10
- package/lib/typescript/src/components/Table/TableHeader.d.ts +0 -12
- package/lib/typescript/src/components/Table/TablePaginator.d.ts +0 -3
- package/lib/typescript/src/components/Table/TableRow.d.ts +0 -12
- package/lib/typescript/src/components/Table/TableTitle.d.ts +0 -12
- package/lib/typescript/src/components/Table/index.d.ts +0 -6
- package/lib/typescript/src/mappings/Table.d.ts +0 -153
- package/src/components/Table/Table.js +0 -10
- package/src/components/Table/Table.tsx +0 -22
- package/src/components/Table/TableCell.js +0 -21
- package/src/components/Table/TableCell.tsx +0 -44
- package/src/components/Table/TableHeader.js +0 -11
- package/src/components/Table/TableHeader.tsx +0 -28
- package/src/components/Table/TablePaginator.js +0 -5
- package/src/components/Table/TablePaginator.tsx +0 -10
- package/src/components/Table/TableRow.js +0 -16
- package/src/components/Table/TableRow.tsx +0 -31
- package/src/components/Table/TableTitle.js +0 -28
- package/src/components/Table/TableTitle.tsx +0 -58
- package/src/components/Table/index.js +0 -6
- package/src/components/Table/index.tsx +0 -6
- package/src/mappings/Table.js +0 -137
- package/src/mappings/Table.ts +0 -145
package/src/components/SVG.tsx
CHANGED
|
@@ -9,24 +9,24 @@ type SVGComponentProps = {
|
|
|
9
9
|
style?: StyleProp<ImageStyle>;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
const SVG
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>> = ({
|
|
13
|
+
source = Config.placeholderSvgURL,
|
|
14
|
+
style,
|
|
15
|
+
}) => {
|
|
16
16
|
return (
|
|
17
17
|
<>
|
|
18
18
|
{Platform.OS === "ios" && (
|
|
19
19
|
<View style={style}>
|
|
20
|
-
<SvgUri width="100%" height="100%" uri={
|
|
20
|
+
<SvgUri width="100%" height="100%" uri={source} />
|
|
21
21
|
</View>
|
|
22
22
|
)}
|
|
23
23
|
{Platform.OS === "android" && (
|
|
24
24
|
<View style={style}>
|
|
25
|
-
<SvgUri width="100%" height="100%" uri={
|
|
25
|
+
<SvgUri width="100%" height="100%" uri={source} />
|
|
26
26
|
</View>
|
|
27
27
|
)}
|
|
28
28
|
{Platform.OS === "web" && (
|
|
29
|
-
<Image style={style} source={{ uri:
|
|
29
|
+
<Image style={style} source={{ uri: source }} />
|
|
30
30
|
)}
|
|
31
31
|
</>
|
|
32
32
|
);
|
|
@@ -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
|
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
|
|
|
31
31
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
|
-
export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle, } from "./components/Table";
|
|
35
34
|
/* Deprecated: Fix or Delete! */
|
|
36
35
|
export { default as Button } from "./components/DeprecatedButton";
|
|
37
36
|
export { default as CardBlock } from "./components/CardBlock";
|
|
@@ -51,4 +50,5 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
|
|
|
51
50
|
export { default as Slider } from "./components/Slider";
|
|
52
51
|
export { default as Stepper } from "./components/Stepper";
|
|
53
52
|
export { useAuthState } from "./components/useAuthState";
|
|
53
|
+
export { default as Youtube } from "./components/Youtube";
|
|
54
54
|
// a comment to fix sourcemap comment issue
|
package/src/index.tsx
CHANGED
|
@@ -51,15 +51,6 @@ export {
|
|
|
51
51
|
RadioButtonFieldGroup,
|
|
52
52
|
} from "./components/RadioButton/index";
|
|
53
53
|
|
|
54
|
-
export {
|
|
55
|
-
Table,
|
|
56
|
-
TableRow,
|
|
57
|
-
TablePaginator,
|
|
58
|
-
TableHeader,
|
|
59
|
-
TableCell,
|
|
60
|
-
TableTitle,
|
|
61
|
-
} from "./components/Table";
|
|
62
|
-
|
|
63
54
|
/* Deprecated: Fix or Delete! */
|
|
64
55
|
export { default as Button } from "./components/DeprecatedButton";
|
|
65
56
|
export { default as CardBlock } from "./components/CardBlock";
|
|
@@ -79,5 +70,6 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
|
|
|
79
70
|
export { default as Slider } from "./components/Slider";
|
|
80
71
|
export { default as Stepper } from "./components/Stepper";
|
|
81
72
|
export { useAuthState } from "./components/useAuthState";
|
|
73
|
+
export { default as Youtube } from "./components/Youtube";
|
|
82
74
|
|
|
83
75
|
// a comment to fix sourcemap comment issue
|
package/src/mappings/SVG.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES,
|
|
1
|
+
import { COMPONENT_TYPES, createSVGProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "SVG",
|
|
4
4
|
tag: "SVG",
|
|
@@ -8,7 +8,13 @@ export const SEED_DATA = {
|
|
|
8
8
|
width: 100,
|
|
9
9
|
height: 100,
|
|
10
10
|
},
|
|
11
|
+
stylesPanelSections: [
|
|
12
|
+
StylesPanelSections.Size,
|
|
13
|
+
StylesPanelSections.Margins,
|
|
14
|
+
StylesPanelSections.Position,
|
|
15
|
+
StylesPanelSections.Effects,
|
|
16
|
+
],
|
|
11
17
|
props: {
|
|
12
|
-
source:
|
|
18
|
+
source: createSVGProp(),
|
|
13
19
|
},
|
|
14
20
|
};
|
package/src/mappings/SVG.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createSVGProp,
|
|
4
|
+
StylesPanelSections,
|
|
5
|
+
} from "@draftbit/types";
|
|
2
6
|
|
|
3
7
|
export const SEED_DATA = {
|
|
4
8
|
name: "SVG",
|
|
@@ -9,7 +13,13 @@ export const SEED_DATA = {
|
|
|
9
13
|
width: 100,
|
|
10
14
|
height: 100,
|
|
11
15
|
},
|
|
16
|
+
stylesPanelSections: [
|
|
17
|
+
StylesPanelSections.Size,
|
|
18
|
+
StylesPanelSections.Margins,
|
|
19
|
+
StylesPanelSections.Position,
|
|
20
|
+
StylesPanelSections.Effects,
|
|
21
|
+
],
|
|
12
22
|
props: {
|
|
13
|
-
source:
|
|
23
|
+
source: createSVGProp(),
|
|
14
24
|
},
|
|
15
25
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createStaticBoolProp, createTextProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Youtube",
|
|
4
|
+
tag: "Youtube",
|
|
5
|
+
description: "Given a VideoId orPlaylist and play Youtube video",
|
|
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: [StylesPanelSections.Size],
|
|
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
|
+
}),
|
|
28
|
+
autoplay: createStaticBoolProp({
|
|
29
|
+
label: "Auto Play",
|
|
30
|
+
description: "Autoplay the video on load.",
|
|
31
|
+
}),
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createStaticBoolProp,
|
|
4
|
+
createTextProp,
|
|
5
|
+
StylesPanelSections,
|
|
6
|
+
} from "@draftbit/types";
|
|
7
|
+
|
|
8
|
+
export const SEED_DATA = {
|
|
9
|
+
name: "Youtube",
|
|
10
|
+
tag: "Youtube",
|
|
11
|
+
description: "Given a VideoId orPlaylist and play Youtube video",
|
|
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: [StylesPanelSections.Size],
|
|
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
|
+
}),
|
|
34
|
+
autoplay: createStaticBoolProp({
|
|
35
|
+
label: "Auto Play",
|
|
36
|
+
description: "Autoplay the video on load.",
|
|
37
|
+
}),
|
|
38
|
+
},
|
|
39
|
+
};
|
package/src/utilities.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
|
-
import { isString, isNumber, pick, pickBy, identity
|
|
2
|
+
import { isString, isNumber, pick, pickBy, identity } from "lodash";
|
|
3
3
|
export function extractStyles(style) {
|
|
4
4
|
const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...viewStyles } = StyleSheet.flatten(style || {});
|
|
5
5
|
const textStyles = {
|
|
@@ -15,10 +15,7 @@ export function extractStyles(style) {
|
|
|
15
15
|
textDecorationColor,
|
|
16
16
|
textDecorationStyle,
|
|
17
17
|
};
|
|
18
|
-
return {
|
|
19
|
-
viewStyles: omitBy(viewStyles, isNil),
|
|
20
|
-
textStyles: omitBy(textStyles, isNil),
|
|
21
|
-
};
|
|
18
|
+
return { viewStyles, textStyles };
|
|
22
19
|
}
|
|
23
20
|
export const borderStyleNames = [
|
|
24
21
|
"borderRadius",
|
package/src/utilities.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { StyleSheet, StyleProp, TextStyle } from "react-native";
|
|
2
|
-
import {
|
|
3
|
-
isString,
|
|
4
|
-
isNumber,
|
|
5
|
-
pick,
|
|
6
|
-
pickBy,
|
|
7
|
-
identity,
|
|
8
|
-
omitBy,
|
|
9
|
-
isNil,
|
|
10
|
-
} from "lodash";
|
|
2
|
+
import { isString, isNumber, pick, pickBy, identity } from "lodash";
|
|
11
3
|
|
|
12
4
|
export function extractStyles(style: StyleProp<any>) {
|
|
13
5
|
const {
|
|
@@ -39,10 +31,7 @@ export function extractStyles(style: StyleProp<any>) {
|
|
|
39
31
|
textDecorationStyle,
|
|
40
32
|
};
|
|
41
33
|
|
|
42
|
-
return {
|
|
43
|
-
viewStyles: omitBy(viewStyles, isNil),
|
|
44
|
-
textStyles: omitBy(textStyles, isNil),
|
|
45
|
-
};
|
|
34
|
+
return { viewStyles, textStyles };
|
|
46
35
|
}
|
|
47
36
|
|
|
48
37
|
export const borderStyleNames = [
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
|
|
16
|
-
const Table = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
children,
|
|
19
|
-
style,
|
|
20
|
-
...rest
|
|
21
|
-
} = _ref;
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
23
|
-
style: [styles.wrapper, style]
|
|
24
|
-
}), children);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const styles = _reactNative.StyleSheet.create({
|
|
28
|
-
wrapper: {
|
|
29
|
-
display: "flex",
|
|
30
|
-
flexDirection: "column"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
var _default = Table;
|
|
35
|
-
exports.default = _default;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _utilities = require("../../utilities");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
|
|
18
|
-
const TableCell = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
children,
|
|
21
|
-
style,
|
|
22
|
-
numeric,
|
|
23
|
-
value,
|
|
24
|
-
...rest
|
|
25
|
-
} = _ref;
|
|
26
|
-
const {
|
|
27
|
-
textStyles,
|
|
28
|
-
viewStyles
|
|
29
|
-
} = (0, _utilities.extractStyles)(style);
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
31
|
-
style: [styles.wrapper, numeric && styles.right, viewStyles]
|
|
32
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
33
|
-
numberOfLines: 1,
|
|
34
|
-
style: textStyles
|
|
35
|
-
}, children, value));
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const styles = _reactNative.StyleSheet.create({
|
|
39
|
-
wrapper: {
|
|
40
|
-
flex: 1,
|
|
41
|
-
display: "flex",
|
|
42
|
-
flexDirection: "row"
|
|
43
|
-
},
|
|
44
|
-
right: {
|
|
45
|
-
justifyContent: "flex-end"
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
var _default = TableCell;
|
|
50
|
-
exports.default = _default;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _theming = require("../../theming");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
|
|
18
|
-
const TableHeader = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
children,
|
|
21
|
-
style,
|
|
22
|
-
theme,
|
|
23
|
-
...rest
|
|
24
|
-
} = _ref;
|
|
25
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
26
|
-
style: [styles.wrapper, {
|
|
27
|
-
borderBottomColor: theme.colors.medium
|
|
28
|
-
}, style]
|
|
29
|
-
}), children);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const styles = _reactNative.StyleSheet.create({
|
|
33
|
-
wrapper: {
|
|
34
|
-
display: "flex",
|
|
35
|
-
flexDirection: "row"
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
var _default = (0, _theming.withTheme)(TableHeader);
|
|
40
|
-
|
|
41
|
-
exports.default = _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
const TablePaginator = () => /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, "Table Paginator"));
|
|
15
|
-
|
|
16
|
-
var _default = TablePaginator;
|
|
17
|
-
exports.default = _default;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _theming = require("../../theming");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
|
|
18
|
-
const TableRow = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
children,
|
|
21
|
-
style,
|
|
22
|
-
theme,
|
|
23
|
-
...rest
|
|
24
|
-
} = _ref;
|
|
25
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
26
|
-
style: [styles.container, {
|
|
27
|
-
borderBottomColor: theme.colors.light
|
|
28
|
-
}, style]
|
|
29
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
30
|
-
style: styles.content
|
|
31
|
-
}, children));
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const styles = _reactNative.StyleSheet.create({
|
|
35
|
-
container: {
|
|
36
|
-
display: "flex",
|
|
37
|
-
flexDirection: "row"
|
|
38
|
-
},
|
|
39
|
-
content: {
|
|
40
|
-
flex: 1,
|
|
41
|
-
flexDirection: "row"
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
var _default = (0, _theming.withTheme)(TableRow);
|
|
46
|
-
|
|
47
|
-
exports.default = _default;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _utilities = require("../../utilities");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
|
|
18
|
-
const TableTitle = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
children,
|
|
21
|
-
style,
|
|
22
|
-
numeric = false,
|
|
23
|
-
isAscending = false,
|
|
24
|
-
numberOfLines = 1,
|
|
25
|
-
title,
|
|
26
|
-
...rest
|
|
27
|
-
} = _ref;
|
|
28
|
-
const {
|
|
29
|
-
textStyles,
|
|
30
|
-
viewStyles
|
|
31
|
-
} = (0, _utilities.extractStyles)(style);
|
|
32
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
33
|
-
style: [styles.wrapper, numeric && styles.right, viewStyles]
|
|
34
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
35
|
-
style: [isAscending ? styles.sorted : {
|
|
36
|
-
color: "gray"
|
|
37
|
-
}, textStyles],
|
|
38
|
-
numberOfLines: numberOfLines
|
|
39
|
-
}, children, title));
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const styles = _reactNative.StyleSheet.create({
|
|
43
|
-
wrapper: {
|
|
44
|
-
flex: 1,
|
|
45
|
-
display: "flex",
|
|
46
|
-
flexDirection: "row"
|
|
47
|
-
},
|
|
48
|
-
right: {
|
|
49
|
-
justifyContent: "flex-end"
|
|
50
|
-
},
|
|
51
|
-
sorted: {// marginLeft: 8,
|
|
52
|
-
},
|
|
53
|
-
icon: {
|
|
54
|
-
height: 24,
|
|
55
|
-
justifyContent: "center"
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
var _default = TableTitle;
|
|
60
|
-
exports.default = _default;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Table", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Table.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "TableCell", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _TableCell.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "TableHeader", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _TableHeader.default;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "TablePaginator", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _TablePaginator.default;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "TableRow", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _TableRow.default;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "TableTitle", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _TableTitle.default;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
var _Table = _interopRequireDefault(require("./Table"));
|
|
44
|
-
|
|
45
|
-
var _TableHeader = _interopRequireDefault(require("./TableHeader"));
|
|
46
|
-
|
|
47
|
-
var _TablePaginator = _interopRequireDefault(require("./TablePaginator"));
|
|
48
|
-
|
|
49
|
-
var _TableRow = _interopRequireDefault(require("./TableRow"));
|
|
50
|
-
|
|
51
|
-
var _TableCell = _interopRequireDefault(require("./TableCell"));
|
|
52
|
-
|
|
53
|
-
var _TableTitle = _interopRequireDefault(require("./TableTitle"));
|
|
54
|
-
|
|
55
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|