@draftbit/core 46.10.3-d37409.2 → 46.10.3-dd9206.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 (89) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +23 -4
  2. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -23
  3. package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
  4. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +23 -5
  5. package/lib/commonjs/components/Table/Table.js +3 -7
  6. package/lib/commonjs/constants.js +1 -1
  7. package/lib/module/components/Table/Table.js +2 -7
  8. package/lib/typescript/src/components/Table/Table.d.ts.map +1 -1
  9. package/package.json +3 -3
  10. package/src/components/Table/Table.js +1 -5
  11. package/src/components/Table/Table.tsx +1 -5
  12. package/lib/commonjs/components/DeprecatedCardWrapper.js +0 -40
  13. package/lib/commonjs/components/DeprecatedFAB.js +0 -157
  14. package/lib/commonjs/components/ProgressIndicator.js +0 -55
  15. package/lib/commonjs/components/ResizeMode.js +0 -5
  16. package/lib/commonjs/mappings/CardBlock.js +0 -126
  17. package/lib/commonjs/mappings/CardContainer.js +0 -108
  18. package/lib/commonjs/mappings/CardContainerRating.js +0 -130
  19. package/lib/commonjs/mappings/CardContainerShortImage.js +0 -124
  20. package/lib/commonjs/mappings/CardInline.js +0 -59
  21. package/lib/commonjs/mappings/HeaderLarge.js +0 -34
  22. package/lib/commonjs/mappings/HeaderMedium.js +0 -60
  23. package/lib/commonjs/mappings/HeaderOverline.js +0 -60
  24. package/lib/commonjs/mappings/ProgressIndicator.js +0 -188
  25. package/lib/module/components/DeprecatedCardWrapper.js +0 -32
  26. package/lib/module/components/DeprecatedFAB.js +0 -147
  27. package/lib/module/components/ProgressIndicator.js +0 -45
  28. package/lib/module/components/ResizeMode.js +0 -1
  29. package/lib/module/mappings/CardBlock.js +0 -119
  30. package/lib/module/mappings/CardContainer.js +0 -101
  31. package/lib/module/mappings/CardContainerRating.js +0 -123
  32. package/lib/module/mappings/CardContainerShortImage.js +0 -117
  33. package/lib/module/mappings/CardInline.js +0 -52
  34. package/lib/module/mappings/HeaderLarge.js +0 -27
  35. package/lib/module/mappings/HeaderMedium.js +0 -53
  36. package/lib/module/mappings/HeaderOverline.js +0 -53
  37. package/lib/module/mappings/ProgressIndicator.js +0 -181
  38. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +0 -15
  39. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +0 -1
  40. package/lib/typescript/src/components/DeprecatedFAB.d.ts +0 -56
  41. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +0 -1
  42. package/lib/typescript/src/components/ProgressIndicator.d.ts +0 -24
  43. package/lib/typescript/src/components/ProgressIndicator.d.ts.map +0 -1
  44. package/lib/typescript/src/components/ResizeMode.d.ts +0 -2
  45. package/lib/typescript/src/components/ResizeMode.d.ts.map +0 -1
  46. package/lib/typescript/src/mappings/CardBlock.d.ts +0 -289
  47. package/lib/typescript/src/mappings/CardBlock.d.ts.map +0 -1
  48. package/lib/typescript/src/mappings/CardContainer.d.ts +0 -102
  49. package/lib/typescript/src/mappings/CardContainer.d.ts.map +0 -1
  50. package/lib/typescript/src/mappings/CardContainerRating.d.ts +0 -108
  51. package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +0 -1
  52. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +0 -139
  53. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +0 -1
  54. package/lib/typescript/src/mappings/CardInline.d.ts +0 -62
  55. package/lib/typescript/src/mappings/CardInline.d.ts.map +0 -1
  56. package/lib/typescript/src/mappings/HeaderLarge.d.ts +0 -34
  57. package/lib/typescript/src/mappings/HeaderLarge.d.ts.map +0 -1
  58. package/lib/typescript/src/mappings/HeaderMedium.d.ts +0 -53
  59. package/lib/typescript/src/mappings/HeaderMedium.d.ts.map +0 -1
  60. package/lib/typescript/src/mappings/HeaderOverline.d.ts +0 -53
  61. package/lib/typescript/src/mappings/HeaderOverline.d.ts.map +0 -1
  62. package/lib/typescript/src/mappings/ProgressIndicator.d.ts +0 -181
  63. package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +0 -1
  64. package/src/components/DeprecatedCardWrapper.js +0 -18
  65. package/src/components/DeprecatedCardWrapper.tsx +0 -46
  66. package/src/components/DeprecatedFAB.js +0 -114
  67. package/src/components/DeprecatedFAB.tsx +0 -231
  68. package/src/components/ProgressIndicator.js +0 -27
  69. package/src/components/ProgressIndicator.tsx +0 -71
  70. package/src/components/ResizeMode.js +0 -1
  71. package/src/components/ResizeMode.ts +0 -7
  72. package/src/mappings/CardBlock.js +0 -123
  73. package/src/mappings/CardBlock.ts +0 -136
  74. package/src/mappings/CardContainer.js +0 -104
  75. package/src/mappings/CardContainer.ts +0 -116
  76. package/src/mappings/CardContainerRating.js +0 -126
  77. package/src/mappings/CardContainerRating.ts +0 -137
  78. package/src/mappings/CardContainerShortImage.js +0 -120
  79. package/src/mappings/CardContainerShortImage.ts +0 -130
  80. package/src/mappings/CardInline.js +0 -52
  81. package/src/mappings/CardInline.ts +0 -61
  82. package/src/mappings/HeaderLarge.js +0 -29
  83. package/src/mappings/HeaderLarge.ts +0 -38
  84. package/src/mappings/HeaderMedium.js +0 -55
  85. package/src/mappings/HeaderMedium.ts +0 -63
  86. package/src/mappings/HeaderOverline.js +0 -55
  87. package/src/mappings/HeaderOverline.ts +0 -63
  88. package/src/mappings/ProgressIndicator.js +0 -181
  89. package/src/mappings/ProgressIndicator.ts +0 -190
