@jay-framework/wix-data 0.20.0 → 0.21.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/dist/index.client.js +4 -1
- package/dist/index.js +4 -1
- package/package.json +13 -14
package/dist/index.client.js
CHANGED
|
@@ -5,6 +5,9 @@ import { createJayContext, useGlobalContext } from "@jay-framework/runtime";
|
|
|
5
5
|
import { WIX_CLIENT_CONTEXT } from "@jay-framework/wix-server-client/client";
|
|
6
6
|
import { items } from "@wix/data";
|
|
7
7
|
const collectionItem = makeJayStackComponent().withProps();
|
|
8
|
+
function stripWixMediaResize(url) {
|
|
9
|
+
return url.replace(/\/v1\/(?:fit|fill|crop)\/[^/]+\/file\.\w+$/, "");
|
|
10
|
+
}
|
|
8
11
|
function parseWixMediaUrl(url) {
|
|
9
12
|
if (!url) return null;
|
|
10
13
|
const match = url.match(
|
|
@@ -41,7 +44,7 @@ function formatWixMediaUrl(_id, url, resize) {
|
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
if ((url == null ? void 0 : url.startsWith("http://")) || (url == null ? void 0 : url.startsWith("https://"))) {
|
|
44
|
-
return url;
|
|
47
|
+
return stripWixMediaResize(url) + resizeFragment;
|
|
45
48
|
}
|
|
46
49
|
return "";
|
|
47
50
|
}
|
package/dist/index.js
CHANGED
|
@@ -593,6 +593,9 @@ async function fetchReference(refValue, wixData) {
|
|
|
593
593
|
return null;
|
|
594
594
|
}
|
|
595
595
|
const collectionItem = makeJayStackComponent().withProps().withServices(WIX_DATA_SERVICE_MARKER).withLoadParams(loadItemParams).withSlowlyRender(renderSlowlyChanging$3);
|
|
596
|
+
function stripWixMediaResize(url) {
|
|
597
|
+
return url.replace(/\/v1\/(?:fit|fill|crop)\/[^/]+\/file\.\w+$/, "");
|
|
598
|
+
}
|
|
596
599
|
function parseWixMediaUrl(url) {
|
|
597
600
|
if (!url) return null;
|
|
598
601
|
const match = url.match(
|
|
@@ -629,7 +632,7 @@ function formatWixMediaUrl(_id, url, resize) {
|
|
|
629
632
|
}
|
|
630
633
|
}
|
|
631
634
|
if ((url == null ? void 0 : url.startsWith("http://")) || (url == null ? void 0 : url.startsWith("https://"))) {
|
|
632
|
-
return url;
|
|
635
|
+
return stripWixMediaResize(url) + resizeFragment;
|
|
633
636
|
}
|
|
634
637
|
return "";
|
|
635
638
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/wix-data",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Wix Data plugin for Jay Framework with dynamic contract generation",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,27 +31,26 @@
|
|
|
31
31
|
"test": ":"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@jay-framework/component": "^0.
|
|
35
|
-
"@jay-framework/fullstack-component": "^0.
|
|
36
|
-
"@jay-framework/reactive": "^0.
|
|
37
|
-
"@jay-framework/runtime": "^0.
|
|
38
|
-
"@jay-framework/secure": "^0.
|
|
39
|
-
"@jay-framework/stack-client-runtime": "^0.
|
|
40
|
-
"@jay-framework/stack-server-runtime": "^0.
|
|
41
|
-
"@jay-framework/wix-server-client": "^0.
|
|
42
|
-
"@jay-framework/wix-utils": "^0.
|
|
34
|
+
"@jay-framework/component": "^0.21.0",
|
|
35
|
+
"@jay-framework/fullstack-component": "^0.21.0",
|
|
36
|
+
"@jay-framework/reactive": "^0.21.0",
|
|
37
|
+
"@jay-framework/runtime": "^0.21.0",
|
|
38
|
+
"@jay-framework/secure": "^0.21.0",
|
|
39
|
+
"@jay-framework/stack-client-runtime": "^0.21.0",
|
|
40
|
+
"@jay-framework/stack-server-runtime": "^0.21.0",
|
|
41
|
+
"@jay-framework/wix-server-client": "^0.21.0",
|
|
42
|
+
"@jay-framework/wix-utils": "^0.21.0",
|
|
43
43
|
"@wix/data": "^1.0.433",
|
|
44
44
|
"@wix/sdk": "^1.21.5",
|
|
45
|
-
"@wix/sdk-runtime": "^1.0.11",
|
|
46
45
|
"js-yaml": "^4.1.0"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@babel/core": "^7.23.7",
|
|
50
49
|
"@babel/preset-env": "^7.23.8",
|
|
51
50
|
"@babel/preset-typescript": "^7.23.3",
|
|
52
|
-
"@jay-framework/compiler-jay-stack": "^0.
|
|
53
|
-
"@jay-framework/jay-cli": "^0.
|
|
54
|
-
"@jay-framework/vite-plugin": "^0.
|
|
51
|
+
"@jay-framework/compiler-jay-stack": "^0.21.0",
|
|
52
|
+
"@jay-framework/jay-cli": "^0.21.0",
|
|
53
|
+
"@jay-framework/vite-plugin": "^0.21.0",
|
|
55
54
|
"@types/js-yaml": "^4.0.9",
|
|
56
55
|
"@types/node": "^20.11.0",
|
|
57
56
|
"nodemon": "^3.0.3",
|