@propeller-commerce/propeller-v2-react-ui 0.8.0 → 0.9.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/CHANGELOG.md +14 -0
- package/dist/index.cjs +31 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +31 -31
- package/dist/index.js.map +1 -1
- package/dist/pure.cjs +4 -4
- package/dist/pure.cjs.map +1 -1
- package/dist/pure.d.cts +2 -2
- package/dist/pure.d.ts +2 -2
- package/dist/pure.js +4 -4
- package/dist/pure.js.map +1 -1
- package/package.json +3 -3
package/dist/pure.d.cts
CHANGED
|
@@ -152,12 +152,12 @@ declare const _default$1: React.MemoExoticComponent<typeof ProductJsonLd>;
|
|
|
152
152
|
interface CategoryShortDescriptionProps {
|
|
153
153
|
/**
|
|
154
154
|
* Language code used to resolve the correct localised short description
|
|
155
|
-
* from `category.
|
|
155
|
+
* from `category.shortDescriptions`.
|
|
156
156
|
*/
|
|
157
157
|
language: string;
|
|
158
158
|
/**
|
|
159
159
|
* Propeller Category object.
|
|
160
|
-
* The component reads `category.
|
|
160
|
+
* The component reads `category.shortDescriptions` (an array of LocalizedString)
|
|
161
161
|
* and renders the matching language entry as HTML.
|
|
162
162
|
*/
|
|
163
163
|
category?: Category;
|
package/dist/pure.d.ts
CHANGED
|
@@ -152,12 +152,12 @@ declare const _default$1: React.MemoExoticComponent<typeof ProductJsonLd>;
|
|
|
152
152
|
interface CategoryShortDescriptionProps {
|
|
153
153
|
/**
|
|
154
154
|
* Language code used to resolve the correct localised short description
|
|
155
|
-
* from `category.
|
|
155
|
+
* from `category.shortDescriptions`.
|
|
156
156
|
*/
|
|
157
157
|
language: string;
|
|
158
158
|
/**
|
|
159
159
|
* Propeller Category object.
|
|
160
|
-
* The component reads `category.
|
|
160
|
+
* The component reads `category.shortDescriptions` (an array of LocalizedString)
|
|
161
161
|
* and renders the matching language entry as HTML.
|
|
162
162
|
*/
|
|
163
163
|
category?: Category;
|
package/dist/pure.js
CHANGED
|
@@ -18,8 +18,8 @@ function Breadcrumbs(props) {
|
|
|
18
18
|
}
|
|
19
19
|
const displayItems = props.showCurrent === false && items.length > 0 ? items.slice(0, items.length - 1) : items;
|
|
20
20
|
function getCategoryName(cat) {
|
|
21
|
-
const match = cat.
|
|
22
|
-
return match?.value || cat.
|
|
21
|
+
const match = cat.names?.find((n) => n.language === lang);
|
|
22
|
+
return match?.value || cat.names?.[0]?.value || "";
|
|
23
23
|
}
|
|
24
24
|
function getCategoryUrl(cat, index) {
|
|
25
25
|
if (props.getUrl) return props.getUrl(cat, index);
|
|
@@ -27,7 +27,7 @@ function Breadcrumbs(props) {
|
|
|
27
27
|
if (urls && typeof urls.getCategoryUrl === "function") {
|
|
28
28
|
return urls.getCategoryUrl(cat, props.language);
|
|
29
29
|
}
|
|
30
|
-
const slug = cat.
|
|
30
|
+
const slug = cat.slugs?.find((s) => s.language === lang)?.value || cat.slugs?.[0]?.value || "";
|
|
31
31
|
return `/category/${cat.categoryId}/${slug}`;
|
|
32
32
|
}
|
|
33
33
|
function isCurrentItem(index) {
|
|
@@ -138,7 +138,7 @@ function ProductJsonLd(props) {
|
|
|
138
138
|
}
|
|
139
139
|
var ProductJsonLd_default = React.memo(ProductJsonLd);
|
|
140
140
|
function CategoryShortDescription(props) {
|
|
141
|
-
const match = props.category?.
|
|
141
|
+
const match = props.category?.shortDescriptions?.find(
|
|
142
142
|
(d) => d.language === props.language
|
|
143
143
|
);
|
|
144
144
|
const html = match?.value || "";
|