@@ -12,7 +12,6 @@ var _theming = require("../../theming");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  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; }
15
- 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); }
16
15
  const AccordionItem = _ref => {
17
16
  let {
18
17
  Icon,
@@ -27,9 +26,10 @@ const AccordionItem = _ref => {
27
26
  textStyles,
28
27
  viewStyles
29
28
  } = (0, _utilities.extractStyles)(style);
30
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
31
- style: [styles.container, viewStyles]
32
- }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
29
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
30
+ style: [styles.container, viewStyles],
31
+ ...rest
32
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
33
33
  style: styles.row
34
34
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
35
35
  name: icon,
@@ -61,4 +61,23 @@ const styles = _reactNative.StyleSheet.create({
61
61
  }
62
62
  });
63
63
  var _default = (0, _theming.withTheme)(AccordionItem);
64
+ exports.default = _default;.StyleSheet.create({
65
+ container: {
66
+ padding: 8
67
+ },
68
+ row: {
69
+ flexDirection: "row",
70
+ alignItems: "center",
71
+ paddingLeft: 8
72
+ },
73
+ item: {
74
+ marginVertical: 6,
75
+ paddingLeft: 8
76
+ },
77
+ content: {
78
+ flex: 1,
79
+ justifyContent: "center"
80
+ }
81
+ });
82
+ var _default = (0, _theming.withTheme)(AccordionItem);
64
83
  exports.default = _default;
@@ -13,7 +13,8 @@ var _utilities = require("../../utilities");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
  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; }
16
- var Direction;
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
+ let Direction;
17
18
  exports.Direction = Direction;
18
19
  (function (Direction) {
19
20
  Direction["Row"] = "row";
@@ -71,14 +72,13 @@ const CheckboxGroupRow = _ref => {
71
72
  textStyles,
72
73
  viewStyles
73
74
  } = (0, _utilities.extractStyles)(style);
74
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
75
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
75
76
  onPress: handlePress,
76
77
  style: [styles.mainParent, {
77
78
  flexDirection: direction
78
79
  }, viewStyles],
79
- disabled: disabled,
80
- ...rest
81
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
80
+ disabled: disabled
81
+ }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
82
82
  style: [styles.label, {
83
83
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
84
84
  }, labelContainerStyle]
@@ -117,22 +117,4 @@ const styles = _reactNative.StyleSheet.create({
117
117
  }
118
118
  });
119
119
  var _default = CheckboxGroupRow;
