@draftbit/core 46.2.4-cb2c54.5 → 46.2.4-cd53c5.9

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.
@@ -17,6 +17,8 @@ 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 _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; }
21
+
20
22
  const PortalContext = /*#__PURE__*/React.createContext(null);
21
23
  /**
22
24
  * Portal host renders all of its children `Portal` elements.
@@ -49,11 +51,11 @@ class PortalHost extends React.Component {
49
51
  constructor() {
50
52
  super(...arguments);
51
53
 
52
- this.setManager = manager => {
54
+ _defineProperty(this, "setManager", manager => {
53
55
  this.manager = manager;
54
- };
56
+ });
55
57
 
56
- this.mount = children => {
58
+ _defineProperty(this, "mount", children => {
57
59
  const key = this.nextKey++;
58
60
 
59
61
  if (this.manager) {
@@ -67,9 +69,9 @@ class PortalHost extends React.Component {
67
69
  }
68
70
 
69
71
  return key;
70
- };
72
+ });
71
73
 
72
- this.update = (key, children) => {
74
+ _defineProperty(this, "update", (key, children) => {
73
75
  if (this.manager) {
74
76
  this.manager.update(key, children);
75
77
  } else {
@@ -87,9 +89,9 @@ class PortalHost extends React.Component {
87
89
  this.queue.push(op);
88
90
  }
89
91
  }
90
- };
92
+ });
91
93
 
92
- this.unmount = key => {
94
+ _defineProperty(this, "unmount", key => {
93
95
  if (this.manager) {
94
96
  this.manager.unmount(key);
95
97
  } else {
@@ -98,10 +100,13 @@ class PortalHost extends React.Component {
98
100
  key
99
101
  });
100
102
  }
101
- };
103
+ });
104
+
105
+ _defineProperty(this, "nextKey", 0);
106
+
107
+ _defineProperty(this, "queue", []);
102
108
 
103
- this.nextKey = 0;
104
- this.queue = [];
109
+ _defineProperty(this, "manager", void 0);
105
110
  }
106
111
 
107
112
  componentDidMount() {
@@ -147,23 +152,6 @@ class PortalHost extends React.Component {
147
152
 
148
153
  }
149
154
 
150
- exports.default = PortalHost;
151
- PortalHost.displayName = "Portal.Host";
152
-
153
- const styles = _reactNative.StyleSheet.create({
154
- container: {
155
- flex: 1
156
- }
157
- }); style: styles.container,
158
- collapsable: false,
159
- pointerEvents: "box-none"
160
- }, this.props.children), /*#__PURE__*/React.createElement(_PortalManager.default, {
161
- ref: this.setManager
162
- }));
163
- }
164
-
165
- }
166
-
167
155
  exports.default = PortalHost;
168
156
 
169
157
  _defineProperty(PortalHost, "displayName", "Portal.Host");
@@ -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;AR_HEIGHT;
19
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
@@ -11,7 +11,6 @@ const SEED_DATA = {
11
11
  name: "SVG",
12
12
  tag: "SVG",
13
13
  description: "An SVG component",
14
- packageName: "@draftbit/core",
15
14
  category: _types.COMPONENT_TYPES.media,
16
15
  layout: {
17
16
  width: 100,
@@ -1,3 +1,5 @@
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
+
1
3
  import * as React from "react";
2
4
  import { View, StyleSheet, Pressable } from "react-native";
3
5
  import { withTheme } from "../theming";
@@ -32,10 +34,9 @@ const StarRating = _ref => {
32
34
  !!onPress && onPress(r);
33
35
  }, [onPress]);
34
36
  const ratingRounded = Math.round(localRating * 2) / 2;
35
- return /*#__PURE__*/React.createElement(View, {
36
- style: [styles.container, style],
37
- ...rest
38
- }, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
37
+ return /*#__PURE__*/React.createElement(View, _extends({
38
+ style: [styles.container, style]
39
+ }, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
39
40
  key: i,
40
41
  style: {
41
42
  display: "flex"
@@ -76,24 +77,4 @@ const styles = StyleSheet.create({
76
77
  width: "50%"
77
78
  }
78
79
  });
79
- export default withTheme(StarRating);ontainer: {
80
- flexDirection: "row",
81
- alignItems: "center"
82
- },
83
- touchContainer: {
84
- display: "flex",
85
- flexDirection: "row",
86
- position: "absolute",
87
- top: 0,
88
- right: 0,
89
- left: 0,
90
- bottom: 0,
91
- zIndex: 1
92
- },
93
- pressable: {
94
- flex: 1,
95
- height: "100%",
96
- width: "50%"
97
- }
98
- });
99
80
  export default withTheme(StarRating);
@@ -5,5 +5,4 @@ const DEFAULT_STATUSBAR_HEIGHT_EXPO = expo !== null && expo !== void 0 && expo.C
5
5
  export const APPROX_STATUSBAR_HEIGHT = Platform.select({
6
6
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
7
7
  ios: Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
8
- });PO : 0
9
8
  });
@@ -3,7 +3,6 @@ export const SEED_DATA = {
3
3
  name: "SVG",
4
4
  tag: "SVG",
5
5
  description: "An SVG component",
6
- packageName: "@draftbit/core",
7
6
  category: COMPONENT_TYPES.media,
8
7
  layout: {
9
8
  width: 100,
@@ -2,7 +2,6 @@ export declare const SEED_DATA: {
2
2
  name: string;
3
3
  tag: string;
4
4
  description: string;
5
- packageName: string;
6
5
  category: string;
7
6
  layout: {
8
7
  width: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.2.4-cb2c54.5+cb2c5435",
3
+ "version": "46.2.4-cd53c5.9+cd53c59b",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^46.2.4-cb2c54.5+cb2c5435",
44
+ "@draftbit/types": "^46.2.4-cd53c5.9+cd53c59b",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -53,7 +53,7 @@
53
53
  "lodash.omit": "^4.5.0",
54
54
  "lodash.tonumber": "^4.0.3",
55
55
  "react-native-modal-datetime-picker": "^13.0.0",
56
- "react-native-svg": "^12.3.0",
56
+ "react-native-svg": "12.3.0",
57
57
  "react-native-typography": "^1.4.1",
58
58
  "react-native-web-swiper": "^2.2.3"
59
59
  },
@@ -80,5 +80,5 @@
80
80
  ]
81
81
  ]
82
82
  },
83
- "gitHead": "cb2c543552734b1e7d7056d04da2430dd5a6e4b5"
83
+ "gitHead": "cd53c59b7ac033cb8ec4bedeb49f073d78bcef65"
84
84
  }
@@ -3,7 +3,6 @@ export const SEED_DATA = {
3
3
  name: "SVG",
4
4
  tag: "SVG",
5
5
  description: "An SVG component",
6
- packageName: "@draftbit/core",
7
6
  category: COMPONENT_TYPES.media,
8
7
  layout: {
9
8
  width: 100,
@@ -8,7 +8,6 @@ export const SEED_DATA = {
8
8
  name: "SVG",
9
9
  tag: "SVG",
10
10
  description: "An SVG component",
11
- packageName: "@draftbit/core",
12
11
  category: COMPONENT_TYPES.media,
13
12
  layout: {
14
13
  width: 100,