@draftbit/core 46.4.4-3bb5e5.2 → 46.4.4-929d79.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.
Files changed (62) hide show
  1. package/lib/commonjs/components/Container.js +5 -17
  2. package/lib/commonjs/components/Youtube.js +73 -0
  3. package/lib/commonjs/index.js +8 -38
  4. package/lib/commonjs/mappings/Youtube.js +42 -0
  5. package/lib/commonjs/utilities.js +2 -2
  6. package/lib/module/components/Youtube.js +59 -0
  7. package/lib/module/index.js +2 -2
  8. package/lib/module/mappings/Youtube.js +33 -0
  9. package/lib/module/utilities.js +3 -3
  10. package/lib/typescript/src/components/Youtube.d.ts +44 -0
  11. package/lib/typescript/src/index.d.ts +1 -1
  12. package/lib/typescript/src/mappings/Youtube.d.ts +36 -0
  13. package/lib/typescript/src/utilities.d.ts +3 -3
  14. package/package.json +6 -4
  15. package/src/components/Youtube.js +38 -0
  16. package/src/components/Youtube.tsx +66 -0
  17. package/src/index.js +1 -1
  18. package/src/index.tsx +1 -9
  19. package/src/mappings/Youtube.js +33 -0
  20. package/src/mappings/Youtube.ts +39 -0
  21. package/src/utilities.js +2 -5
  22. package/src/utilities.ts +2 -13
  23. package/lib/commonjs/components/Table/Table.js +0 -50
  24. package/lib/commonjs/components/Table/TableCell.js +0 -50
  25. package/lib/commonjs/components/Table/TableHeader.js +0 -41
  26. package/lib/commonjs/components/Table/TablePaginator.js +0 -17
  27. package/lib/commonjs/components/Table/TableRow.js +0 -47
  28. package/lib/commonjs/components/Table/TableTitle.js +0 -60
  29. package/lib/commonjs/components/Table/index.js +0 -55
  30. package/lib/commonjs/mappings/Table.js +0 -103
  31. package/lib/module/components/Table/Table.js +0 -23
  32. package/lib/module/components/Table/TableCell.js +0 -37
  33. package/lib/module/components/Table/TableHeader.js +0 -27
  34. package/lib/module/components/Table/TablePaginator.js +0 -6
  35. package/lib/module/components/Table/TableRow.js +0 -33
  36. package/lib/module/components/Table/TableTitle.js +0 -47
  37. package/lib/module/components/Table/index.js +0 -6
  38. package/lib/module/mappings/Table.js +0 -94
  39. package/lib/typescript/src/components/Table/Table.d.ts +0 -8
  40. package/lib/typescript/src/components/Table/TableCell.d.ts +0 -10
  41. package/lib/typescript/src/components/Table/TableHeader.d.ts +0 -12
  42. package/lib/typescript/src/components/Table/TablePaginator.d.ts +0 -3
  43. package/lib/typescript/src/components/Table/TableRow.d.ts +0 -12
  44. package/lib/typescript/src/components/Table/TableTitle.d.ts +0 -12
  45. package/lib/typescript/src/components/Table/index.d.ts +0 -6
  46. package/lib/typescript/src/mappings/Table.d.ts +0 -153
  47. package/src/components/Table/Table.js +0 -10
  48. package/src/components/Table/Table.tsx +0 -22
  49. package/src/components/Table/TableCell.js +0 -21
  50. package/src/components/Table/TableCell.tsx +0 -44
  51. package/src/components/Table/TableHeader.js +0 -11
  52. package/src/components/Table/TableHeader.tsx +0 -28
  53. package/src/components/Table/TablePaginator.js +0 -5
  54. package/src/components/Table/TablePaginator.tsx +0 -10
  55. package/src/components/Table/TableRow.js +0 -16
  56. package/src/components/Table/TableRow.tsx +0 -31
  57. package/src/components/Table/TableTitle.js +0 -28
  58. package/src/components/Table/TableTitle.tsx +0 -58
  59. package/src/components/Table/index.js +0 -6
  60. package/src/components/Table/index.tsx +0 -6
  61. package/src/mappings/Table.js +0 -137
  62. package/src/mappings/Table.ts +0 -145
