@graphcommerce/graphcms-ui 2.106.9 → 2.106.13

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.106.12](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/graphcms-ui@2.106.11...@graphcommerce/graphcms-ui@2.106.12) (2021-12-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * make sure we're able to render table_header_cell and do not throw when rendering unknown elements in production ([f7b7972](https://github.com/ho-nl/m2-pwa/commit/f7b797272f5765801c3f2e217fa9905f65dbe6d6))
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.106.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/graphcms-ui@2.105.4...@graphcommerce/graphcms-ui@2.106.0) (2021-12-01)
7
18
 
8
19
 
@@ -22,6 +22,7 @@ export interface Element {
22
22
  | 'list-item-child'
23
23
  | 'table'
24
24
  | 'table_head'
25
+ | 'table_header_cell'
25
26
  | 'table_body'
26
27
  | 'table_row'
27
28
  | 'table_cell'
@@ -283,6 +284,12 @@ function RenderElement({ classes, ...element }: ElementNode & Required<UseRichTe
283
284
  <RenderChildren {...element} classes={classes} />
284
285
  </thead>
285
286
  )
287
+ case 'table_header_cell':
288
+ return (
289
+ <th>
290
+ <RenderChildren {...element} classes={classes} />
291
+ </th>
292
+ )
286
293
  case 'table_body':
287
294
  return (
288
295
  <tbody>
@@ -302,8 +309,11 @@ function RenderElement({ classes, ...element }: ElementNode & Required<UseRichTe
302
309
  </td>
303
310
  )
304
311
  default:
305
- console.error(element)
306
- throw Error(`RichText: Unknown Element: ${element.type}`)
312
+ if (process.env.NODE_ENV !== 'production') {
313
+ console.error(element)
314
+ throw Error(`RichText: Unknown Element: ${element.type}`)
315
+ }
316
+ return <RenderChildren {...element} classes={classes} />
307
317
  }
308
318
  }
309
319
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/graphcms-ui",
3
- "version": "2.106.9",
3
+ "version": "2.106.13",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -14,15 +14,15 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@graphcommerce/browserslist-config-pwa": "^3.0.2",
17
- "@graphcommerce/eslint-config-pwa": "^3.1.7",
17
+ "@graphcommerce/eslint-config-pwa": "^3.1.8",
18
18
  "@graphcommerce/prettier-config-pwa": "^3.0.4",
19
19
  "@graphcommerce/typescript-config-pwa": "^3.1.1",
20
20
  "@playwright/test": "^1.17.1"
21
21
  },
22
22
  "dependencies": {
23
23
  "@apollo/client": "^3.5.6",
24
- "@graphcommerce/image": "^2.105.7",
25
- "@graphcommerce/next-ui": "^3.20.7",
24
+ "@graphcommerce/image": "^2.105.8",
25
+ "@graphcommerce/next-ui": "^3.21.1",
26
26
  "@material-ui/core": "^4.12.3",
27
27
  "@material-ui/lab": "^4.0.0-alpha.60",
28
28
  "next": "^12.0.7",
@@ -30,5 +30,5 @@
30
30
  "react-dom": "^17.0.2",
31
31
  "type-fest": "^2.8.0"
32
32
  },
33
- "gitHead": "f8974380ace982793000e5b181b5bb314a1945fb"
33
+ "gitHead": "6cab980582a62a8eee8d5f9bd77583cabc32c6f8"
34
34
  }