@draftbit/core 46.2.4-25c40a.5 → 46.2.4-29b0f1.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.
Files changed (64) hide show
  1. package/lib/commonjs/components/Banner.js +4 -24
  2. package/lib/commonjs/components/Config.js +1 -1
  3. package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -17
  4. package/lib/commonjs/components/Picker/PickerComponent.android.js +5 -24
  5. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +2 -11
  6. package/lib/commonjs/components/SVG.js +4 -5
  7. package/lib/commonjs/components/Table/{table.js → Table.js} +0 -0
  8. package/lib/commonjs/components/Table/{tableCell.js → TableCell.js} +0 -0
  9. package/lib/commonjs/components/Table/{tableHeader.js → TableHeader.js} +0 -0
  10. package/lib/commonjs/components/Table/{tablePaginator.js → TablePaginator.js} +0 -0
  11. package/lib/commonjs/components/Table/{tableRow.js → TableRow.js} +0 -0
  12. package/lib/commonjs/components/Table/{tableTitle.js → TableTitle.js} +0 -0
  13. package/lib/commonjs/components/Table/index.js +12 -12
  14. package/lib/commonjs/components/Touchable.js +2 -16
  15. package/lib/commonjs/constants.js +1 -1
  16. package/lib/commonjs/mappings/SVG.js +2 -1
  17. package/lib/commonjs/mappings/StarRating.js +2 -6
  18. package/lib/commonjs/mappings/{table.js → Table.js} +0 -0
  19. package/lib/module/components/Config.js +1 -1
  20. package/lib/module/components/Portal/PortalManager.js +12 -20
  21. package/lib/module/components/SVG.js +4 -5
  22. package/lib/module/components/Table/{table.js → Table.js} +0 -0
  23. package/lib/module/components/Table/{tableCell.js → TableCell.js} +0 -0
  24. package/lib/module/components/Table/TableHeader.js +27 -0
  25. package/lib/module/components/Table/{tablePaginator.js → TablePaginator.js} +0 -0
  26. package/lib/module/components/Table/{tableRow.js → TableRow.js} +0 -0
  27. package/lib/module/components/Table/{tableTitle.js → TableTitle.js} +0 -0
  28. package/lib/module/components/Table/index.js +6 -6
  29. package/lib/module/mappings/SVG.js +3 -2
  30. package/lib/module/mappings/{table.js → Table.js} +0 -0
  31. package/lib/typescript/src/components/SVG.d.ts +2 -2
  32. package/lib/typescript/src/components/Table/{table.d.ts → Table.d.ts} +0 -0
  33. package/lib/typescript/src/components/Table/{tableCell.d.ts → TableCell.d.ts} +0 -0
  34. package/lib/typescript/src/components/Table/{tableHeader.d.ts → TableHeader.d.ts} +0 -0
  35. package/lib/typescript/src/components/Table/{tablePaginator.d.ts → TablePaginator.d.ts} +0 -0
  36. package/lib/typescript/src/components/Table/{tableRow.d.ts → TableRow.d.ts} +0 -0
  37. package/lib/typescript/src/components/Table/{tableTitle.d.ts → TableTitle.d.ts} +0 -0
  38. package/lib/typescript/src/components/Table/index.d.ts +6 -6
  39. package/lib/typescript/src/mappings/SVG.d.ts +1 -0
  40. package/lib/typescript/src/mappings/{table.d.ts → Table.d.ts} +0 -0
  41. package/package.json +4 -4
  42. package/src/components/Config.js +1 -1
  43. package/src/components/Config.ts +1 -1
  44. package/src/components/SVG.js +4 -5
  45. package/src/components/SVG.tsx +7 -7
  46. package/src/components/Table/{table.js → Table.js} +0 -0
  47. package/src/components/Table/{table.tsx → Table.tsx} +0 -0
  48. package/src/components/Table/{tableCell.js → TableCell.js} +0 -0
  49. package/src/components/Table/{tableCell.tsx → TableCell.tsx} +0 -0
  50. package/src/components/Table/{tableHeader.js → TableHeader.js} +0 -0
  51. package/src/components/Table/{tableHeader.tsx → TableHeader.tsx} +0 -0
  52. package/src/components/Table/{tablePaginator.js → TablePaginator.js} +0 -0
  53. package/src/components/Table/{tablePaginator.tsx → TablePaginator.tsx} +0 -0
  54. package/src/components/Table/{tableRow.js → TableRow.js} +0 -0
  55. package/src/components/Table/{tableRow.tsx → TableRow.tsx} +0 -0
  56. package/src/components/Table/{tableTitle.js → TableTitle.js} +0 -0
  57. package/src/components/Table/{tableTitle.tsx → TableTitle.tsx} +0 -0
  58. package/src/components/Table/index.js +6 -6
  59. package/src/components/Table/index.tsx +6 -6
  60. package/src/mappings/SVG.js +8 -2
  61. package/src/mappings/SVG.ts +12 -2
  62. package/src/mappings/{table.js → Table.js} +0 -0
  63. package/src/mappings/{table.ts → Table.ts} +0 -0
  64. package/lib/module/components/Table/tableHeader.js +0 -25