120
- exports.default = _default;center",
121
- justifyContent: "space-around",
122
- paddingStart: 20,
123
- minHeight: 50,
124
- paddingEnd: 20,
125
- display: "flex",
126
- ..._reactNative.Platform.select({
127
- web: {
128
- cursor: "pointer",
129
- userSelect: "none"
130
- }
131
- })
132
- },
133
- label: {
134
- flex: 3
135
- }
136
- });
137
- var _default = CheckboxGroupRow;
138
120
  exports.default = _default;
@@ -14,7 +14,8 @@ var _Checkbox = _interopRequireDefault(require("./Checkbox"));
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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
- var Direction;
17
+ 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); }
18
+ let Direction;
18
19
  exports.Direction = Direction;
19
20
  (function (Direction) {
20
21
  Direction["Row"] = "row";
@@ -57,6 +58,7 @@ const CheckboxRow = _ref => {
57
58
  setInternalValue(status);
58
59
  }
59
60
  }, [status]);
61
+
60
62
  // This special logic is to handle weird APIs like Airtable that return
61
63
  // true or undefined for a boolean
62
64
  const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
@@ -80,14 +82,13 @@ const CheckboxRow = _ref => {
80
82
  textStyles,
81
83
  viewStyles
82
84
  } = (0, _utilities.extractStyles)(style);
83
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
85
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
84
86
  onPress: handlePress,
85
87
  style: [viewStyles, styles.mainParent, {
86
88
  flexDirection: direction
87
89
  }],
88
- disabled: disabled,
89
- ...rest
90
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
90
+ disabled: disabled
91
+ }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
91
92
  style: [styles.label, {
92
93
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
93
94
  }, labelContainerStyle]
@@ -124,22 +125,4 @@ const styles = _reactNative.StyleSheet.create({
124
125
  }
125
126
  });
126
127
  var _default = CheckboxRow;
127
- exports.default = _default;ems: "center",
128
- justifyContent: "space-around",
129
- paddingStart: 20,
130
- minHeight: 50,
131
- paddingEnd: 20,
132
- display: "flex",
133
- ..._reactNative.Platform.select({
134
- web: {
135
- cursor: "pointer",
136
- userSelect: "none"
137
- }
138
- })
139
- },
140
- label: {
141
- flex: 3
142
- }
143
- });
144
- var _default = CheckboxRow;
145
128
  exports.default = _default;
@@ -14,8 +14,7 @@ var _utilities = require("../../utilities");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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
- 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); }
18
- let Direction;
17
+ var Direction;
19
18
  exports.Direction = Direction;
20
19
  (function (Direction) {
21
20
  Direction["Row"] = "row";
@@ -72,13 +71,14 @@ const RadioButtonRow = _ref => {
72
71
  textStyles,
73
72
  viewStyles
74
73
  } = (0, _utilities.extractStyles)(style);
75
- return /*#__PURE__*/React.createElement(_Touchable.default, _extends({
74
+ return /*#__PURE__*/React.createElement(_Touchable.default, {
76
75
  onPress: handlePress,
77
76
  style: [styles.mainParent, {
78
77
  flexDirection: direction
79
78
  }, viewStyles],
80
- disabled: disabled
81
- }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
79
+ disabled: disabled,
80
+ ...rest
81
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
82
82
  style: [styles.label, {
83
83
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
84
84
  }, labelContainerStyle]
@@ -116,4 +116,22 @@ const styles = _reactNative.StyleSheet.create({
116
116
  }
117
117
  });
118
118
  var _default = RadioButtonRow;
119
+ exports.default = _default; "center",
120
+ justifyContent: "space-around",
121
+ paddingStart: 20,
122
+ minHeight: 50,
123
+ paddingEnd: 20,
124
+ display: "flex",
125
+ ..._reactNative.Platform.select({
126
+ web: {
127
+ cursor: "pointer",
128
+ userSelect: "none"
129
+ }
130
+ })
131
+ },
132
+ label: {
133
+ flex: 3
134
+ }
135
+ });
136
+ var _default = RadioButtonRow;
119
137
  exports.default = _default;
@@ -9,8 +9,6 @@ var _reactNative = require("react-native");
9
9
  var _theming = require("../../theming");
10
10
  var _TableCommon = require("./TableCommon");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- //Comment
13
- //
14
12
  const Table = _ref => {
15
13
  let {
16
14
  theme,
@@ -88,7 +86,7 @@ const Table = _ref => {
88
86
  });
89
87
  const allHeaders = flattenedPossibleHeaders.filter(item => isTableHeader(item.props));
90
88
  if (allHeaders.length) {
91
- return allHeaders[0]; //Only 1 header rendered
89
+ return allHeaders[0]; //Only 1 header taken
92
90
  }
93
91
 
94
92
  return null;
@@ -120,8 +118,6 @@ const styles = _reactNative.StyleSheet.create({
120
118
  flex: 1
121
119
  }
122
120
  });
123
-
124
- //Comment
125
- //
126
121
  var _default = (0, _theming.withTheme)(Table);
127
- exports.default = _default;exports.default = _default;
122
+ exports.default = _default;
123
+ exports.default = _default;
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
12
12
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
13
13
  ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
14
14
  });
