@wix/sdk-react 0.1.5 → 0.1.7
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/build/browser/index.mjs +5 -0
- package/build/index.d.mts +2 -1
- package/build/index.d.ts +2 -1
- package/build/index.js +6 -0
- package/build/index.mjs +5 -0
- package/package.json +6 -6
package/build/browser/index.mjs
CHANGED
|
@@ -47,6 +47,10 @@ function useWix() {
|
|
|
47
47
|
}
|
|
48
48
|
return sdk;
|
|
49
49
|
}
|
|
50
|
+
function useWixFetch() {
|
|
51
|
+
const sdk = useWix();
|
|
52
|
+
return sdk.fetch;
|
|
53
|
+
}
|
|
50
54
|
function useWixAuth() {
|
|
51
55
|
const sdk = useWix();
|
|
52
56
|
return sdk.auth;
|
|
@@ -69,5 +73,6 @@ export {
|
|
|
69
73
|
useEnvironment,
|
|
70
74
|
useWix,
|
|
71
75
|
useWixAuth,
|
|
76
|
+
useWixFetch,
|
|
72
77
|
useWixModules
|
|
73
78
|
};
|
package/build/index.d.mts
CHANGED
|
@@ -8,8 +8,9 @@ declare function WixProvider<H extends Host<any> | undefined = undefined, T exte
|
|
|
8
8
|
host?: H;
|
|
9
9
|
}>): React.JSX.Element;
|
|
10
10
|
declare function useWix<T extends WixClient<Host<any> | undefined> = WixClient>(): T;
|
|
11
|
+
declare function useWixFetch(): (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
11
12
|
declare function useWixAuth<T extends AuthenticationStrategy>(): T;
|
|
12
13
|
declare function useWixModules<T extends Descriptors>(modules: T): BuildDescriptors<T, Host<any>>;
|
|
13
14
|
declare function useEnvironment<T>(): T;
|
|
14
15
|
|
|
15
|
-
export { WixProvider, useEnvironment, useWix, useWixAuth, useWixModules };
|
|
16
|
+
export { WixProvider, useEnvironment, useWix, useWixAuth, useWixFetch, useWixModules };
|
package/build/index.d.ts
CHANGED
|
@@ -8,8 +8,9 @@ declare function WixProvider<H extends Host<any> | undefined = undefined, T exte
|
|
|
8
8
|
host?: H;
|
|
9
9
|
}>): React.JSX.Element;
|
|
10
10
|
declare function useWix<T extends WixClient<Host<any> | undefined> = WixClient>(): T;
|
|
11
|
+
declare function useWixFetch(): (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
11
12
|
declare function useWixAuth<T extends AuthenticationStrategy>(): T;
|
|
12
13
|
declare function useWixModules<T extends Descriptors>(modules: T): BuildDescriptors<T, Host<any>>;
|
|
13
14
|
declare function useEnvironment<T>(): T;
|
|
14
15
|
|
|
15
|
-
export { WixProvider, useEnvironment, useWix, useWixAuth, useWixModules };
|
|
16
|
+
export { WixProvider, useEnvironment, useWix, useWixAuth, useWixFetch, useWixModules };
|
package/build/index.js
CHANGED
|
@@ -35,6 +35,7 @@ __export(src_exports, {
|
|
|
35
35
|
useEnvironment: () => useEnvironment,
|
|
36
36
|
useWix: () => useWix,
|
|
37
37
|
useWixAuth: () => useWixAuth,
|
|
38
|
+
useWixFetch: () => useWixFetch,
|
|
38
39
|
useWixModules: () => useWixModules
|
|
39
40
|
});
|
|
40
41
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -84,6 +85,10 @@ function useWix() {
|
|
|
84
85
|
}
|
|
85
86
|
return sdk;
|
|
86
87
|
}
|
|
88
|
+
function useWixFetch() {
|
|
89
|
+
const sdk = useWix();
|
|
90
|
+
return sdk.fetch;
|
|
91
|
+
}
|
|
87
92
|
function useWixAuth() {
|
|
88
93
|
const sdk = useWix();
|
|
89
94
|
return sdk.auth;
|
|
@@ -107,6 +112,7 @@ function useEnvironment() {
|
|
|
107
112
|
useEnvironment,
|
|
108
113
|
useWix,
|
|
109
114
|
useWixAuth,
|
|
115
|
+
useWixFetch,
|
|
110
116
|
useWixModules,
|
|
111
117
|
...require("@wix/sdk")
|
|
112
118
|
});
|
package/build/index.mjs
CHANGED
|
@@ -47,6 +47,10 @@ function useWix() {
|
|
|
47
47
|
}
|
|
48
48
|
return sdk;
|
|
49
49
|
}
|
|
50
|
+
function useWixFetch() {
|
|
51
|
+
const sdk = useWix();
|
|
52
|
+
return sdk.fetch;
|
|
53
|
+
}
|
|
50
54
|
function useWixAuth() {
|
|
51
55
|
const sdk = useWix();
|
|
52
56
|
return sdk.auth;
|
|
@@ -69,5 +73,6 @@ export {
|
|
|
69
73
|
useEnvironment,
|
|
70
74
|
useWix,
|
|
71
75
|
useWixAuth,
|
|
76
|
+
useWixFetch,
|
|
72
77
|
useWixModules
|
|
73
78
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/sdk-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"module": "build/index.mjs",
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"typecheck": "tsc --noEmit"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@wix/sdk": "1.2.
|
|
24
|
+
"@wix/sdk": "1.2.8"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@swc/core": "^1.3.
|
|
30
|
+
"@swc/core": "^1.3.72",
|
|
31
31
|
"@swc/jest": "^0.2.27",
|
|
32
32
|
"@testing-library/jest-dom": "^5.17.0",
|
|
33
33
|
"@testing-library/react": "^14.0.0",
|
|
34
|
-
"@types/react": "^18.2.
|
|
35
|
-
"@wix/ecom": "^1.0.
|
|
34
|
+
"@types/react": "^18.2.17",
|
|
35
|
+
"@wix/ecom": "^1.0.302",
|
|
36
36
|
"eslint": "^7.32.0",
|
|
37
37
|
"eslint-config-sdk": "0.0.0",
|
|
38
38
|
"is-ci": "^3.0.1",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"eslintConfig": {
|
|
61
61
|
"extends": "sdk"
|
|
62
62
|
},
|
|
63
|
-
"falconPackageHash": "
|
|
63
|
+
"falconPackageHash": "8a70154892eced3e14d6997b1a47bb3bd269dfa6ca6cf6201519715d"
|
|
64
64
|
}
|