@laioutr/app-shopware 0.15.0 → 0.15.1

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/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laioutr/app-shopware",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "configKey": "@laioutr/app-shopware",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ import { CHECKOUT_ENDPOINT_PATH, ADOPT_SESSION_ENDPOINT_PATH } from '../dist/run
4
4
  import { registerLaioutrApp } from '@laioutr-core/kit';
5
5
 
6
6
  const name = "@laioutr/app-shopware";
7
- const version = "0.15.0";
7
+ const version = "0.15.1";
8
8
 
9
9
  const module$1 = defineNuxtModule({
10
10
  meta: {
@@ -1,12 +1,14 @@
1
1
  import { FALLBACK_IMAGE, FALLBACK_IMAGE_URL } from "../const/fallbacks.js";
2
+ const encodeSpaces = (url) => url.replaceAll(" ", "%20");
2
3
  export const mediaToSrc = (media) => {
3
4
  if ((!media.thumbnails || media.thumbnails.length === 0) && !media.url) {
4
5
  return FALLBACK_IMAGE_URL;
5
6
  }
6
7
  const thumbnails = media.thumbnails ?? [];
7
- const thumbnailSrc = thumbnails.map((thumb) => `${thumb.url} ${thumb.width}x${thumb.height}`);
8
- const orgSrc = `${media.url} ${media.metaData?.width ?? 0}x${media.metaData?.height ?? 0}`;
9
- return `${media.url}#${encodeURIComponent([...thumbnailSrc, orgSrc].join(", "))}`;
8
+ const thumbnailSrc = thumbnails.map((thumb) => `${encodeSpaces(thumb.url)} ${thumb.width}x${thumb.height}`);
9
+ const mediaUrl = encodeSpaces(media.url);
10
+ const orgSrc = `${mediaUrl} ${media.metaData?.width ?? 0}x${media.metaData?.height ?? 0}`;
11
+ return `${mediaUrl}#${encodeURIComponent([...thumbnailSrc, orgSrc].join(", "))}`;
10
12
  };
11
13
  export const mapMediaSourceImage = (media) => {
12
14
  const src = mediaToSrc(media);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laioutr/app-shopware",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Laioutr integration with Shopware 6",
5
5
  "repository": "github:laioutr/app-shopware",
6
6
  "license": "MIT",