15
- exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
15
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
@@ -2,8 +2,6 @@ import React from "react";
2
2
  import { ScrollView, View, StyleSheet } from "react-native";
3
3
  import { withTheme } from "../../theming";
4
4
  import { generateBorderStyles, TableStyleContext } from "./TableCommon";
5
- //Comment
6
- //
7
5
  const Table = _ref => {
8
6
  let {
9
7
  theme,
@@ -81,7 +79,7 @@ const Table = _ref => {
81
79
  });
82
80
  const allHeaders = flattenedPossibleHeaders.filter(item => isTableHeader(item.props));
83
81
  if (allHeaders.length) {
84
- return allHeaders[0]; //Only 1 header rendered
82
+ return allHeaders[0]; //Only 1 header taken
85
83
  }
86
84
 
87
85
  return null;
@@ -113,7 +111,4 @@ const styles = StyleSheet.create({
113
111
  flex: 1
114
112
  }
115
113
  });
116
-
117
- //Comment
118
- //
119
- export default withTheme(Table);t default withTheme(Table);
114
+ export default withTheme(Table);rt default withTheme(Table);
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,SAAS,EACT,SAAS,EAGT,eAAe,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAEL,UAAU,EAGX,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,KAAK,CAAC,CAAC,CAAE,SAAQ,UAAU,EAAE,eAAe;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,UAAU,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IAC1E,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd;;;;AA2JD,wBAAgC"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,SAAS,EACT,SAAS,EAGT,eAAe,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAEL,UAAU,EAGX,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,KAAK,CAAC,CAAC,CAAE,SAAQ,UAAU,EAAE,eAAe;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,UAAU,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IAC1E,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd;;;;AAuJD,wBAAgC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.10.3-d37409.2+d37409a",
3
+ "version": "46.10.3-dd9206.2+dd92065",
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.3-d37409.2+d37409a",
44
+ "@draftbit/types": "^46.10.3-dd9206.2+dd92065",
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",
@@ -100,5 +100,5 @@
100
100
  ]
101
101
  ]
102
102
  },
103
- "gitHead": "d37409ab185fb81e9d3d5a2e4dba67a8f25a2969"
103
+ "gitHead": "dd9206518c64ba81e9faa15e9ea23a6a9e72a5b5"
104
104
  }
@@ -2,8 +2,6 @@ import React from "react";
2
2
  import { ScrollView, View, StyleSheet, } from "react-native";
3
3
  import { withTheme } from "../../theming";
4
4
  import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
5
- //Comment
6
- //
7
5
  const Table = ({ theme, borderWidth = 1, borderColor = theme.colors.divider, borderStyle = "solid", drawTopBorder = true, drawBottomBorder = false, drawStartBorder = false, drawEndBorder = false, cellVerticalPadding = 10, cellHorizontalPadding = 10, data, keyExtractor, renderItem, children: childrenProp, style, ...rest }) => {
8
6
  //Both 'renderItem' and 'data' are optional to allow direct children. But if one is included, both need to be included
9
7
  if ((data && !renderItem) || (renderItem && !data)) {
@@ -62,7 +60,7 @@ const Table = ({ theme, borderWidth = 1, borderColor = theme.colors.divider, bor
62
60
  });
63
61
  const allHeaders = flattenedPossibleHeaders.filter((item) => isTableHeader(item.props));
64
62
  if (allHeaders.length) {
65
- return allHeaders[0]; //Only 1 header rendered
63
+ return allHeaders[0]; //Only 1 header taken
66
64
  }
67
65
  return null;
68
66
  }, [validChildren, isTableHeader]);
@@ -92,6 +90,4 @@ const styles = StyleSheet.create({
92
90
  flex: 1,
93
91
  },
94
92
  });
