@draftbit/core 46.10.2-da1334.2 → 46.10.2-eb07a0.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.
@@ -57,7 +57,6 @@ function extractBorderAndMarginStyles(style, additionalBorderStyles, additionalM
57
57
  marginStyles
58
58
  };
59
59
  }
60
-
61
60
  /**
62
61
  * Merges a style object on top of another style object. In React Native,
63
62
  * keys with undefined values in a style object will still override styles
@@ -90,4 +89,4 @@ function getValueForRadioButton(value) {
90
89
  } else {
91
90
  throw new Error("Invalid value: ".concat(value));
92
91
  }
93
- }
92
+ }}
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { View, StyleSheet } from "react-native";
3
4
  import omit from "lodash.omit";
@@ -7,6 +8,7 @@ import { extractStyles } from "../../utilities";
7
8
  import TextField from "../TextField";
8
9
  import Touchable from "../Touchable";
9
10
  const Picker = _ref => {
11
+ var _options$find$label, _options$find;
10
12
  let {
11
13
  style,
12
14
  options,
@@ -16,7 +18,6 @@ const Picker = _ref => {
16
18
  onValueChange: onValueChangeOverride = () => {},
17
19
  ...props
18
20
  } = _ref;
19
- var _a, _b;
20
21
  const {
21
22
  viewStyles: {
22
23
  borderRadius,
@@ -61,7 +62,7 @@ const Picker = _ref => {
61
62
  };
62
63
 
63
64
  const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
64
- const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
65
+ const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
65
66
  return /*#__PURE__*/React.createElement(Touchable, {
66
67
  disabled: disabled,
67
68
  onPress: toggleFocus,
@@ -83,25 +84,6 @@ const Picker = _ref => {
83
84
  label: o.label,
84
85
  value: o.value,
85
86
  key: o.value
86
- }))), /*#__PURE__*/React.createElement(View, {
87
- pointerEvents: "none"
88
- }, /*#__PURE__*/React.createElement(TextField, {
89
- ...props,
90
- value: selectedLabel,
91
- placeholder: placeholder,
92
- // @ts-ignore
93
- ref: textField,
94
- disabled: disabled,
95
- // @ts-expect-error
96
- style: stylesWithoutMargin
97
- }))));
98
- };
99
- const styles = StyleSheet.create({
100
- container: {
101
- alignSelf: "stretch"
102
- }
103
- });
104
- export default withTheme(Picker);y: o.value
105
87
  }))), /*#__PURE__*/React.createElement(View, {
106
88
  pointerEvents: "none"
107
89
  }, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
@@ -1,10 +1,56 @@
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
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
1
  import * as React from "react";
6
2
  import { Text as NativeText, I18nManager } from "react-native";
7
3
  import { withTheme } from "../theming";
4
+ class Text extends React.Component {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.state = {
8
+ nativeProps: {}
9
+ };
10
+ }
11
+ setNativeProps(args) {
12
+ this.state.nativeProps = args || {};
13
+ }
14
+ render() {
15
+ const {
16
+ style,
17
+ ...rest
18
+ } = this.props;
19
+ const writingDirection = I18nManager.isRTL ? "rtl" : "ltr";
20
+ return /*#__PURE__*/React.createElement(NativeText, {
21
+ ...rest,
22
+ ...this.state.nativeProps,
23
+ ref: c => {
24
+ this._root = c;
25
+ },
26
+ style: [{
27
+ textAlign: "left",
28
+ writingDirection
29
+ }, style]
30
+ });
31
+ }
32
+ }
33
+ export const BaseLink = _ref => {
34
+ let {
35
+ style,
36
+ theme,
37
+ title,
38
+ ...props
39
+ } = _ref;
40
+ return /*#__PURE__*/React.createElement(Text, {
41
+ hitSlop: 8,
42
+ style: [{
43
+ color: theme.colors.primary
44
+ }, style],
45
+ theme: theme,
46
+ ...props
47
+ }, title);
48
+ };
49
+ const Link = withTheme(BaseLink);
50
+ export { Link };
51
+ export default withTheme(Text); as React from "react";
52
+ import { Text as NativeText, I18nManager } from "react-native";
53
+ import { withTheme } from "../theming";
8
54
  class Text extends React.Component {
9
55
  constructor() {
10
56
  super(...arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.10.2-da1334.2+da13341",
3
+ "version": "46.10.2-eb07a0.2+eb07a09",
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.10.2-da1334.2+da13341",
44
+ "@draftbit/types": "^46.10.2-eb07a0.2+eb07a09",
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",
@@ -64,7 +64,6 @@
64
64
  "react-native-tab-view": "^3.4.0",
65
65
  "react-native-typography": "^1.4.1",
66
66
  "react-native-web-swiper": "^2.2.3",
67
- "react-native-web-webview": "^1.0.2",
68
67
  "react-native-youtube-iframe": "^2.2.2"
69
68
  },
70
69
  "devDependencies": {
@@ -100,5 +99,5 @@
100
99
  ]
101
100
  ]
102
101
  },
103
- "gitHead": "da13341a2da679db799e72e83ef807514444daf1"
102
+ "gitHead": "eb07a09ea939c7b77b50db377521e66deded8fdf"
104
103
  }