@webiny/app-tenancy 5.20.0-beta.1 → 5.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/Tenancy.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare const TenancyExtension: () => JSX.Element;
3
+ export declare const Tenancy: React.MemoExoticComponent<() => JSX.Element>;
package/Tenancy.js ADDED
@@ -0,0 +1,20 @@
1
+ import React, { memo } from "react";
2
+ import { plugins } from "@webiny/plugins";
3
+ import { Provider } from "@webiny/app-admin";
4
+ import installation from "./plugins/installation";
5
+ import { TenancyProvider as ContextProvider } from "./contexts/Tenancy";
6
+
7
+ var TenancyProviderHOC = function TenancyProviderHOC(Component) {
8
+ return function TenancyProvider(_ref) {
9
+ var children = _ref.children;
10
+ return /*#__PURE__*/React.createElement(ContextProvider, null, /*#__PURE__*/React.createElement(Component, null, children));
11
+ };
12
+ };
13
+
14
+ export var TenancyExtension = function TenancyExtension() {
15
+ plugins.register(installation);
16
+ return /*#__PURE__*/React.createElement(Provider, {
17
+ hoc: TenancyProviderHOC
18
+ });
19
+ };
20
+ export var Tenancy = /*#__PURE__*/memo(TenancyExtension);
package/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./contexts/Tenancy";
2
2
  export * from "./hooks/useTenancy";
3
3
  export * from "./withTenant";
4
+ export * from "./Tenancy";
4
5
  export declare const plugins: () => import("@webiny/app-admin/types").AdminInstallationPlugin[];
package/index.js CHANGED
@@ -2,6 +2,7 @@ import installation from "./plugins/installation";
2
2
  export * from "./contexts/Tenancy";
3
3
  export * from "./hooks/useTenancy";
4
4
  export * from "./withTenant";
5
+ export * from "./Tenancy";
5
6
  export var plugins = function plugins() {
6
7
  return [installation];
7
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-tenancy",
3
- "version": "5.20.0-beta.1",
3
+ "version": "5.21.0",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,10 +17,10 @@
17
17
  "@babel/runtime": "7.16.3",
18
18
  "@emotion/styled": "10.0.27",
19
19
  "@types/react": "16.14.2",
20
- "@webiny/app": "5.20.0-beta.1",
21
- "@webiny/app-admin": "5.20.0-beta.1",
22
- "@webiny/plugins": "5.20.0-beta.1",
23
- "@webiny/ui": "5.20.0-beta.1",
20
+ "@webiny/app": "5.21.0",
21
+ "@webiny/app-admin": "5.21.0",
22
+ "@webiny/plugins": "5.21.0",
23
+ "@webiny/ui": "5.21.0",
24
24
  "graphql-tag": "2.12.6",
25
25
  "react": "16.14.0",
26
26
  "react-dom": "16.14.0",
@@ -33,8 +33,8 @@
33
33
  "@babel/preset-env": "^7.5.5",
34
34
  "@babel/preset-react": "^7.0.0",
35
35
  "@babel/preset-typescript": "^7.8.3",
36
- "@webiny/cli": "^5.20.0-beta.1",
37
- "@webiny/project-utils": "^5.20.0-beta.1",
36
+ "@webiny/cli": "^5.21.0",
37
+ "@webiny/project-utils": "^5.21.0",
38
38
  "babel-plugin-emotion": "^9.2.8",
39
39
  "babel-plugin-lodash": "^3.3.4",
40
40
  "babel-plugin-named-asset-import": "^1.0.0-next.3e165448",
@@ -55,5 +55,5 @@
55
55
  "removeViewBox": false
56
56
  }
57
57
  },
58
- "gitHead": "40e30fb4c778d0bcc773b3b8231ce8e0861b6d52"
58
+ "gitHead": "c3d4955bf74e7ffdb9628867e3b23cdfe64ea8dc"
59
59
  }