react-shopwave-connect 0.4.5 → 0.4.6
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/README.md +9 -9
- package/dist/core/index.cjs +7 -7
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +15 -15
- package/dist/core/index.d.ts +15 -15
- package/dist/core/index.js +7 -7
- package/dist/core/index.js.map +1 -1
- package/dist/hooks/index.cjs +3 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +6 -6
- package/dist/hooks/index.d.ts +6 -6
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/next/index.cjs +2 -2
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +3 -3
- package/dist/next/index.d.ts +3 -3
- package/dist/next/index.js +2 -2
- package/dist/next/index.js.map +1 -1
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +5 -5
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/package.json +5 -1
package/dist/hooks/index.cjs
CHANGED
|
@@ -599,7 +599,7 @@ const STATIC_HOST = /^https?:\/\/static\.merchantstack\.com\/images\//i;
|
|
|
599
599
|
/**
|
|
600
600
|
* Turns an image path from the API into a URL a page can load over HTTPS:
|
|
601
601
|
* `http://static.merchantstack.com/images/x.png` → `<base>/x.png`, and a
|
|
602
|
-
* relative path (`merchant/
|
|
602
|
+
* relative path (`merchant/123/logo/x.png`) → `<base>/merchant/123/logo/x.png`.
|
|
603
603
|
* Other absolute URLs are returned unchanged; empty input gives `""`.
|
|
604
604
|
*/
|
|
605
605
|
function getImageUrl(path, base = SHOPWAVE_IMAGE_BASE_URL) {
|
|
@@ -645,7 +645,7 @@ async function uploadImage(file, params, options = {}) {
|
|
|
645
645
|
//#endregion
|
|
646
646
|
//#region src/core/merchantImages.ts
|
|
647
647
|
/**
|
|
648
|
-
* Where each slot lives, its upload kind and its exact size (from
|
|
648
|
+
* Where each slot lives, its upload kind and its exact size (from the existing admin's
|
|
649
649
|
* merchant settings page).
|
|
650
650
|
*/
|
|
651
651
|
const MERCHANT_IMAGE_SLOTS = Object.freeze({
|
|
@@ -695,7 +695,7 @@ function toStored(value) {
|
|
|
695
695
|
}
|
|
696
696
|
/**
|
|
697
697
|
* The `imageIds` to send on a save: every URL is turned back into its file
|
|
698
|
-
* name (what
|
|
698
|
+
* name (what the existing admin does with images you didn't change) and empty values
|
|
699
699
|
* are dropped. No images gives `{}`.
|
|
700
700
|
*/
|
|
701
701
|
function toStoredImageIds(imageIds) {
|