95
- //Comment
96
- //
97
93
  export default withTheme(Table);
@@ -24,8 +24,6 @@ export interface Props<T> extends TableProps, ScrollViewProps {
24
24
  theme: Theme;
25
25
  }
26
26
 
27
- //Comment
28
- //
29
27
  const Table = <T extends object>({
30
28
  theme,
31
29
  borderWidth = 1,
@@ -136,7 +134,7 @@ const Table = <T extends object>({
136
134
  isTableHeader(item.props)
137
135
  );
138
136
  if (allHeaders.length) {
139
- return allHeaders[0]; //Only 1 header rendered
137
+ return allHeaders[0]; //Only 1 header taken
140
138
  }
141
139
  return null;
142
140
  }, [validChildren, isTableHeader]);
@@ -175,6 +173,4 @@ const styles = StyleSheet.create({
175
173
  },
176
174
  });
177
175
 
178
- //Comment
179
- //
180
176
  export default withTheme(Table);
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _theming = require("../theming");
9
- var _Touchable = _interopRequireDefault(require("./Touchable"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- 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); }
12
- const getWidth = numColumns => {
13
- switch (numColumns) {
14
- case 1:
15
- return "33%";
16
- case 2:
17
- return "50%";
18
- default:
19
- return "100%";
20
- }
21
- };
22
- const Card = _ref => {
23
- let {
24
- numColumns = 3,
25
- children,
26
- onPress,
27
- style,
28
- ...rest
29
- } = _ref;
30
- const width = getWidth(numColumns);
31
- return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
32
- disabled: !onPress,
33
- onPress: onPress,
34
- style: [style, {
35
- width
36
- }]
37
- }, rest), children);
38
- };
39
- var _default = (0, _theming.withTheme)(Card);
40
- exports.default = _default;
@@ -1,157 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _color = _interopRequireDefault(require("color"));
10
- var _Config = _interopRequireDefault(require("./Config"));
11
- var _Text = _interopRequireDefault(require("./Text"));
12
- var _Elevation = _interopRequireDefault(require("./Elevation"));
13
- var _theming = require("../theming");
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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
- 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); }
18
- const FAB = _ref => {
19
- let {
20
- Icon,
21
- icon,
22
- disabled = false,
23
- type = "solid",
24
- loading = false,
25
- color: colorOverride,
26
- label,
27
- onPress,
28
- elevation = 0,
29
- style,
30
- theme: {
31
- colors,
32
- disabledOpacity,
33
- roundness,
34
- typography
35
- },
36
- ...rest
37
- } = _ref;
38
- let backgroundColor, borderColor, textColor, borderWidth;
39
- const buttonColor = colorOverride || colors.primary;
40
- if (type === "standard" || type === "extended" || type === "fixed") {
41
- backgroundColor = buttonColor;
42
- if (disabled) {
43
- textColor = (0, _color.default)(colors.surface).alpha(disabledOpacity).rgb().string();
44
- } else {
45
- textColor = colors.surface;
46
- }
47
- } else {
48
- backgroundColor = "transparent";
49
- if (disabled) {
50
- textColor = (0, _color.default)(buttonColor).alpha(disabledOpacity).rgb().string();
51
- } else {
52
- textColor = buttonColor;
53
- }
54
- }
55
- if (type === "outline") {
56
- if (disabled) {
57
- borderColor = (0, _color.default)(buttonColor).alpha(disabledOpacity).rgb().string();
58
- } else {
59
- borderColor = buttonColor;
60
- }
61
- borderWidth = _reactNative.StyleSheet.hairlineWidth;
62
- } else {
63
- borderColor = "transparent";
64
- borderWidth = 0;
65
- }
66
- const buttonStyle = {
67
- backgroundColor,
68
- borderColor,
69
- borderWidth,
70
- borderRadius: roundness,
71
- alignItems: "center",
72
- justifyContent: "center"
73
- };
74
- const buttonStyles = [styles.button, buttonStyle];
75
- const contentStyle = [styles.content];
76
- const textStyle = {
77
- textAlign: "center",
78
- color: textColor
79
- };
80
- const iconStyle = [styles.icon, {
81
- width: _Config.default.buttonIconSize
82
- }];
83
- if (type === "standard" || type === "outline") {
84
- buttonStyle.width = _Config.default.FABSize;
85
- buttonStyle.height = _Config.default.FABSize;
86
- buttonStyle.borderRadius = _Config.default.FABBorderRadius;
87
- contentStyle.push({
88
- width: _Config.default.FABSize,
89
- height: _Config.default.FABSize
90
- });
91
- }
92
- if (type === "extended" || type === "fixed") {
93
- iconStyle.push({
94
- marginLeft: 16,
95
- marginRight: -8
96
- });
97
- textStyle.margin = 16;
98
- }
99
- if (type === "fixed") {
100
- buttonStyles.push({
101
- height: _Config.default.FABFixedHeight,
102
- alignSelf: "stretch"
103
- });
104
- }
105
- return /*#__PURE__*/React.createElement(_Elevation.default, {
106
- style: [{
107
- elevation
108
- }, style]
109
- }, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
110
- onPress: onPress,
111
- accessibilityState: {
112
- disabled
113
- },
114
- accessibilityRole: "button",
115
- disabled: disabled || loading,
116
- style: buttonStyles
117
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
118
- style: styles.content
119
- }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
120
- style: iconStyle
121
- }, /*#__PURE__*/React.createElement(Icon, {
122
- name: icon,
123
- size: _Config.default.buttonIconSize,
124
- color: textColor
125
- })) : null, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
126
- size: "small",
127
- color: textColor,
128
- style: iconStyle
129
- }) : null, label ? /*#__PURE__*/React.createElement(_Text.default, {
130
- numberOfLines: 1,
131
- style: [textStyle, typography.button]
132
- }, label) : null)));
133
- };
134
- const styles = _reactNative.StyleSheet.create({
135
- button: {
136
- borderStyle: "solid"
137
- },
138
- content: {
139
- flexDirection: "row",
140
- alignItems: "center",
141
- justifyContent: "center"
142
- },
143
- icon: {
144
- alignItems: "center",
145
- justifyContent: "center",
146
- width: _Config.default.buttonIconSize
147
- },
148
- fixed: {
149
- left: 0,
150
- right: 0,
151
- bottom: 0,
152
- height: 64,
153
- borderRadius: 0
154
- }
155
- });
156
- var _default = (0, _theming.withTheme)(FAB);
157
- exports.default = _default;
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _StepIndicator = _interopRequireDefault(require("./StepIndicator"));
9
- var _theming = require("../theming");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
- 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; }
13
- const ProgressIndicator = _ref => {
14
- let {
15
- numberOfSteps,
16
- currentStep,
17
- currentStepStrokeWidth = 3,
18
- stepStrokeCurrentColor = "primary",
19
- stepIndicatorSize,
20
- currentStepIndicatorSize,
21
- stepIndicatorCurrentColor,
22
- stepIndicatorLabelCurrentColor,
23
- stepIndicatorLabelFontSize = 12,
24
- stepNumberFinishedColor = "strongInverse",
25
- stepNumberUnfinishedColor = "primary",
26
- unfinishedColor = "light",
27
- finishedColor = "primary",
28
- theme
29
- } = _ref;
30
- const currentPosition = currentStep - 1;
31
- return /*#__PURE__*/React.createElement(_StepIndicator.default, {
32
- stepCount: numberOfSteps,
33
- currentPosition: currentPosition,
34
- customStyles: {
35
- stepIndicatorSize,
36
- currentStepIndicatorSize: currentStepIndicatorSize ? currentStepIndicatorSize : stepIndicatorSize,
37
- stepStrokeFinishedColor: finishedColor,
38
- stepStrokeUnFinishedColor: unfinishedColor,
39
- separatorFinishedColor: finishedColor,
40
- separatorUnFinishedColor: unfinishedColor,
41
- stepIndicatorFinishedColor: finishedColor,
42
- stepIndicatorUnFinishedColor: unfinishedColor,
43
- currentStepStrokeWidth,
44
- stepStrokeCurrentColor: stepStrokeCurrentColor || stepIndicatorCurrentColor,
45
- stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,
46
- stepIndicatorLabelFinishedColor: stepNumberFinishedColor,
47
- stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,
48
- stepIndicatorLabelCurrentColor: stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,
49
- stepIndicatorLabelFontSize,
50
- labelFontFamily: theme.typography.body1.fontFamily
51
- }
52
- });
53
- };
54
- var _default = (0, _theming.withTheme)(ProgressIndicator);
55
- exports.default = _default;
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });