@websolutespa/bom-mixer-ui 1.9.15 → 1.9.17
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 -8
- package/dist/cjs/index.js +44 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/media/media-image.js +2 -1
- package/dist/esm/components/media/media-image.js.map +1 -1
- package/dist/esm/components/media/media-items.js +3 -2
- package/dist/esm/components/media/media-items.js.map +1 -1
- package/dist/esm/components/media/media.js +3 -1
- package/dist/esm/components/media/media.js.map +1 -1
- package/dist/esm/components/meta/meta.js +39 -9
- package/dist/esm/components/meta/meta.js.map +1 -1
- package/dist/types/components/media/media-image.d.ts.map +1 -1
- package/dist/types/components/media/media-items.d.ts +2 -0
- package/dist/types/components/media/media-items.d.ts.map +1 -1
- package/dist/types/components/media/media.d.ts +1 -0
- package/dist/types/components/media/media.d.ts.map +1 -1
- package/dist/types/components/meta/meta.d.ts.map +1 -1
- package/dist/types/forms/radio-card/radio-card-base.d.ts +1 -0
- package/dist/types/forms/radio-card/radio-card-base.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/media/media-image.tsx +1 -0
- package/src/components/media/media-items.tsx +5 -2
- package/src/components/media/media.tsx +3 -0
- package/src/components/meta/meta.tsx +34 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
# @websolutespa/bom-mixer-ui
|
|
2
2
|
|
|
3
|
+
## 1.9.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added: informative prop to Media
|
|
8
|
+
|
|
9
|
+
## 1.9.16
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Modified: Meta
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @websolutespa/bom-core@1.8.21
|
|
16
|
+
|
|
3
17
|
## 1.9.15
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
6
20
|
|
|
7
21
|
- Modified: Meta added indexable prop
|
|
8
|
-
- Updated dependencies
|
|
9
|
-
- Updated dependencies
|
|
10
22
|
- Updated dependencies
|
|
11
23
|
- @websolutespa/bom-mixer-store@1.8.11
|
|
12
24
|
- @websolutespa/bom-mixer-models@1.8.18
|
|
@@ -53,7 +65,6 @@
|
|
|
53
65
|
### Patch Changes
|
|
54
66
|
|
|
55
67
|
- Modified: Text, LazyLoader, IThemeFont
|
|
56
|
-
- Updated dependencies
|
|
57
68
|
- Updated dependencies
|
|
58
69
|
- @websolutespa/bom-core@1.8.17
|
|
59
70
|
- @websolutespa/bom-mixer-models@1.8.17
|
|
@@ -81,7 +92,6 @@
|
|
|
81
92
|
### Patch Changes
|
|
82
93
|
|
|
83
94
|
- Added: Text.Html
|
|
84
|
-
- Updated dependencies
|
|
85
95
|
- Updated dependencies
|
|
86
96
|
- @websolutespa/bom-mixer-store@1.8.4
|
|
87
97
|
- @websolutespa/bom-core@1.8.11
|
|
@@ -165,7 +175,6 @@
|
|
|
165
175
|
### Patch Changes
|
|
166
176
|
|
|
167
177
|
- Modified: Text added letter-spacing, MediaImage
|
|
168
|
-
- Updated dependencies
|
|
169
178
|
- Updated dependencies
|
|
170
179
|
- @websolutespa/bom-mixer-models@1.8.8
|
|
171
180
|
- @websolutespa/bom-core@1.8.10
|
|
@@ -185,7 +194,6 @@
|
|
|
185
194
|
- 3a7fc91: Added: a11y Select, Drawer, Media
|
|
186
195
|
- 3a7fc91: Added: a11y SvgAnimation
|
|
187
196
|
- 3a7fc91: Modified: theme ColorScheme
|
|
188
|
-
- Updated dependencies [3a7fc91]
|
|
189
197
|
- Updated dependencies [3a7fc91]
|
|
190
198
|
- @websolutespa/bom-mixer-icons@0.2.5
|
|
191
199
|
- @websolutespa/bom-mixer-hooks@1.8.9
|
|
@@ -319,7 +327,6 @@
|
|
|
319
327
|
|
|
320
328
|
- Modified: Media, Meta
|
|
321
329
|
- Added: SvgAnimation mode overOut
|
|
322
|
-
- Updated dependencies
|
|
323
330
|
- Updated dependencies
|
|
324
331
|
- @websolutespa/bom-core@1.7.5
|
|
325
332
|
- @websolutespa/bom-mixer-models@1.7.4
|
|
@@ -358,7 +365,6 @@
|
|
|
358
365
|
|
|
359
366
|
### Patch Changes
|
|
360
367
|
|
|
361
|
-
- Updating: dependencies
|
|
362
368
|
- Updated dependencies
|
|
363
369
|
- @websolutespa/bom-mixer-models@1.7.2
|
|
364
370
|
- @websolutespa/bom-mixer-forms@0.3.1
|
package/dist/cjs/index.js
CHANGED
|
@@ -4842,7 +4842,8 @@ const MediaImage_ = _a => {
|
|
|
4842
4842
|
}, canLoad ? imageProps : undefined, {
|
|
4843
4843
|
className: classNames,
|
|
4844
4844
|
loading: loading,
|
|
4845
|
-
draggable: false
|
|
4845
|
+
draggable: false,
|
|
4846
|
+
"aria-hidden": !props.informative
|
|
4846
4847
|
}));
|
|
4847
4848
|
};
|
|
4848
4849
|
const MediaImage = /*#__PURE__*/React.memo(MediaImage_);
|
|
@@ -5052,8 +5053,8 @@ function getMediaItemProps(mediaItem, options) {
|
|
|
5052
5053
|
const media = __rest(mediaItem, ["width", "height", "sizes"]);
|
|
5053
5054
|
const title = media.title || options.title;
|
|
5054
5055
|
// console.log('getMediaItemProps', media.alt, options.alt);
|
|
5055
|
-
|
|
5056
|
-
const alt = options.alt || '';
|
|
5056
|
+
const alt = media.alt || options.alt;
|
|
5057
|
+
// const alt: string = (options.alt || '');
|
|
5057
5058
|
const src = media.src || media.url || '';
|
|
5058
5059
|
const mediaItemProps = {
|
|
5059
5060
|
src,
|
|
@@ -5088,6 +5089,7 @@ function getMediaItemProps(mediaItem, options) {
|
|
|
5088
5089
|
mediaItemProps.aspectRatioMd = options.aspectRatioMd;
|
|
5089
5090
|
mediaItemProps.aspectRatioLg = options.aspectRatioLg;
|
|
5090
5091
|
mediaItemProps.aspectRatioXl = options.aspectRatioXl;
|
|
5092
|
+
mediaItemProps.informative = options.informative;
|
|
5091
5093
|
if (options.eager) {
|
|
5092
5094
|
mediaItemProps.loading = 'eager';
|
|
5093
5095
|
}
|
|
@@ -5214,12 +5216,13 @@ const MediaBase = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
5214
5216
|
eager,
|
|
5215
5217
|
alt,
|
|
5216
5218
|
title,
|
|
5219
|
+
informative,
|
|
5217
5220
|
onClick,
|
|
5218
5221
|
onLoaded,
|
|
5219
5222
|
canLoad,
|
|
5220
5223
|
as = 'div'
|
|
5221
5224
|
} = _a,
|
|
5222
|
-
props = __rest(_a, ["children", "item", "className", "width", "height", "size", "eager", "alt", "title", "onClick", "onLoaded", "canLoad", "as"]);
|
|
5225
|
+
props = __rest(_a, ["children", "item", "className", "width", "height", "size", "eager", "alt", "title", "informative", "onClick", "onLoaded", "canLoad", "as"]);
|
|
5223
5226
|
const {
|
|
5224
5227
|
id,
|
|
5225
5228
|
open
|
|
@@ -5254,6 +5257,7 @@ const MediaBase = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
5254
5257
|
eager,
|
|
5255
5258
|
alt,
|
|
5256
5259
|
title,
|
|
5260
|
+
informative,
|
|
5257
5261
|
open,
|
|
5258
5262
|
onLoaded,
|
|
5259
5263
|
canLoad
|
|
@@ -6135,15 +6139,43 @@ const MediaGallery = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
6135
6139
|
MediaGallery.displayName = 'MediaGallery';
|
|
6136
6140
|
|
|
6137
6141
|
function Meta(_a) {
|
|
6138
|
-
var _b, _c,
|
|
6142
|
+
var _b, _c, _d, _g;
|
|
6139
6143
|
var {
|
|
6140
6144
|
children,
|
|
6141
6145
|
structuredDataCollections,
|
|
6142
6146
|
brand
|
|
6143
6147
|
} = _a,
|
|
6144
6148
|
props = __rest(_a, ["children", "structuredDataCollections", "brand"]);
|
|
6149
|
+
const layout = bomMixerHooks.useLayout();
|
|
6145
6150
|
const page = bomMixerHooks.usePage();
|
|
6146
6151
|
const extra = bomMixerHooks.useExtra();
|
|
6152
|
+
// alternates
|
|
6153
|
+
const alternates = React.useMemo(() => {
|
|
6154
|
+
const alternates = [];
|
|
6155
|
+
page.alternates.forEach(alternate => {
|
|
6156
|
+
const market = layout.markets.find(x => x.id === alternate.market);
|
|
6157
|
+
if (market) {
|
|
6158
|
+
if (market.countries && market.countries.length > 0) {
|
|
6159
|
+
market.countries.forEach(country => {
|
|
6160
|
+
// country: string | { alpha2Code: string };
|
|
6161
|
+
const alpha2Code = typeof country === 'string' ? country : country.alpha2Code;
|
|
6162
|
+
alternates.push({
|
|
6163
|
+
id: `${alternate.market}-${alternate.locale}-${alpha2Code}`,
|
|
6164
|
+
href: bomMixerModels.resolveHref(alternate.id),
|
|
6165
|
+
hrefLang: `${alternate.locale}-${alpha2Code}`
|
|
6166
|
+
});
|
|
6167
|
+
});
|
|
6168
|
+
} else {
|
|
6169
|
+
alternates.push({
|
|
6170
|
+
id: `${alternate.market}-${alternate.locale}`,
|
|
6171
|
+
href: bomMixerModels.resolveHref(alternate.id),
|
|
6172
|
+
hrefLang: alternate.locale
|
|
6173
|
+
});
|
|
6174
|
+
}
|
|
6175
|
+
}
|
|
6176
|
+
});
|
|
6177
|
+
return alternates;
|
|
6178
|
+
}, [layout, page]);
|
|
6147
6179
|
// title
|
|
6148
6180
|
let title = ((_b = page.meta) === null || _b === void 0 ? void 0 : _b.title) || page.title;
|
|
6149
6181
|
// description
|
|
@@ -6188,7 +6220,8 @@ function Meta(_a) {
|
|
|
6188
6220
|
// structuredData
|
|
6189
6221
|
const structuredData = bomMixerModels.resolveStructuredData(page, structuredDataCollections, brand);
|
|
6190
6222
|
// image
|
|
6191
|
-
const
|
|
6223
|
+
const media = ((_d = page.meta) === null || _d === void 0 ? void 0 : _d.image) || page.media;
|
|
6224
|
+
const image = media ? media.src || media.url : brand === null || brand === void 0 ? void 0 : brand.logo;
|
|
6192
6225
|
return jsxRuntime.jsxs(Head__default.default, {
|
|
6193
6226
|
children: [jsxRuntime.jsx("title", {
|
|
6194
6227
|
children: title
|
|
@@ -6197,7 +6230,7 @@ function Meta(_a) {
|
|
|
6197
6230
|
content: description
|
|
6198
6231
|
}), false , indexable() ? jsxRuntime.jsx("meta", {
|
|
6199
6232
|
name: "robots",
|
|
6200
|
-
content: ((
|
|
6233
|
+
content: ((_g = page.meta) === null || _g === void 0 ? void 0 : _g.robots) || 'index, follow'
|
|
6201
6234
|
}) : jsxRuntime.jsx("meta", {
|
|
6202
6235
|
name: "robots",
|
|
6203
6236
|
content: "noindex, nofollow"
|
|
@@ -6210,11 +6243,11 @@ function Meta(_a) {
|
|
|
6210
6243
|
}), relNext && jsxRuntime.jsx("link", {
|
|
6211
6244
|
rel: "next",
|
|
6212
6245
|
href: bomMixerModels.resolveHref(relNext)
|
|
6213
|
-
}),
|
|
6246
|
+
}), alternates.map(alternate => jsxRuntime.jsx("link", {
|
|
6214
6247
|
rel: "alternate",
|
|
6215
|
-
href:
|
|
6216
|
-
hrefLang: alternate.
|
|
6217
|
-
},
|
|
6248
|
+
href: alternate.href,
|
|
6249
|
+
hrefLang: alternate.hrefLang
|
|
6250
|
+
}, alternate.id)), image && jsxRuntime.jsx("meta", {
|
|
6218
6251
|
property: "og:image",
|
|
6219
6252
|
content: bomMixerModels.resolveHref(image)
|
|
6220
6253
|
}), false , structuredData && jsxRuntime.jsx("script", {
|