@khanacademy/wonder-blocks-grid 1.0.26 → 1.0.27

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/dist/es/index.js CHANGED
@@ -247,7 +247,9 @@ class Row extends Component {
247
247
  mediaSize,
248
248
  totalColumns
249
249
  }) : children;
250
- const filteredContents = Children.toArray(contents).filter( // Flow doesn't let us check .type on a non-null React.Node so
250
+ const filteredContents = Children.toArray(contents) // Go through all of the contents and pre-emptively remove anything
251
+ // that shouldn't be rendered.
252
+ .filter( // Flow doesn't let us check .type on a non-null React.Node so
251
253
  // we have to cast it to any.
252
254
  item => Cell.isClassOf(item) ? Cell.shouldDisplay(item.props, mediaSize) : true) // Intersperse Gutter elements between the cells.
253
255
  .reduce((acc, elem, index) => [].concat(acc, [elem, /*#__PURE__*/createElement(Gutter, {
package/dist/index.js CHANGED
@@ -700,7 +700,9 @@ class Row extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
700
700
  mediaSize,
701
701
  totalColumns
702
702
  }) : children;
703
- const filteredContents = react__WEBPACK_IMPORTED_MODULE_0__["Children"].toArray(contents).filter( // Flow doesn't let us check .type on a non-null React.Node so
703
+ const filteredContents = react__WEBPACK_IMPORTED_MODULE_0__["Children"].toArray(contents) // Go through all of the contents and pre-emptively remove anything
704
+ // that shouldn't be rendered.
705
+ .filter( // Flow doesn't let us check .type on a non-null React.Node so
704
706
  // we have to cast it to any.
705
707
  item => _cell_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].isClassOf(item) ? _cell_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].shouldDisplay(item.props, mediaSize) : true) // Intersperse Gutter elements between the cells.
706
708
  .reduce((acc, elem, index) => [].concat(acc, [elem, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_gutter_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-grid",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -15,17 +15,17 @@
15
15
  "author": "",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@babel/runtime": "^7.13.10",
19
- "@khanacademy/wonder-blocks-color": "^1.1.19",
20
- "@khanacademy/wonder-blocks-core": "^3.2.0",
21
- "@khanacademy/wonder-blocks-spacing": "^3.0.4"
18
+ "@babel/runtime": "^7.16.3",
19
+ "@khanacademy/wonder-blocks-color": "^1.1.20",
20
+ "@khanacademy/wonder-blocks-core": "^4.0.0",
21
+ "@khanacademy/wonder-blocks-spacing": "^3.0.5"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "aphrodite": "^1.2.5",
25
25
  "react": "16.14.0"
26
26
  },
27
27
  "devDependencies": {
28
- "wb-dev-build-settings": "^0.1.2"
28
+ "wb-dev-build-settings": "^0.2.0"
29
29
  },
30
- "gitHead": "b6193f70c73e70fbaf76bc688dc69a47fb1d0ef3"
30
+ "gitHead": "9ebea88533e702011165072f090a377e02fa3f0f"
31
31
  }
@@ -93,32 +93,34 @@ export default class Row extends React.Component<Props> {
93
93
  ? children({mediaSize, totalColumns})
94
94
  : children;
95
95
 
96
- const filteredContents: Array<React.Node> = (React.Children.toArray(
97
- contents,
98
- ): Array<React.Node>)
99
- // Go through all of the contents and pre-emptively remove anything
100
- // that shouldn't be rendered.
101
- .filter(
102
- // Flow doesn't let us check .type on a non-null React.Node so
103
- // we have to cast it to any.
104
- (item: any) =>
105
- Cell.isClassOf(item)
106
- ? Cell.shouldDisplay(item.props, mediaSize)
107
- : true,
108
- )
109
- // Intersperse Gutter elements between the cells.
110
- .reduce(
111
- (acc, elem, index) => [
112
- ...acc,
113
- elem,
114
- <Gutter key={`gutter-${index}`} />,
115
- ],
116
- [],
117
- )
118
- // We only want gutters between each cell in the row. The reduce
119
- // adds a gutter after every cell so we need to remove the last
120
- // element which is an unnecessary gutteer.
121
- .slice(0, -1);
96
+ const filteredContents: Array<React.Node> =
97
+ (React.Children.toArray(contents): Array<React.Node>)
98
+ // Go through all of the contents and pre-emptively remove anything
99
+ // that shouldn't be rendered.
100
+ .filter(
101
+ // Flow doesn't let us check .type on a non-null React.Node so
102
+ // we have to cast it to any.
103
+ (item: any) =>
104
+ Cell.isClassOf(item)
105
+ ? Cell.shouldDisplay(
106
+ item.props,
107
+ mediaSize,
108
+ )
109
+ : true,
110
+ )
111
+ // Intersperse Gutter elements between the cells.
112
+ .reduce(
113
+ (acc, elem, index) => [
114
+ ...acc,
115
+ elem,
116
+ <Gutter key={`gutter-${index}`} />,
117
+ ],
118
+ [],
119
+ )
120
+ // We only want gutters between each cell in the row. The reduce
121
+ // adds a gutter after every cell so we need to remove the last
122
+ // element which is an unnecessary gutteer.
123
+ .slice(0, -1);
122
124
 
123
125
  return (
124
126
  <View