@@ -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, StylesPanelSections.Position],
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, StylesPanelSections.Position],
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, omitBy, isNil, } from "lodash";
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,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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- const Table = _ref => {
15
- let {
16
- children,
17
- style,
18
- ...rest
19
- } = _ref;
20
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, { ...rest,
21
- style: [styles.wrapper, style]
22
- }, children);
23
- };
24
-
25
- const styles = _reactNative.StyleSheet.create({
26
- wrapper: {
27
- display: "flex",
28
- flexDirection: "column"
29
- }
30
- });
31
-
32
- var _default = Table;
33
- exports.default = _default;,
34
- style,
35
- ...rest
36
- } = _ref;
37
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
38
- style: [styles.wrapper, style]
39
- }), children);
40
- };
41
-
42
- const styles = _reactNative.StyleSheet.create({
43
- wrapper: {
44
- display: "flex",
45
- flexDirection: "column"
46
- }
47
- });
48
-
49
- var _default = Table;
50
- 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 }; }
@@ -1,103 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
-
8
- var _types = require("@draftbit/types");
9
-
10
- const SEED_DATA = [{
11
- name: "Table",
12
- tag: "Table",
13
- category: _types.COMPONENT_TYPES.container,
14
- stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
15
- layout: {
16
- width: "100%"
17
- },
18
- props: {}
19
- }, {
20
- name: "Table Row",
21
- tag: "TableRow",
22
- category: _types.COMPONENT_TYPES.container,
23
- stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
24
- layout: {
25
- paddingLeft: 16,
26
- paddingRight: 16,
27
- borderBottomWidth: 1,
28
- borderStyle: "solid"
29
- },
30
- props: {}
31
- }, {
32
- name: "Table Cell",
33
- tag: "TableCell",
34
- category: _types.COMPONENT_TYPES.container,
35
- layout: {
36
- paddingTop: 16,
37
- paddingBottom: 16,
38
- paddingLeft: 8,
39
- paddingRight: 8
40
- },
41
- stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
42
- props: {
43
- numeric: (0, _types.createBoolProp)({
44
- label: "Is Numeric Cell?",
45
- description: "Does the cell contain a numeric value?",
46
- group: _types.GROUPS.data
47
- }),
48
- value: (0, _types.createTextProp)({
49
- label: "Cell Value",
50
- description: "Table Cell Value",
51
- group: _types.GROUPS.data
52
- })
53
- }
54
- }, {
55
- name: "Table Header",
56
- tag: "TableHeader",
57
- category: _types.COMPONENT_TYPES.container,
58
- stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
59
- layout: {
60
- paddingLeft: 16,
61
- paddingRight: 16,
62
- borderBottomWidth: 1,
63
- borderStyle: "solid",
64
- backgroundColor: "#EFEFEF"
65
- },
66
- props: {}
67
- }, {
68
- name: "Table Title",
69
- tag: "TableTitle",
70
- category: _types.COMPONENT_TYPES.container,
71
- stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
72
- layout: {
73
- fontSize: 14,
74
- fontWeight: "500",
75
- paddingTop: 16,
76
- paddingBottom: 16,
77
- paddingLeft: 8,
78
- paddingRight: 8
79
- },
80
- props: {
81
- numeric: (0, _types.createBoolProp)({
82
- label: "Is Numeric Cell?",
83
- description: "Does the cell contain a numeric value?",
84
- group: _types.GROUPS.data
85
- }),
86
- value: (0, _types.createTextProp)({
87
- label: "Cell Value",
88
- description: "Table Cell Value",
89
- group: _types.GROUPS.data
90
- }),
91
- isAscending: (0, _types.createBoolProp)({
92
- label: "Is Ascending?",
93
- description: "Does the cell contain a numeric value?",
94
- group: _types.GROUPS.data
95
- }),
96
- numberOfLines: (0, _types.createNumberProp)({
97
- label: "Number of Lines",
98
- description: "Number of Lines",
99
- group: _types.GROUPS.basic
100
- })
101
- }
102
- }];
103
- exports.SEED_DATA = SEED_DATA;
@@ -1,23 +0,0 @@
1
- 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); }
2
-
3
- import React from "react";
4
- import { View, StyleSheet } from "react-native";
5
-
6
- const Table = _ref => {
7
- let {
8
- children,
9
- style,
10
- ...rest
11
- } = _ref;
12
- return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
13
- style: [styles.wrapper, style]
14
- }), children);
15
- };
16
-
17
- const styles = StyleSheet.create({
18
- wrapper: {
19
- display: "flex",
20
- flexDirection: "column"
21
- }
22
- });
23
- export default Table;
@@ -1,37 +0,0 @@
1
- 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); }
2
-
3
- import React from "react";
4
- import { View, Text, StyleSheet } from "react-native";
5
- import { extractStyles } from "../../utilities";
6
-
7
- const TableCell = _ref => {
8
- let {
9
- children,
10
- style,
11
- numeric,
12
- value,
13
- ...rest
14
- } = _ref;
15
- const {
16
- textStyles,
17
- viewStyles
18
- } = extractStyles(style);
19
- return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
20
- style: [styles.wrapper, numeric && styles.right, viewStyles]
21
- }), /*#__PURE__*/React.createElement(Text, {
22
- numberOfLines: 1,
23
- style: textStyles
24
- }, children, value));
25
- };
26
-
27
- const styles = StyleSheet.create({
28
- wrapper: {
29
- flex: 1,
30
- display: "flex",
31
- flexDirection: "row"
32
- },
33
- right: {
34
- justifyContent: "flex-end"
35
- }
36
- });
37
- export default TableCell;
@@ -1,27 +0,0 @@
1
- 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); }
2
-
3
- import React from "react";
4
- import { View, StyleSheet } from "react-native";
5
- import { withTheme } from "../../theming";
6
-
7
- const TableHeader = _ref => {
8
- let {
9
- children,
10
- style,
11
- theme,
12
- ...rest
13
- } = _ref;
14
- return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
15
- style: [styles.wrapper, {
16
- borderBottomColor: theme.colors.medium
17
- }, style]
18
- }), children);
19
- };
20
-
21
- const styles = StyleSheet.create({
22
- wrapper: {
23
- display: "flex",
24
- flexDirection: "row"
25
- }
26
- });
27
- export default withTheme(TableHeader);
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- import { View, Text } from "react-native";
3
-
4
- const TablePaginator = () => /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, null, "Table Paginator"));
5
-
6
- export default TablePaginator;
@@ -1,33 +0,0 @@
1
- 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); }
2
-
3
- import React from "react";
4
- import { View, StyleSheet } from "react-native";
5
- import { withTheme } from "../../theming";
6
-
7
- const TableRow = _ref => {
8
- let {
9
- children,
10
- style,
11
- theme,
12
- ...rest
13
- } = _ref;
14
- return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
15
- style: [styles.container, {
16
- borderBottomColor: theme.colors.light
17
- }, style]
18
- }), /*#__PURE__*/React.createElement(View, {
19
- style: styles.content
20
- }, children));
21
- };
22
-
23
- const styles = StyleSheet.create({
24
- container: {
25
- display: "flex",
26
- flexDirection: "row"
27
- },
28
- content: {
29
- flex: 1,
30
- flexDirection: "row"
31
- }
32
- });
33
- export default withTheme(TableRow);