@webiny/app-tenancy 5.23.1-beta.0 → 5.24.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/Tenancy.d.ts +2 -2
- package/contexts/Tenancy.d.ts +1 -1
- package/package.json +9 -8
- package/withTenant.d.ts +10 -5
- package/withTenant.js +1 -3
package/Tenancy.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const TenancyExtension:
|
|
3
|
-
export declare const Tenancy: React.
|
|
2
|
+
export declare const TenancyExtension: React.FC;
|
|
3
|
+
export declare const Tenancy: React.NamedExoticComponent<{}>;
|
package/contexts/Tenancy.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-tenancy",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.24.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
"@babel/runtime": "7.16.7",
|
|
18
18
|
"@emotion/styled": "10.3.0",
|
|
19
19
|
"@types/react": "16.14.2",
|
|
20
|
-
"@webiny/app": "5.
|
|
21
|
-
"@webiny/app-admin": "5.
|
|
22
|
-
"@webiny/plugins": "5.
|
|
23
|
-
"@webiny/ui": "5.
|
|
20
|
+
"@webiny/app": "5.24.0",
|
|
21
|
+
"@webiny/app-admin": "5.24.0",
|
|
22
|
+
"@webiny/plugins": "5.24.0",
|
|
23
|
+
"@webiny/ui": "5.24.0",
|
|
24
|
+
"apollo-client": "2.6.10",
|
|
24
25
|
"graphql-tag": "2.12.6",
|
|
25
26
|
"react": "16.14.0",
|
|
26
27
|
"react-dom": "16.14.0",
|
|
@@ -33,8 +34,8 @@
|
|
|
33
34
|
"@babel/preset-env": "^7.16.4",
|
|
34
35
|
"@babel/preset-react": "^7.16.0",
|
|
35
36
|
"@babel/preset-typescript": "^7.16.0",
|
|
36
|
-
"@webiny/cli": "^5.
|
|
37
|
-
"@webiny/project-utils": "^5.
|
|
37
|
+
"@webiny/cli": "^5.24.0",
|
|
38
|
+
"@webiny/project-utils": "^5.24.0",
|
|
38
39
|
"babel-plugin-emotion": "^9.2.8",
|
|
39
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
40
41
|
"rimraf": "^3.0.2",
|
|
@@ -49,5 +50,5 @@
|
|
|
49
50
|
"build": "yarn webiny run build",
|
|
50
51
|
"watch": "yarn webiny run watch"
|
|
51
52
|
},
|
|
52
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "be0cbfcaa9247c658c44179af7943cc5d6d71bc7"
|
|
53
54
|
}
|
package/withTenant.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ApolloClient from "apollo-client";
|
|
2
3
|
export declare const GET_DEFAULT_TENANT: import("graphql").DocumentNode;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
interface GetIdentityWithTenantParams {
|
|
5
|
+
client: ApolloClient<any>;
|
|
6
|
+
}
|
|
7
|
+
interface WithTenantProps {
|
|
8
|
+
getIdentityData: (params: GetIdentityWithTenantParams) => Promise<Record<string, string>>;
|
|
9
|
+
}
|
|
10
|
+
export declare const withTenant: (Component: React.FC<WithTenantProps>) => React.FC<WithTenantProps>;
|
|
11
|
+
export {};
|
package/withTenant.js
CHANGED
|
@@ -9,7 +9,7 @@ import { gql } from "graphql-tag";
|
|
|
9
9
|
import { useTenancy } from "./hooks/useTenancy";
|
|
10
10
|
export var GET_DEFAULT_TENANT = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query GetDefaultTenant {\n tenancy {\n getDefaultTenant {\n data {\n id\n name\n description\n }\n error {\n code\n message\n }\n }\n }\n }\n"])));
|
|
11
11
|
export var withTenant = function withTenant(Component) {
|
|
12
|
-
|
|
12
|
+
return function WithTenant(_ref) {
|
|
13
13
|
var getIdentityData = _ref.getIdentityData,
|
|
14
14
|
children = _ref.children;
|
|
15
15
|
|
|
@@ -66,6 +66,4 @@ export var withTenant = function withTenant(Component) {
|
|
|
66
66
|
getIdentityData: getIdentityWithTenant
|
|
67
67
|
}, children);
|
|
68
68
|
};
|
|
69
|
-
|
|
70
|
-
return WithTenant;
|
|
71
69
|
};
|