@draftbit/core 46.2.4-0e692a.5 → 46.2.4-1897f4.12
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/CircleImage.js +16 -2
- package/lib/commonjs/components/CircularProgress.js +15 -7
- package/lib/commonjs/components/DatePicker/DatePicker.js +7 -8
- package/lib/commonjs/components/Divider.js +16 -2
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/Portal/Portal.js +12 -3
- package/lib/commonjs/components/{Svg.js → SVG.js} +2 -2
- package/lib/commonjs/components/ScreenContainer.js +23 -5
- package/lib/commonjs/components/StarRating.js +25 -5
- package/lib/commonjs/components/Switch.js +23 -10
- package/lib/commonjs/components/ToggleButton.js +18 -3
- package/lib/commonjs/components/Youtube.js +73 -0
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +15 -7
- package/lib/commonjs/mappings/FlashList.js +42 -0
- package/lib/commonjs/mappings/{Svg.js → SVG.js} +1 -1
- package/lib/commonjs/mappings/Youtube.js +42 -0
- package/lib/module/components/{Svg.js → SVG.js} +2 -2
- package/lib/module/components/Youtube.js +59 -0
- package/lib/module/index.js +3 -2
- package/lib/module/mappings/FlashList.js +33 -0
- package/lib/module/mappings/{Svg.js → SVG.js} +2 -2
- package/lib/module/mappings/Youtube.js +33 -0
- package/lib/typescript/src/components/SVG.d.ts +8 -0
- package/lib/typescript/src/components/Youtube.d.ts +44 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +54 -0
- package/lib/typescript/src/mappings/{Svg.d.ts → SVG.d.ts} +0 -0
- package/lib/typescript/src/mappings/Youtube.d.ts +36 -0
- package/package.json +8 -5
- package/src/components/{Svg.js → SVG.js} +2 -2
- package/src/components/{Svg.tsx → SVG.tsx} +5 -5
- package/src/components/Youtube.js +38 -0
- package/src/components/Youtube.tsx +66 -0
- package/src/index.js +2 -1
- package/src/index.tsx +2 -1
- package/src/mappings/FlashList.js +33 -0
- package/src/mappings/FlashList.ts +41 -0
- package/src/mappings/{Svg.js → SVG.js} +2 -2
- package/src/mappings/{Svg.ts → SVG.ts} +2 -2
- package/src/mappings/Youtube.js +33 -0
- package/src/mappings/Youtube.ts +39 -0
- package/lib/typescript/src/components/Svg.d.ts +0 -7
|
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
20
|
const CircleImage = _ref => {
|
|
23
21
|
let {
|
|
24
22
|
source = _Config.default.placeholderImageURL,
|
|
@@ -27,6 +25,22 @@ const CircleImage = _ref => {
|
|
|
27
25
|
...props
|
|
28
26
|
} = _ref;
|
|
29
27
|
const borderRadius = size / 2;
|
|
28
|
+
return /*#__PURE__*/React.createElement(_reactNative.Image, {
|
|
29
|
+
style: [{
|
|
30
|
+
width: size,
|
|
31
|
+
height: size,
|
|
32
|
+
borderRadius
|
|
33
|
+
}, style],
|
|
34
|
+
source: typeof source === "string" ? {
|
|
35
|
+
uri: source
|
|
36
|
+
} : source,
|
|
37
|
+
resizeMode: "cover",
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var _default = CircleImage;
|
|
43
|
+
exports.default = _default;size / 2;
|
|
30
44
|
return /*#__PURE__*/React.createElement(_reactNative.Image, _extends({
|
|
31
45
|
style: [{
|
|
32
46
|
width: size,
|
|
@@ -13,29 +13,27 @@ var _reactNativeSvg = require("react-native-svg");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
|
|
18
16
|
class CircularProgress extends _react.default.Component {
|
|
19
17
|
constructor() {
|
|
20
18
|
super(...arguments);
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
this.polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
|
|
23
21
|
var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
|
|
24
22
|
return {
|
|
25
23
|
x: centerX + radius * Math.cos(angleInRadians),
|
|
26
24
|
y: centerY + radius * Math.sin(angleInRadians)
|
|
27
25
|
};
|
|
28
|
-
}
|
|
26
|
+
};
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
this.circlePath = (x, y, radius, startAngle, endAngle) => {
|
|
31
29
|
var start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);
|
|
32
30
|
var end = this.polarToCartesian(x, y, radius, startAngle);
|
|
33
31
|
var largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
|
|
34
32
|
var d = ["M", start.x, start.y, "A", radius, radius, 0, largeArcFlag, 0, end.x, end.y];
|
|
35
33
|
return d.join(" ");
|
|
36
|
-
}
|
|
34
|
+
};
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
this.clampFill = fill => Math.min(100, Math.max(0, fill));
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
render() {
|
|
@@ -118,5 +116,15 @@ class CircularProgress extends _react.default.Component {
|
|
|
118
116
|
|
|
119
117
|
}
|
|
120
118
|
|
|
119
|
+
var _default = CircularProgress;
|
|
120
|
+
exports.default = _default;okeDasharrayTint,
|
|
121
|
+
fill: "transparent"
|
|
122
|
+
}), cap)), children && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
123
|
+
style: localChildrenContainerStyle
|
|
124
|
+
}, children(fill)));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
}
|
|
128
|
+
|
|
121
129
|
var _default = CircularProgress;
|
|
122
130
|
exports.default = _default;
|
|
@@ -27,8 +27,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
30
|
const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
|
|
33
31
|
|
|
34
32
|
const FOCUS_ANIMATION_DURATION = 150;
|
|
@@ -284,9 +282,9 @@ const DatePicker = _ref => {
|
|
|
284
282
|
pointerEvents: "none"
|
|
285
283
|
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
286
284
|
style: [styles.container, style]
|
|
287
|
-
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon,
|
|
285
|
+
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
288
286
|
style: leftIconStyle
|
|
289
|
-
})
|
|
287
|
+
}) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
290
288
|
style: [containerStyle, style ? {
|
|
291
289
|
height: style.height
|
|
292
290
|
} : {}]
|
|
@@ -334,11 +332,11 @@ const DatePicker = _ref => {
|
|
|
334
332
|
opacity: hasActiveOutline ? labeled : 1
|
|
335
333
|
}],
|
|
336
334
|
numberOfLines: 1
|
|
337
|
-
}, label)) : null, leftIconName && leftIconMode === "inset" ? /*#__PURE__*/React.createElement(Icon,
|
|
335
|
+
}, label)) : null, leftIconName && leftIconMode === "inset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
338
336
|
style: { ...leftIconStyle,
|
|
339
337
|
marginLeft: type === "solid" ? 16 : 0
|
|
340
338
|
}
|
|
341
|
-
})
|
|
339
|
+
}) : null, /*#__PURE__*/React.createElement(_reactNative.TextInput, {
|
|
342
340
|
value: formatDate(),
|
|
343
341
|
placeholder: label ? placeholder1 : placeholder,
|
|
344
342
|
editable: !disabled,
|
|
@@ -347,8 +345,9 @@ const DatePicker = _ref => {
|
|
|
347
345
|
onFocus: _handleFocus,
|
|
348
346
|
onBlur: _handleBlur,
|
|
349
347
|
underlineColorAndroid: "transparent",
|
|
350
|
-
style: inputStyles
|
|
351
|
-
|
|
348
|
+
style: inputStyles,
|
|
349
|
+
...props
|
|
350
|
+
})), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
|
|
352
351
|
name: rightIconName,
|
|
353
352
|
size: ICON_SIZE,
|
|
354
353
|
color: colors.light,
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
18
|
const Divider = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
style,
|
|
@@ -26,6 +24,22 @@ const Divider = _ref => {
|
|
|
26
24
|
},
|
|
27
25
|
...rest
|
|
28
26
|
} = _ref;
|
|
27
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
28
|
+
style: [{
|
|
29
|
+
backgroundColor: color || colors.divider,
|
|
30
|
+
height: _reactNative.StyleSheet.hairlineWidth
|
|
31
|
+
}, style],
|
|
32
|
+
...rest
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var _default = (0, _theming.withTheme)(Divider);
|
|
37
|
+
|
|
38
|
+
exports.default = _default;me: {
|
|
39
|
+
colors
|
|
40
|
+
},
|
|
41
|
+
...rest
|
|
42
|
+
} = _ref;
|
|
29
43
|
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
30
44
|
style: [{
|
|
31
45
|
backgroundColor: color || colors.divider,
|
|
@@ -18,8 +18,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
18
18
|
|
|
19
19
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
20
|
|
|
21
|
-
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); }
|
|
22
|
-
|
|
23
21
|
function Center(_ref) {
|
|
24
22
|
let {
|
|
25
23
|
width = 240,
|
|
@@ -29,15 +27,16 @@ function Center(_ref) {
|
|
|
29
27
|
style,
|
|
30
28
|
...rest
|
|
31
29
|
} = _ref;
|
|
32
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
30
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
33
31
|
style: [{
|
|
34
32
|
justifyContent: "center",
|
|
35
33
|
alignItems: "center",
|
|
36
34
|
width,
|
|
37
35
|
height,
|
|
38
36
|
backgroundColor: bgColor
|
|
39
|
-
}, style]
|
|
40
|
-
|
|
37
|
+
}, style],
|
|
38
|
+
...rest
|
|
39
|
+
}, children);
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
function Circle(_ref2) {
|
|
@@ -49,7 +48,7 @@ function Circle(_ref2) {
|
|
|
49
48
|
...rest
|
|
50
49
|
} = _ref2;
|
|
51
50
|
const borderRadius = 1000;
|
|
52
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
51
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
53
52
|
width: size,
|
|
54
53
|
height: size,
|
|
55
54
|
bgColor: bgColor,
|
|
@@ -57,8 +56,9 @@ function Circle(_ref2) {
|
|
|
57
56
|
backgroundColor: bgColor,
|
|
58
57
|
borderRadius,
|
|
59
58
|
overflow: "hidden"
|
|
60
|
-
}]
|
|
61
|
-
|
|
59
|
+
}],
|
|
60
|
+
...rest
|
|
61
|
+
}, children);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
function Square(_ref3) {
|
|
@@ -69,12 +69,13 @@ function Square(_ref3) {
|
|
|
69
69
|
style,
|
|
70
70
|
...rest
|
|
71
71
|
} = _ref3;
|
|
72
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
72
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
73
73
|
style: style,
|
|
74
74
|
width: size,
|
|
75
75
|
height: size,
|
|
76
|
-
bgColor: bgColor
|
|
77
|
-
|
|
76
|
+
bgColor: bgColor,
|
|
77
|
+
...rest
|
|
78
|
+
}, children);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
function Row(_ref4) {
|
|
@@ -85,14 +86,14 @@ function Row(_ref4) {
|
|
|
85
86
|
style,
|
|
86
87
|
...rest
|
|
87
88
|
} = _ref4;
|
|
88
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
89
|
-
style: [style,
|
|
90
|
-
{
|
|
89
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
90
|
+
style: [style, {
|
|
91
91
|
alignItems,
|
|
92
92
|
flexDirection: "row",
|
|
93
93
|
justifyContent: justifyContent
|
|
94
|
-
}]
|
|
95
|
-
|
|
94
|
+
}],
|
|
95
|
+
...rest
|
|
96
|
+
}, children);
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
function Spacer(_ref5) {
|
|
@@ -105,17 +106,37 @@ function Spacer(_ref5) {
|
|
|
105
106
|
style,
|
|
106
107
|
...rest
|
|
107
108
|
} = _ref5;
|
|
108
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
109
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
109
110
|
style: [style, {
|
|
110
111
|
paddingRight: right,
|
|
111
112
|
paddingTop: top,
|
|
112
113
|
paddingLeft: left,
|
|
113
114
|
paddingBottom: bottom
|
|
114
|
-
}]
|
|
115
|
-
|
|
115
|
+
}],
|
|
116
|
+
...rest
|
|
117
|
+
}, children);
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
function Stack(_ref6) {
|
|
121
|
+
let {
|
|
122
|
+
children,
|
|
123
|
+
justifyContent = "flex-start",
|
|
124
|
+
alignItems = "flex-start",
|
|
125
|
+
style,
|
|
126
|
+
...rest
|
|
127
|
+
} = _ref6;
|
|
128
|
+
return (
|
|
129
|
+
/*#__PURE__*/
|
|
130
|
+
// style must go first since we don't want justifyContent, alignItems overridden
|
|
131
|
+
React.createElement(_reactNative.View, {
|
|
132
|
+
style: [style, {
|
|
133
|
+
justifyContent,
|
|
134
|
+
alignItems
|
|
135
|
+
}],
|
|
136
|
+
...rest
|
|
137
|
+
}, children)
|
|
138
|
+
);
|
|
139
|
+
}ck(_ref6) {
|
|
119
140
|
let {
|
|
120
141
|
children,
|
|
121
142
|
justifyContent = "flex-start",
|
|
@@ -19,8 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
-
|
|
24
22
|
/**
|
|
25
23
|
* Portal allows to render a component at a different place in the parent tree.
|
|
26
24
|
* You can use it to render content which should appear above other elements, similar to `Modal`.
|
|
@@ -43,7 +41,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
43
41
|
* ```
|
|
44
42
|
*/
|
|
45
43
|
class Portal extends React.Component {
|
|
46
|
-
// @component ./PortalHost.tsx
|
|
47
44
|
render() {
|
|
48
45
|
const {
|
|
49
46
|
children,
|
|
@@ -56,6 +53,18 @@ class Portal extends React.Component {
|
|
|
56
53
|
}, children)));
|
|
57
54
|
}
|
|
58
55
|
|
|
56
|
+
} // @component ./PortalHost.tsx
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
Portal.Host = _PortalHost.default;
|
|
60
|
+
|
|
61
|
+
var _default = (0, _theming.withTheme)(Portal);
|
|
62
|
+
|
|
63
|
+
exports.default = _default;URE__*/React.createElement(_theming.ThemeProvider, {
|
|
64
|
+
theme: theme
|
|
65
|
+
}, children)));
|
|
66
|
+
}
|
|
67
|
+
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
_defineProperty(Portal, "Host", _PortalHost.default);
|
|
@@ -19,7 +19,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
const
|
|
22
|
+
const SVG = _ref => {
|
|
23
23
|
let {
|
|
24
24
|
source = _Config.default.placeholderSvgURL,
|
|
25
25
|
style
|
|
@@ -44,5 +44,5 @@ const Svg = _ref => {
|
|
|
44
44
|
}));
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
var _default =
|
|
47
|
+
var _default = SVG;
|
|
48
48
|
exports.default = _default;
|
|
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
20
|
function ScreenContainer(_ref) {
|
|
23
21
|
let {
|
|
24
22
|
scrollable = false,
|
|
@@ -41,12 +39,13 @@ function ScreenContainer(_ref) {
|
|
|
41
39
|
edges.push("bottom");
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView,
|
|
42
|
+
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
|
|
45
43
|
edges: edges,
|
|
46
44
|
style: [styles.container, {
|
|
47
45
|
backgroundColor
|
|
48
|
-
}]
|
|
49
|
-
|
|
46
|
+
}],
|
|
47
|
+
...rest
|
|
48
|
+
}, scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
50
49
|
contentContainerStyle: [styles.scrollViewContainer, {
|
|
51
50
|
backgroundColor
|
|
52
51
|
}, style]
|
|
@@ -69,4 +68,23 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
69
68
|
|
|
70
69
|
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
71
70
|
|
|
71
|
+
exports.default = _default;reactNative.View, {
|
|
72
|
+
style: [styles.container, {
|
|
73
|
+
backgroundColor
|
|
74
|
+
}, style]
|
|
75
|
+
}, children));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const styles = _reactNative.StyleSheet.create({
|
|
79
|
+
container: {
|
|
80
|
+
flex: 1
|
|
81
|
+
},
|
|
82
|
+
scrollViewContainer: {
|
|
83
|
+
flexGrow: 1,
|
|
84
|
+
flex: undefined
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
89
|
+
|
|
72
90
|
exports.default = _default;
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
18
|
const StarRating = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
Icon,
|
|
@@ -47,9 +45,10 @@ const StarRating = _ref => {
|
|
|
47
45
|
!!onPress && onPress(r);
|
|
48
46
|
}, [onPress]);
|
|
49
47
|
const ratingRounded = Math.round(localRating * 2) / 2;
|
|
50
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
51
|
-
style: [styles.container, style]
|
|
52
|
-
|
|
48
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
49
|
+
style: [styles.container, style],
|
|
50
|
+
...rest
|
|
51
|
+
}, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
53
52
|
key: i,
|
|
54
53
|
style: {
|
|
55
54
|
display: "flex"
|
|
@@ -93,4 +92,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
93
92
|
|
|
94
93
|
var _default = (0, _theming.withTheme)(StarRating);
|
|
95
94
|
|
|
95
|
+
exports.default = _default;ignItems: "center"
|
|
96
|
+
},
|
|
97
|
+
touchContainer: {
|
|
98
|
+
display: "flex",
|
|
99
|
+
flexDirection: "row",
|
|
100
|
+
position: "absolute",
|
|
101
|
+
top: 0,
|
|
102
|
+
right: 0,
|
|
103
|
+
left: 0,
|
|
104
|
+
bottom: 0,
|
|
105
|
+
zIndex: 1
|
|
106
|
+
},
|
|
107
|
+
pressable: {
|
|
108
|
+
flex: 1,
|
|
109
|
+
height: "100%",
|
|
110
|
+
width: "50%"
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
var _default = (0, _theming.withTheme)(StarRating);
|
|
115
|
+
|
|
96
116
|
exports.default = _default;
|
|
@@ -23,8 +23,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
26
|
function Switch(_ref) {
|
|
29
27
|
let {
|
|
30
28
|
value,
|
|
@@ -57,23 +55,24 @@ function Switch(_ref) {
|
|
|
57
55
|
setChecked(Boolean(defaultValue));
|
|
58
56
|
}
|
|
59
57
|
}, [defaultValue, previousDefaultValue]);
|
|
60
|
-
return /*#__PURE__*/React.createElement(_reactNative.Switch,
|
|
58
|
+
return /*#__PURE__*/React.createElement(_reactNative.Switch, {
|
|
61
59
|
value: checked,
|
|
62
60
|
disabled: disabled,
|
|
63
61
|
trackColor: {
|
|
64
62
|
false: inactiveTrackThemeColor,
|
|
65
63
|
true: activeTrackThemeColor
|
|
66
64
|
},
|
|
67
|
-
thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor
|
|
68
|
-
|
|
65
|
+
thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor,
|
|
66
|
+
// @ts-ignore react-native-web only
|
|
69
67
|
activeThumbColor: activeThumbThemeColor,
|
|
70
68
|
ios_backgroundColor: inactiveTrackThemeColor,
|
|
71
69
|
style: style,
|
|
72
70
|
onValueChange: bool => {
|
|
73
71
|
setChecked(bool);
|
|
74
72
|
onValueChange && onValueChange(bool);
|
|
75
|
-
}
|
|
76
|
-
|
|
73
|
+
},
|
|
74
|
+
...rest
|
|
75
|
+
});
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
function Row(_ref2) {
|
|
@@ -103,7 +102,7 @@ function Row(_ref2) {
|
|
|
103
102
|
setChecked(defaultValue);
|
|
104
103
|
}
|
|
105
104
|
}, [defaultValue]);
|
|
106
|
-
return /*#__PURE__*/React.createElement(_FormRow.default,
|
|
105
|
+
return /*#__PURE__*/React.createElement(_FormRow.default, {
|
|
107
106
|
disabled: disabled,
|
|
108
107
|
onPress: () => {
|
|
109
108
|
setChecked(!checked);
|
|
@@ -111,8 +110,9 @@ function Row(_ref2) {
|
|
|
111
110
|
},
|
|
112
111
|
label: label,
|
|
113
112
|
direction: direction,
|
|
114
|
-
style: style
|
|
115
|
-
|
|
113
|
+
style: style,
|
|
114
|
+
...rest
|
|
115
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
116
116
|
theme: theme,
|
|
117
117
|
value: checked,
|
|
118
118
|
disabled: disabled,
|
|
@@ -129,4 +129,17 @@ exports.SwitchRow = SwitchRow;
|
|
|
129
129
|
|
|
130
130
|
var _default = (0, _theming.withTheme)(Switch);
|
|
131
131
|
|
|
132
|
+
exports.default = _default;onValueChange,
|
|
133
|
+
activeTrackColor: activeTrackColor,
|
|
134
|
+
inactiveTrackColor: inactiveTrackColor,
|
|
135
|
+
activeThumbColor: activeThumbColor,
|
|
136
|
+
inactiveThumbColor: inactiveThumbColor
|
|
137
|
+
}));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const SwitchRow = (0, _theming.withTheme)(Row);
|
|
141
|
+
exports.SwitchRow = SwitchRow;
|
|
142
|
+
|
|
143
|
+
var _default = (0, _theming.withTheme)(Switch);
|
|
144
|
+
|
|
132
145
|
exports.default = _default;
|
|
@@ -19,8 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
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); }
|
|
23
|
-
|
|
24
22
|
const ToggleButton = _ref => {
|
|
25
23
|
let {
|
|
26
24
|
Icon,
|
|
@@ -58,7 +56,7 @@ const ToggleButton = _ref => {
|
|
|
58
56
|
onPress(!internalValue);
|
|
59
57
|
};
|
|
60
58
|
|
|
61
|
-
return /*#__PURE__*/React.createElement(_IconButton.default,
|
|
59
|
+
return /*#__PURE__*/React.createElement(_IconButton.default, {
|
|
62
60
|
Icon: Icon,
|
|
63
61
|
icon: icon,
|
|
64
62
|
size: iconSize,
|
|
@@ -70,6 +68,23 @@ const ToggleButton = _ref => {
|
|
|
70
68
|
height,
|
|
71
69
|
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
72
70
|
borderColor: colors[borderColor]
|
|
71
|
+
}, style],
|
|
72
|
+
...rest
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = _reactNative.StyleSheet.create({
|
|
77
|
+
mainContainer: {
|
|
78
|
+
borderWidth: 1
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
var _default = (0, _theming.withTheme)(ToggleButton);
|
|
83
|
+
|
|
84
|
+
exports.default = _default;th,
|
|
85
|
+
height,
|
|
86
|
+
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
87
|
+
borderColor: colors[borderColor]
|
|
73
88
|
}, style]
|
|
74
89
|
}, rest));
|
|
75
90
|
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.SEED_DATA = void 0;
|
|
7
|
+
|
|
8
|
+
var _types = require("@draftbit/types");
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _reactNativeYoutubeIframe = _interopRequireDefault(require("react-native-youtube-iframe"));
|
|
13
|
+
|
|
14
|
+
var _utilities = require("../utilities");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const Youtube = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
videoId,
|
|
21
|
+
playlist,
|
|
22
|
+
style,
|
|
23
|
+
mute,
|
|
24
|
+
autoplay
|
|
25
|
+
} = _ref;
|
|
26
|
+
const {
|
|
27
|
+
viewStyles: {
|
|
28
|
+
height,
|
|
29
|
+
width
|
|
30
|
+
}
|
|
31
|
+
} = (0, _utilities.extractStyles)(style);
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_reactNativeYoutubeIframe.default, {
|
|
33
|
+
height: height,
|
|
34
|
+
width: width,
|
|
35
|
+
play: autoplay,
|
|
36
|
+
videoId: videoId,
|
|
37
|
+
playList: playlist,
|
|
38
|
+
mute: mute
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var _default = Youtube;
|
|
43
|
+
exports.default = _default;
|
|
44
|
+
const SEED_DATA = {
|
|
45
|
+
name: "Youtube",
|
|
46
|
+
tag: "Youtube",
|
|
47
|
+
description: "Youtube Component",
|
|
48
|
+
category: _types.COMPONENT_TYPES.media,
|
|
49
|
+
layout: {
|
|
50
|
+
width: "100%"
|
|
51
|
+
},
|
|
52
|
+
props: {
|
|
53
|
+
videoId: (0, _types.createTextProp)({
|
|
54
|
+
label: "VideoId",
|
|
55
|
+
description: "Youtube Video ID"
|
|
56
|
+
}),
|
|
57
|
+
playlist: (0, _types.createTextProp)({
|
|
58
|
+
label: "PlayList",
|
|
59
|
+
description: "Playlist ID"
|
|
60
|
+
}),
|
|
61
|
+
mute: (0, _types.createBoolProp)({
|
|
62
|
+
label: "Mute",
|
|
63
|
+
description: "Whether to mute video",
|
|
64
|
+
defaultValue: false
|
|
65
|
+
}),
|
|
66
|
+
autoplay: (0, _types.createBoolProp)({
|
|
67
|
+
label: "Autoplay",
|
|
68
|
+
description: "Whether to Autoplay video",
|
|
69
|
+
defaultValue: false
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -16,4 +16,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
|
|
|
16
16
|
ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
19
|
+
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
|