@volvo-cars/ced-os-react-components
Advanced tools
Comparing version 0.5.2 to 0.5.3
{ | ||
"name": "@volvo-cars/ced-os-react-components", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "Set of components for developing UIs in the onboarding and support apps", | ||
@@ -45,4 +45,4 @@ "keywords": [], | ||
"peerDependencies": { | ||
"react": "^18.0.2", | ||
"react-dom": "^18.0.2", | ||
"react": "^17.0.0", | ||
"react-dom": "^17.0.0", | ||
"vcc-ui": "^3.0.3" | ||
@@ -49,0 +49,0 @@ }, |
@@ -69,4 +69,2 @@ # Support Web Components | ||
``` | ||
@@ -84,1 +82,8 @@ // ... | ||
``` | ||
#### Standalone | ||
If you want to use the renderer without creating a full JS project, with NPM etc, you can use the standalone solution. Include the standalone files under [public](public), and in the [HTML file](public/standalone-support-article.html), make sure to make the following replacements: | ||
* `article: null` must be replaced with `article: '<article>'`, where `article` is the (JSON representation) of an article. It must contain an `externalId`. It must also contain the content of the document, i.e. a `title` and optionally also a `description` and `body`. These fields may be directly on the `article` object itself, or nested inside of `article.content` or `article.jsonContent`. | ||
* `articleLinkClicked: null` may be replaced with `articleLinkClicked: function(articleId, targetId) { ... }`, where the function will be called whenever the user clicks a link to another article. The function takes two arguments: the ID of the article being linked to, as well as (optionally) the ID of the target element (will typically just be `null`). If `articleLinkClicked` is left as `null`, it will default to working as a normal link, such that if the current URL is `foo/bar/articleId1`, and the user clicks a link to an article with ID `articleId2`, it will navigate to `foo/bar/articleId2` (or `foo/bar/articleId2#targetId`, if `targetId` is not null). | ||
* `linkClicked: null` may be replaced with `linkClicked: function(href) { ... }`, where the function will be called whenever the user clicks on an external link. The function takes one argument: the URL of the link target. If `linkClicked` is left as null, it will default to simply navigating to the link. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
174544
88