@@ -21,6 +21,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
21
21
 
22
22
  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; }
23
23
 
24
+ 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); }
25
+
24
26
  const ELEVATION = 1;
25
27
  const DEFAULT_MAX_WIDTH = 960;
26
28
 
@@ -92,9 +94,9 @@ const Banner = _ref => {
92
94
 
93
95
  const translateY = _reactNative.Animated.multiply(_reactNative.Animated.add(position, -1), layout.height);
94
96
 
95
- return /*#__PURE__*/React.createElement(_Surface.default, { ...rest,
97
+ return /*#__PURE__*/React.createElement(_Surface.default, _extends({}, rest, {
96
98
  style: [styles.container, (0, _shadow.default)(ELEVATION), style]
97
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
99
+ }), /*#__PURE__*/React.createElement(_reactNative.View, {
98
100
  style: [styles.wrapper, contentStyle]
99
101
  }, /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
100
102
  style: {
@@ -176,26 +178,4 @@ const styles = _reactNative.StyleSheet.create({
176
178
 
177
179
  var _default = (0, _theming.withTheme)(Banner);
178
180
 
179
- exports.default = _default;ow",
180
- justifyContent: "flex-start",
181
- marginHorizontal: 8,
182
- marginTop: 16,
183
- marginBottom: 0
184
- },
185
- icon: {
186
- margin: 8
187
- },
188
- message: {
189
- flex: 1,
190
- margin: 8
191
- },
192
- actions: {
193
- flexDirection: "row",
194
- justifyContent: "flex-end",
195
- margin: 8
196
- }
197
- });
198
-
199
- var _default = (0, _theming.withTheme)(Banner);
200
-
201
181
  exports.default = _default;
@@ -62,7 +62,7 @@ var _default = {
62
62
  width: size.width,
63
63
  height: size.height
64
64
  }, "image-placeholder_1"),
65
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
65
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
66
66
  squareImageUrl: buildImageUrl({
67
67
  width: 100,
68
68
  height: 100
@@ -13,6 +13,8 @@ var _Touchable = _interopRequireDefault(require("./Touchable"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
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
+
16
18
  const getWidth = numColumns => {
17
19
  switch (numColumns) {
18
20
  case 1:
@@ -35,23 +37,6 @@ const Card = _ref => {
35
37
  ...rest
36
38
  } = _ref;
37
39
  const width = getWidth(numColumns);
38
- return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
39
- disabled: !onPress,
40
- onPress: onPress,
41
- style: [style, {
42
- width
43
- }],
44
- ...rest
45
- }, children);
46
- };
47
-
48
- var _default = (0, _theming.withTheme)(Card);
49
-
50
- exports.default = _default;,
51
- style,
52
- ...rest
53
- } = _ref;
54
- const width = getWidth(numColumns);
55
40
  return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
56
41
  disabled: !onPress,
57
42
  onPress: onPress,
@@ -27,7 +27,11 @@ 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
+
30
32
  const Picker = _ref => {
33
+ var _options$find$label, _options$find;
34
+
31
35
  let {
32
36
  style,
33
37
  options,
@@ -37,9 +41,6 @@ const Picker = _ref => {
37
41
  onValueChange: onValueChangeOverride = () => {},
38
42
  ...props
39
43
  } = _ref;
40
-
41
- var _a, _b;
42
-
43
44
  const {
44
45
  viewStyles: {
45
46
  borderRadius,
@@ -86,7 +87,7 @@ const Picker = _ref => {
86
87
  };
87
88
 
88
89
  const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
89
- 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);
90
+ 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);
90
91
  return /*#__PURE__*/React.createElement(_Touchable.default, {
91
92
  disabled: disabled,
92
93
  onPress: toggleFocus,
@@ -110,26 +111,6 @@ const Picker = _ref => {
110
111
  key: o.value
111
112
  }))), /*#__PURE__*/React.createElement(_reactNative.View, {
112
113
  pointerEvents: "none"
113
- }, /*#__PURE__*/React.createElement(_TextField.default, { ...props,
114
- value: selectedLabel,
115
- placeholder: placeholder,
116
- // @ts-ignore
117
- ref: textField,
118
- disabled: disabled,
119
- // @ts-expect-error
120
- style: stylesWithoutMargin
121
- }))));
122
- };
123
-
124
- const styles = _reactNative.StyleSheet.create({
125
- container: {
126
- alignSelf: "stretch"
127
- }
128
- });
129
-
130
- var _default = (0, _theming.withTheme)(Picker);
131
-
132
- exports.default = _default; pointerEvents: "none"
133
114
  }, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
134
115
  value: selectedLabel,
135
116
  placeholder: placeholder // @ts-ignore
@@ -17,6 +17,8 @@ var _RadioButtonGroup = _interopRequireDefault(require("./RadioButtonGroup"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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
+
20
22
  const RadioButtonFieldGroup = _ref => {
21
23
  let {
22
24
  label,
@@ -33,17 +35,6 @@ const RadioButtonFieldGroup = _ref => {
33
35
  fontSize: theme.typography.headline4.fontSize,
34
36
  color: theme.typography.headline4.color
35
37
  }, labelStyle]
36
- }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, {
37
- theme: theme,
38
- ...rest
39
- }, children));
40
- };
41
-
42
- var _default = (0, _theming.withTheme)(RadioButtonFieldGroup);
43
-
44
- exports.default = _default; fontSize: theme.typography.headline4.fontSize,
45
- color: theme.typography.headline4.color
46
- }, labelStyle]
47
38
  }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, _extends({
48
39
  theme: theme
49
40
  }, rest), children));
