@graphcommerce/magento-cms 9.0.4-canary.9 → 9.1.0-canary.15

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
@@ -1,5 +1,21 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.15
4
+
5
+ ## 9.0.4-canary.14
6
+
7
+ ## 9.0.4-canary.13
8
+
9
+ ## 9.0.4-canary.12
10
+
11
+ ## 9.0.4-canary.11
12
+
13
+ ### Patch Changes
14
+
15
+ - [#2485](https://github.com/graphcommerce-org/graphcommerce/pull/2485) [`2e52ea3`](https://github.com/graphcommerce-org/graphcommerce/commit/2e52ea39823a15fc4ffe3ca47780f7e64ace3110) - Added cmsBlocks query and `<CmsBlock />` component. ([@paales](https://github.com/paales))
16
+
17
+ ## 9.0.4-canary.10
18
+
3
19
  ## 9.0.4-canary.9
4
20
 
5
21
  ## 9.0.4-canary.8
@@ -0,0 +1,4 @@
1
+ fragment CmsBlock on CmsBlock {
2
+ identifier
3
+ content
4
+ }
@@ -0,0 +1,10 @@
1
+ import type { CmsBlockFragment } from './CmsBlock.gql'
2
+
3
+ export type CmsBlockProps = { cmsBlock: CmsBlockFragment | null | undefined }
4
+
5
+ export function CmsBlock(props: CmsBlockProps) {
6
+ const { cmsBlock } = props
7
+ if (!cmsBlock?.content) return null
8
+ // eslint-disable-next-line react/no-danger
9
+ return <div dangerouslySetInnerHTML={{ __html: cmsBlock.content }} />
10
+ }
@@ -0,0 +1,7 @@
1
+ query CmsBlocks($identifiers: [String!]!) {
2
+ cmsBlocks(identifiers: $identifiers) {
3
+ items {
4
+ ...CmsBlock
5
+ }
6
+ }
7
+ }
package/index.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export * from './components/CmsBlock/CmsBlock'
2
+ export * from './components/CmsBlock/CmsBlock.gql'
1
3
  export * from './components/CmsPageContent/CmsPageContent'
2
4
  export * from './components/CmsPageContent/CmsPageContent.gql'
3
5
  export * from './components/CmsPageMeta/CmsPageMeta'
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-cms",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.4-canary.9",
5
+ "version": "9.1.0-canary.15",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,11 +12,11 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^9.0.4-canary.9",
16
- "@graphcommerce/graphql": "^9.0.4-canary.9",
17
- "@graphcommerce/magento-store": "^9.0.4-canary.9",
18
- "@graphcommerce/prettier-config-pwa": "^9.0.4-canary.9",
19
- "@graphcommerce/typescript-config-pwa": "^9.0.4-canary.9",
15
+ "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.15",
16
+ "@graphcommerce/graphql": "^9.1.0-canary.15",
17
+ "@graphcommerce/magento-store": "^9.1.0-canary.15",
18
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.15",
19
+ "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.15",
20
20
  "@lingui/core": "^4.2.1",
21
21
  "@lingui/macro": "^4.2.1",
22
22
  "@lingui/react": "^4.2.1",