@graphcommerce/next-ui 3.4.0 → 3.5.0
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/Blog/BlogAuthor/index.tsx +0 -1
- package/CHANGELOG.md +11 -0
- package/RenderType/index.tsx +4 -4
- package/Row/SpecialBanner/index.tsx +1 -1
- package/package.json +2 -2
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
|
+
# [3.5.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.4.0...@graphcommerce/next-ui@3.5.0) (2021-10-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **graphcms:** combined multiple models to bypass model creation limit ([fd6dc14](https://github.com/ho-nl/m2-pwa/commit/fd6dc140cb60c5733dab2e0a43b5df2059e0c739))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.4.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.3.3...@graphcommerce/next-ui@3.4.0) (2021-10-15)
|
|
7
18
|
|
|
8
19
|
|
package/RenderType/index.tsx
CHANGED
|
@@ -13,14 +13,14 @@ type TypeRenderMethod<P> = (props: P) => React.ReactElement | null
|
|
|
13
13
|
type TypeRenderMap<
|
|
14
14
|
T extends TypeObject,
|
|
15
15
|
TypeNames extends string,
|
|
16
|
-
TAdd extends Record<string, unknown
|
|
16
|
+
TAdd extends Record<string, unknown>,
|
|
17
17
|
> = {
|
|
18
18
|
[K in TypeNames]: TypeRenderMethod<FilterTypeByTypename<T, K> & TAdd>
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export type TypeRenderer<
|
|
22
22
|
T extends TypeObject,
|
|
23
|
-
TAdd extends Record<string, unknown> = Record<string, unknown
|
|
23
|
+
TAdd extends Record<string, unknown> = Record<string, unknown>,
|
|
24
24
|
> = TypeRenderMap<T, T['__typename'], TAdd>
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -29,12 +29,12 @@ export type TypeRenderer<
|
|
|
29
29
|
*/
|
|
30
30
|
export default function RenderType<
|
|
31
31
|
T extends TypeObject,
|
|
32
|
-
A extends Record<string, unknown> = Record<string, unknown
|
|
32
|
+
A extends Record<string, unknown> = Record<string, unknown>,
|
|
33
33
|
>(props: { renderer: TypeRenderer<T, A> } & FilterTypeByTypename<T, T['__typename']> & A) {
|
|
34
34
|
const { renderer, __typename, ...typeItemProps } = props
|
|
35
35
|
const TypeItem: TypeRenderMethod<typeof typeItemProps> = renderer[__typename]
|
|
36
36
|
? renderer[__typename]
|
|
37
|
-
: () => <>{__typename}</>
|
|
37
|
+
: () => <>{process.env.NODE_ENV !== 'production' ? __typename : ''}</>
|
|
38
38
|
|
|
39
39
|
return <TypeItem {...typeItemProps} __typename={__typename} />
|
|
40
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"project": "./tsconfig.json"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "08f4dbe739a38ece2c47aa1e94c10f8397da27fa"
|
|
59
59
|
}
|