@@ -21,26 +21,25 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
21
21
 
22
22
  const SVG = _ref => {
23
23
  let {
24
- source,
24
+ source = _Config.default.placeholderSvgURL,
25
25
  style
26
26
  } = _ref;
27
- let svgSource = source === null || source === undefined ? _Config.default.placeholderSvgURL : source;
28
27
  return /*#__PURE__*/React.createElement(React.Fragment, null, _reactNative.Platform.OS === "ios" && /*#__PURE__*/React.createElement(_reactNative.View, {
29
28
  style: style
30
29
  }, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
31
30
  width: "100%",
32
31
  height: "100%",
33
- uri: svgSource
32
+ uri: source
34
33
  })), _reactNative.Platform.OS === "android" && /*#__PURE__*/React.createElement(_reactNative.View, {
35
34
  style: style
36
35
  }, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
37
36
  width: "100%",
38
37
  height: "100%",
39
- uri: svgSource
38
+ uri: source
40
39
  })), _reactNative.Platform.OS === "web" && /*#__PURE__*/React.createElement(_reactNative.Image, {
41
40
  style: style,
42
41
  source: {
43
- uri: svgSource
42
+ uri: source
44
43
  }
45
44
  }));
46
45
  };
@@ -6,50 +6,50 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "Table", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _table.default;
9
+ return _Table.default;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "TableCell", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _tableCell.default;
15
+ return _TableCell.default;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "TableHeader", {
19
19
  enumerable: true,
20
20
  get: function () {
21
- return _tableHeader.default;
21
+ return _TableHeader.default;
22
22
  }
23
23
  });
24
24
  Object.defineProperty(exports, "TablePaginator", {
25
25
  enumerable: true,
26
26
  get: function () {
27
- return _tablePaginator.default;
27
+ return _TablePaginator.default;
28
28
  }
29
29
  });
30
30
  Object.defineProperty(exports, "TableRow", {
31
31
  enumerable: true,
32
32
  get: function () {
33
- return _tableRow.default;
33
+ return _TableRow.default;
34
34
  }
35
35
  });
36
36
  Object.defineProperty(exports, "TableTitle", {
37
37
  enumerable: true,
38
38
  get: function () {
39
- return _tableTitle.default;
39
+ return _TableTitle.default;
40
40
  }
41
41
  });
42
42
 
43
- var _table = _interopRequireDefault(require("./table"));
43
+ var _Table = _interopRequireDefault(require("./Table"));
44
44
 
45
- var _tableHeader = _interopRequireDefault(require("./tableHeader"));
45
+ var _TableHeader = _interopRequireDefault(require("./TableHeader"));
46
46
 
47
- var _tablePaginator = _interopRequireDefault(require("./tablePaginator"));
47
+ var _TablePaginator = _interopRequireDefault(require("./TablePaginator"));
48
48
 
49
- var _tableRow = _interopRequireDefault(require("./tableRow"));
49
+ var _TableRow = _interopRequireDefault(require("./TableRow"));
50
50
 
51
- var _tableCell = _interopRequireDefault(require("./tableCell"));
51
+ var _TableCell = _interopRequireDefault(require("./TableCell"));
52
52
 
53
- var _tableTitle = _interopRequireDefault(require("./tableTitle"));
53
+ var _TableTitle = _interopRequireDefault(require("./TableTitle"));
54
54
 
55
55
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -11,6 +11,8 @@ var _reactNative = require("react-native");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
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
+
14
16
  function Touchable(_ref) {
15
17
  let {
16
18
  children,
@@ -19,22 +21,6 @@ function Touchable(_ref) {
19
21
  style,
20
22
  ...props
21
23
  } = _ref;
22
- return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
23
- onPress: onPress,
24
- disabled: disabled,
25
- hitSlop: 8,
26
- style: _ref2 => {
27
- let {
28
- pressed
29
- } = _ref2;
30
- return [{
31
- opacity: pressed || disabled ? 0.75 : 1
32
- }, style];
33
- },
34
- ...props
35
- }, children);
36
- }rops
37
- } = _ref;
38
24
  return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
39
25
  onPress: onPress,
40
26
  disabled: disabled,
@@ -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;
@@ -16,8 +16,9 @@ const SEED_DATA = {
16
16
  width: 100,
17
17
  height: 100
18
18
  },
19
+ stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
19
20
  props: {
20
- source: (0, _types.createSvgProp)()
21
+ source: (0, _types.createSVGProp)()
21
22
  }
22
23
  };
23
24
  exports.SEED_DATA = SEED_DATA;
@@ -25,7 +25,9 @@ const SEED_DATA = {
25
25
  }),
26
26
  fieldName: (0, _types.createFieldNameProp)({
27
27
  defaultValue: "ratingValue",
28
+ // this is the name of the variable declared on the screen in Draftbit
28
29
  handlerPropName: "onPress",
30
+ // the change handler prop in this component
29
31
  valuePropName: "rating" // the value prop in this component
30
32
 
31
33
  }),
@@ -50,10 +52,4 @@ const SEED_DATA = {
50
52
  })
51
53
  }
52
54
  };
53
- exports.SEED_DATA = SEED_DATA;pes.createColorProp)({
54
- label: "Inactive Color",
55
- defaultValue: "divider"
56
- })
57
- }
58
- };
59
55
  exports.SEED_DATA = SEED_DATA;
File without changes
@@ -54,7 +54,7 @@ export default {
54
54
  width: size.width,
55
55
  height: size.height
56
56
  }, "image-placeholder_1"),
57
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
57
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
58
58
  squareImageUrl: buildImageUrl({
59
59
  width: 100,
60
60
  height: 100
@@ -1,26 +1,29 @@
1
+ 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; }
2
+
1
3
  import * as React from "react";
2
4
  import { View, StyleSheet } from "react-native";
5
+
3
6
  /**
4
7
  * Portal host is the component which actually renders all Portals.
5
8
  */
6
-
7
9
  export default class PortalManager extends React.PureComponent {
8
10
  constructor() {
9
11
  super(...arguments);
10
- this.state = {
12
+
13
+ _defineProperty(this, "state", {
11
14
  portals: []
12
- };
15
+ });
13
16
 
14
- this.mount = (key, children) => {
17
+ _defineProperty(this, "mount", (key, children) => {
15
18
  this.setState(state => ({
16
19
  portals: [...state.portals, {
17
20
  key,
18
21
  children
19
22
  }]
20
23
  }));
21
- };
24
+ });
22
25
 
23
- this.update = (key, children) => this.setState(state => ({
26
+ _defineProperty(this, "update", (key, children) => this.setState(state => ({
24
27
  portals: state.portals.map(item => {
25
28
  if (item.key === key) {
26
29
  return { ...item,
@@ -30,11 +33,11 @@ export default class PortalManager extends React.PureComponent {
30
33
 
31
34
  return item;
32
35
  })
33
- }));
36
+ })));
34
37
 
35
- this.unmount = key => this.setState(state => ({
38
+ _defineProperty(this, "unmount", key => this.setState(state => ({
36
39
  portals: state.portals.filter(item => item.key !== key)
37
- }));
40
+ })));
38
41
  }
39
42
 
40
43
  render() {
@@ -54,15 +57,4 @@ export default class PortalManager extends React.PureComponent {
54
57
  });
55
58
  }
56
59
 
57
- }ent(View, {
58
- key: key,
59
- collapsable: false
60
- /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */
61
- ,
62
- pointerEvents: "box-none",
63
- style: StyleSheet.absoluteFill
64
- }, children);
65
- });
66
- }
67
-
68
60
  }
@@ -5,26 +5,25 @@ import Config from "./Config";
5
5
 
6
6
  const SVG = _ref => {
7
7
  let {
8
- source,
8
+ source = Config.placeholderSvgURL,
9
9
  style
10
10
  } = _ref;
11
- let svgSource = source === null || source === undefined ? Config.placeholderSvgURL : source;
12
11
  return /*#__PURE__*/React.createElement(React.Fragment, null, Platform.OS === "ios" && /*#__PURE__*/React.createElement(View, {
13
12
  style: style
14
13
  }, /*#__PURE__*/React.createElement(SvgUri, {
15
14
  width: "100%",
16
15
  height: "100%",
17
- uri: svgSource
16
+ uri: source
18
17
  })), Platform.OS === "android" && /*#__PURE__*/React.createElement(View, {
19
18
  style: style
20
19
  }, /*#__PURE__*/React.createElement(SvgUri, {
21
20
  width: "100%",
22
21
  height: "100%",
23
- uri: svgSource
22
+ uri: source
24
23
  })), Platform.OS === "web" && /*#__PURE__*/React.createElement(Image, {
25
24
  style: style,
26
25
  source: {
27
- uri: svgSource
26
+ uri: source
28
27
  }
29
28
  }));
30
29
  };
@@ -0,0 +1,27 @@
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 +1,6 @@
1
- export { default as Table } from "./table";
2
- export { default as TableHeader } from "./tableHeader";
3
- export { default as TablePaginator } from "./tablePaginator";
4
- export { default as TableRow } from "./tableRow";
5
- export { default as TableCell } from "./tableCell";
6
- export { default as TableTitle } from "./tableTitle";
1
+ export { default as Table } from "./Table";
2
+ export { default as TableHeader } from "./TableHeader";
3
+ export { default as TablePaginator } from "./TablePaginator";
4
+ export { default as TableRow } from "./TableRow";
5
+ export { default as TableCell } from "./TableCell";
6
+ export { default as TableTitle } from "./TableTitle";
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createSvgProp } from "@draftbit/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,8 @@ export const SEED_DATA = {
8
8
  width: 100,
9
9
  height: 100
10
10
  },
11
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects],
11
12
  props: {
12
- source: createSvgProp()
13
+ source: createSVGProp()
13
14
  }
14
15
  };
File without changes
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import { StyleProp, ImageStyle } from "react-native";
3
3
  declare type SVGComponentProps = {
4
4
  source: string;
5
5
  style?: StyleProp<ImageStyle>;
6
6
  };
7
- declare const SVG: ({ source, style }: SVGComponentProps) => JSX.Element;
7
+ declare const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>>;
8
8
  export default SVG;
@@ -1,6 +1,6 @@
1
- export { default as Table } from "./table";
2
- export { default as TableHeader } from "./tableHeader";
3
- export { default as TablePaginator } from "./tablePaginator";
4
- export { default as TableRow } from "./tableRow";
5
- export { default as TableCell } from "./tableCell";
6
- export { default as TableTitle } from "./tableTitle";
1
+ export { default as Table } from "./Table";
2
+ export { default as TableHeader } from "./TableHeader";
3
+ export { default as TablePaginator } from "./TablePaginator";
4
+ export { default as TableRow } from "./TableRow";
5
+ export { default as TableCell } from "./TableCell";
6
+ export { default as TableTitle } from "./TableTitle";
@@ -7,6 +7,7 @@ export declare const SEED_DATA: {
7
7
  width: number;
8
8
  height: number;
9
9
  };
10
+ stylesPanelSections: string[];
10
11
  props: {
11
12
  source: {
12
13
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.2.4-25c40a.5+25c40a3d",
3
+ "version": "46.2.4-29b0f1.10+29b0f1d5",
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",
44
+ "@draftbit/types": "^46.3.0",
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": "25c40a3d0679730c3c3c55b8c82d8a2399a65fb2"
83
+ "gitHead": "29b0f1d5c71d0052f44eebee5d427e523e12f2a4"
84
84
  }
@@ -42,7 +42,7 @@ export default {
42
42
  cardIconElevation: 1,
43
43
  placeholderImageURL: "https://static.draftbit.com/images/placeholder-image" + getExtension(),
44
44
  getPlaceholderImageUrl: (size) => buildImageUrl({ width: size.width, height: size.height }, "image-placeholder_1"),
45
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
45
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
46
46
  squareImageUrl: buildImageUrl({ width: 100, height: 100 }, "Avatar"),
47
47
  FABSize: 40,
48
48
  FABBorderRadius: 20,
@@ -60,7 +60,7 @@ export default {
60
60
  { width: size.width, height: size.height },
61
61
  "image-placeholder_1"
62
62
  ),
63
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
63
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
64
64
  squareImageUrl: buildImageUrl({ width: 100, height: 100 }, "Avatar"),
65
65
  FABSize: 40,
66
66
  FABBorderRadius: 20,
@@ -2,13 +2,12 @@ import * as React from "react";
2
2
  import { View, Platform, Image } from "react-native";
3
3
  import { SvgUri } from "react-native-svg";
4
4
  import Config from "./Config";
5
- const SVG = ({ source, style }) => {
6
- let svgSource = source === null || source === undefined ? Config.placeholderSvgURL : source;
5
+ const SVG = ({ source = Config.placeholderSvgURL, style, }) => {
7
6
  return (React.createElement(React.Fragment, null,
8
7
  Platform.OS === "ios" && (React.createElement(View, { style: style },
9
- React.createElement(SvgUri, { width: "100%", height: "100%", uri: svgSource }))),
8
+ React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
10
9
  Platform.OS === "android" && (React.createElement(View, { style: style },
11
- React.createElement(SvgUri, { width: "100%", height: "100%", uri: svgSource }))),
12
- Platform.OS === "web" && (React.createElement(Image, { style: style, source: { uri: svgSource } }))));
10
+ React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
11
+ Platform.OS === "web" && (React.createElement(Image, { style: style, source: { uri: source } }))));
13
12
  };
14
13
  export default SVG;
@@ -9,24 +9,24 @@ type SVGComponentProps = {
9
9
  style?: StyleProp<ImageStyle>;
10
10
  };
11
11
 
12
- const SVG = ({ source, style }: SVGComponentProps) => {
13
- let svgSource =
14
- source === null || source === undefined ? Config.placeholderSvgURL : source;
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={svgSource} />
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={svgSource} />
25
+ <SvgUri width="100%" height="100%" uri={source} />
26
26
  </View>
27
27
  )}
28
28
  {Platform.OS === "web" && (
29
- <Image style={style} source={{ uri: svgSource }} />
29
+ <Image style={style} source={{ uri: source }} />
30
30
  )}
31
31
  </>
32
32
  );
File without changes
File without changes
@@ -1,6 +1,6 @@
1
- export { default as Table } from "./table";
2
- export { default as TableHeader } from "./tableHeader";
3
- export { default as TablePaginator } from "./tablePaginator";
4
- export { default as TableRow } from "./tableRow";
5
- export { default as TableCell } from "./tableCell";
6
- export { default as TableTitle } from "./tableTitle";
1
+ export { default as Table } from "./Table";
2
+ export { default as TableHeader } from "./TableHeader";
3
+ export { default as TablePaginator } from "./TablePaginator";
4
+ export { default as TableRow } from "./TableRow";
5
+ export { default as TableCell } from "./TableCell";
6
+ export { default as TableTitle } from "./TableTitle";
@@ -1,6 +1,6 @@
1
- export { default as Table } from "./table";
2
- export { default as TableHeader } from "./tableHeader";
3
- export { default as TablePaginator } from "./tablePaginator";
4
- export { default as TableRow } from "./tableRow";
5
- export { default as TableCell } from "./tableCell";
6
- export { default as TableTitle } from "./tableTitle";
1
+ export { default as Table } from "./Table";
2
+ export { default as TableHeader } from "./TableHeader";
3
+ export { default as TablePaginator } from "./TablePaginator";
4
+ export { default as TableRow } from "./TableRow";
5
+ export { default as TableCell } from "./TableCell";
6
+ export { default as TableTitle } from "./TableTitle";
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createSvgProp } from "@draftbit/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: createSvgProp(),
18
+ source: createSVGProp(),
13
19
  },
14
20
  };
@@ -1,4 +1,8 @@
1
- import { COMPONENT_TYPES, createSvgProp } from "@draftbit/types";
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: createSvgProp(),
23
+ source: createSVGProp(),
14
24
  },
15
25
  };
File without changes
File without changes
@@ -1,25 +0,0 @@
1
- import React from "react";
2
- import { View, StyleSheet } from "react-native";
3
- import { withTheme } from "../../theming";
4
-
5
- const TableHeader = _ref => {
6
- let {
7
- children,
8
- style,
9
- theme,
10
- ...rest
11
- } = _ref;
12
- return /*#__PURE__*/React.createElement(View, { ...rest,
13
- style: [styles.wrapper, {
14
- borderBottomColor: theme.colors.medium
15
- }, style]
16
- }, children);
17
- };
18
-
19
- const styles = StyleSheet.create({
20
- wrapper: {
21
- display: "flex",
22
- flexDirection: "row"
23
- }
24
- });
25
- export default withTheme(TableHeader);