@webiny/tenant-manager 6.0.0-rc.2 → 6.0.0-rc.4
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/admin/SecurityPermission.js +1 -3
- package/admin/SecurityPermission.js.map +1 -1
- package/admin/TenantSelector.js +25 -8
- package/admin/TenantSelector.js.map +1 -1
- package/exports/admin/tenancy.d.ts +7 -0
- package/exports/admin/tenancy.js +8 -0
- package/exports/admin/tenancy.js.map +1 -0
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","AdminConfig","ReactComponent","PermissionsIcon","Security","SecurityPermission","createElement","Permissions","name","title","description","icon","schema","prefix","fullAccess"],"sources":["SecurityPermission.tsx"],"sourcesContent":["import React from \"react\";\nimport { AdminConfig } from \"@webiny/app-admin\";\nimport { ReactComponent as PermissionsIcon } from \"@webiny/icons/business.svg\";\n\nconst { Security } = AdminConfig;\n\nexport const SecurityPermission = () => {\n return (\n <AdminConfig>\n <Security.Permissions\n name=\"tenant-manager\"\n title=\"Tenant Manager\"\n description=\"Manage Tenant Manager permissions.\"\n icon={<PermissionsIcon />}\n schema={{\n prefix: \"tm\",\n fullAccess:
|
|
1
|
+
{"version":3,"names":["React","AdminConfig","ReactComponent","PermissionsIcon","Security","SecurityPermission","createElement","Permissions","name","title","description","icon","schema","prefix","fullAccess"],"sources":["SecurityPermission.tsx"],"sourcesContent":["import React from \"react\";\nimport { AdminConfig } from \"@webiny/app-admin\";\nimport { ReactComponent as PermissionsIcon } from \"@webiny/icons/business.svg\";\n\nconst { Security } = AdminConfig;\n\nexport const SecurityPermission = () => {\n return (\n <AdminConfig>\n <Security.Permissions\n name=\"tenant-manager\"\n title=\"Tenant Manager\"\n description=\"Manage Tenant Manager permissions.\"\n icon={<PermissionsIcon />}\n schema={{\n prefix: \"tm\",\n fullAccess: true\n }}\n />\n </AdminConfig>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,cAAc,IAAIC,eAAe,QAAQ,4BAA4B;AAE9E,MAAM;EAAEC;AAAS,CAAC,GAAGH,WAAW;AAEhC,OAAO,MAAMI,kBAAkB,GAAGA,CAAA,KAAM;EACpC,oBACIL,KAAA,CAAAM,aAAA,CAACL,WAAW,qBACRD,KAAA,CAAAM,aAAA,CAACF,QAAQ,CAACG,WAAW;IACjBC,IAAI,EAAC,gBAAgB;IACrBC,KAAK,EAAC,gBAAgB;IACtBC,WAAW,EAAC,oCAAoC;IAChDC,IAAI,eAAEX,KAAA,CAAAM,aAAA,CAACH,eAAe,MAAE,CAAE;IAC1BS,MAAM,EAAE;MACJC,MAAM,EAAE,IAAI;MACZC,UAAU,EAAE;IAChB;EAAE,CACL,CACQ,CAAC;AAEtB,CAAC","ignoreList":[]}
|
package/admin/TenantSelector.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TenantSelector as BaseTenantSelector } from "@webiny/app-admin";
|
|
3
|
-
import { Icon } from "@webiny/admin-ui";
|
|
3
|
+
import { CopyButton, Icon, Tooltip, useToast } from "@webiny/admin-ui";
|
|
4
4
|
import { useAuthentication } from "@webiny/app-admin";
|
|
5
5
|
import { ReactComponent as TenantIcon } from "@webiny/icons/business.svg";
|
|
6
6
|
export const TenantSelector = BaseTenantSelector.createDecorator(() => {
|
|
@@ -9,13 +9,30 @@ export const TenantSelector = BaseTenantSelector.createDecorator(() => {
|
|
|
9
9
|
identity
|
|
10
10
|
} = useAuthentication();
|
|
11
11
|
const currentTenant = identity.currentTenant;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
const toast = useToast();
|
|
13
|
+
const confirmClipboard = () => {
|
|
14
|
+
toast.showSuccessToast({
|
|
15
|
+
title: "Tenant ID copied to clipboard!"
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
19
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "flex items-center gap-x-xs"
|
|
21
|
+
}, "ID: ", currentTenant.id, /*#__PURE__*/React.createElement(CopyButton, {
|
|
22
|
+
size: "sm",
|
|
23
|
+
value: currentTenant.id,
|
|
24
|
+
onCopy: confirmClipboard,
|
|
25
|
+
variant: "ghost-negative"
|
|
26
|
+
})),
|
|
27
|
+
side: "bottom",
|
|
28
|
+
trigger: /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: "flex items-center gap-x-xs cursor-pointer"
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
31
|
+
label: "Root tenant",
|
|
32
|
+
icon: /*#__PURE__*/React.createElement(TenantIcon, null),
|
|
33
|
+
className: "fill-neutral-xstrong"
|
|
34
|
+
}), currentTenant.name)
|
|
35
|
+
});
|
|
19
36
|
};
|
|
20
37
|
});
|
|
21
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","TenantSelector","BaseTenantSelector","Icon","useAuthentication","ReactComponent","TenantIcon","createDecorator","identity","currentTenant","createElement","className","label","icon","name"],"sources":["TenantSelector.tsx"],"sourcesContent":["import React from \"react\";\nimport { TenantSelector as BaseTenantSelector } from \"@webiny/app-admin\";\nimport { Icon } from \"@webiny/admin-ui\";\nimport { useAuthentication } from \"@webiny/app-admin\";\nimport { ReactComponent as TenantIcon } from \"@webiny/icons/business.svg\";\n\nexport const TenantSelector = BaseTenantSelector.createDecorator(() => {\n return function TenantSelector() {\n const { identity } = useAuthentication();\n const currentTenant = identity.currentTenant;\n\n return (\n <div className={\"flex items-center gap-x-xs\"}>\n <Icon\n
|
|
1
|
+
{"version":3,"names":["React","TenantSelector","BaseTenantSelector","CopyButton","Icon","Tooltip","useToast","useAuthentication","ReactComponent","TenantIcon","createDecorator","identity","currentTenant","toast","confirmClipboard","showSuccessToast","title","createElement","content","className","id","size","value","onCopy","variant","side","trigger","label","icon","name"],"sources":["TenantSelector.tsx"],"sourcesContent":["import React from \"react\";\nimport { TenantSelector as BaseTenantSelector } from \"@webiny/app-admin\";\nimport { CopyButton, Icon, Tooltip, useToast } from \"@webiny/admin-ui\";\nimport { useAuthentication } from \"@webiny/app-admin\";\nimport { ReactComponent as TenantIcon } from \"@webiny/icons/business.svg\";\n\nexport const TenantSelector = BaseTenantSelector.createDecorator(() => {\n return function TenantSelector() {\n const { identity } = useAuthentication();\n const currentTenant = identity.currentTenant;\n const toast = useToast();\n\n const confirmClipboard = () => {\n toast.showSuccessToast({\n title: \"Tenant ID copied to clipboard!\"\n });\n };\n\n return (\n <Tooltip\n content={\n <div className={\"flex items-center gap-x-xs\"}>\n ID: {currentTenant.id}\n <CopyButton\n size=\"sm\"\n value={currentTenant.id}\n onCopy={confirmClipboard}\n variant={\"ghost-negative\"}\n />\n </div>\n }\n side={\"bottom\"}\n trigger={\n <div className={\"flex items-center gap-x-xs cursor-pointer\"}>\n <Icon\n label=\"Root tenant\"\n icon={<TenantIcon />}\n className={\"fill-neutral-xstrong\"}\n />\n {currentTenant.name}\n </div>\n }\n />\n );\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,IAAIC,kBAAkB,QAAQ,mBAAmB;AACxE,SAASC,UAAU,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,kBAAkB;AACtE,SAASC,iBAAiB,QAAQ,mBAAmB;AACrD,SAASC,cAAc,IAAIC,UAAU,QAAQ,4BAA4B;AAEzE,OAAO,MAAMR,cAAc,GAAGC,kBAAkB,CAACQ,eAAe,CAAC,MAAM;EACnE,OAAO,SAAST,cAAcA,CAAA,EAAG;IAC7B,MAAM;MAAEU;IAAS,CAAC,GAAGJ,iBAAiB,CAAC,CAAC;IACxC,MAAMK,aAAa,GAAGD,QAAQ,CAACC,aAAa;IAC5C,MAAMC,KAAK,GAAGP,QAAQ,CAAC,CAAC;IAExB,MAAMQ,gBAAgB,GAAGA,CAAA,KAAM;MAC3BD,KAAK,CAACE,gBAAgB,CAAC;QACnBC,KAAK,EAAE;MACX,CAAC,CAAC;IACN,CAAC;IAED,oBACIhB,KAAA,CAAAiB,aAAA,CAACZ,OAAO;MACJa,OAAO,eACHlB,KAAA,CAAAiB,aAAA;QAAKE,SAAS,EAAE;MAA6B,GAAC,MACtC,EAACP,aAAa,CAACQ,EAAE,eACrBpB,KAAA,CAAAiB,aAAA,CAACd,UAAU;QACPkB,IAAI,EAAC,IAAI;QACTC,KAAK,EAAEV,aAAa,CAACQ,EAAG;QACxBG,MAAM,EAAET,gBAAiB;QACzBU,OAAO,EAAE;MAAiB,CAC7B,CACA,CACR;MACDC,IAAI,EAAE,QAAS;MACfC,OAAO,eACH1B,KAAA,CAAAiB,aAAA;QAAKE,SAAS,EAAE;MAA4C,gBACxDnB,KAAA,CAAAiB,aAAA,CAACb,IAAI;QACDuB,KAAK,EAAC,aAAa;QACnBC,IAAI,eAAE5B,KAAA,CAAAiB,aAAA,CAACR,UAAU,MAAE,CAAE;QACrBU,SAAS,EAAE;MAAuB,CACrC,CAAC,EACDP,aAAa,CAACiB,IACd;IACR,CACJ,CAAC;EAEV,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { TenantEntry } from "../../admin/types.js";
|
|
2
|
+
export { useEnableTenant } from "../../admin/EnableTenant/index.js";
|
|
3
|
+
export { useDisableTenant } from "../../admin/DisableTenant/index.js";
|
|
4
|
+
export { useCurrentTenant } from "../../admin/CurrentTenant/useCurrentTenant.js";
|
|
5
|
+
export { IsNotRootTenant } from "../../admin/IsRootTenant.js";
|
|
6
|
+
export { IsRootTenant } from "../../admin/IsRootTenant.js";
|
|
7
|
+
export { IsTenant } from "../../admin/IsRootTenant.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { useEnableTenant } from "../../admin/EnableTenant/index.js";
|
|
2
|
+
export { useDisableTenant } from "../../admin/DisableTenant/index.js";
|
|
3
|
+
export { useCurrentTenant } from "../../admin/CurrentTenant/useCurrentTenant.js";
|
|
4
|
+
export { IsNotRootTenant } from "../../admin/IsRootTenant.js";
|
|
5
|
+
export { IsRootTenant } from "../../admin/IsRootTenant.js";
|
|
6
|
+
export { IsTenant } from "../../admin/IsRootTenant.js";
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=tenancy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEnableTenant","useDisableTenant","useCurrentTenant","IsNotRootTenant","IsRootTenant","IsTenant"],"sources":["tenancy.ts"],"sourcesContent":["export type { TenantEntry } from \"~/admin/types.js\";\nexport { useEnableTenant } from \"~/admin/EnableTenant/index.js\";\nexport { useDisableTenant } from \"~/admin/DisableTenant/index.js\";\nexport { useCurrentTenant } from \"~/admin/CurrentTenant/useCurrentTenant.js\";\nexport { IsNotRootTenant } from \"~/admin/IsRootTenant.js\";\nexport { IsRootTenant } from \"~/admin/IsRootTenant.js\";\nexport { IsTenant } from \"~/admin/IsRootTenant.js\";\n"],"mappings":"AACA,SAASA,eAAe;AACxB,SAASC,gBAAgB;AACzB,SAASC,gBAAgB;AACzB,SAASC,eAAe;AACxB,SAASC,YAAY;AACrB,SAASC,QAAQ","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/tenant-manager",
|
|
3
|
-
"version": "6.0.0-rc.
|
|
3
|
+
"version": "6.0.0-rc.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "index.js",
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"license": "Webiny Enterprise",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@apollo/react-hooks": "3.1.5",
|
|
16
|
-
"@webiny/admin-ui": "6.0.0-rc.
|
|
17
|
-
"@webiny/api-core": "6.0.0-rc.
|
|
18
|
-
"@webiny/api-headless-cms": "6.0.0-rc.
|
|
19
|
-
"@webiny/app": "6.0.0-rc.
|
|
20
|
-
"@webiny/app-aco": "6.0.0-rc.
|
|
21
|
-
"@webiny/app-admin": "6.0.0-rc.
|
|
22
|
-
"@webiny/app-headless-cms": "6.0.0-rc.
|
|
23
|
-
"@webiny/feature": "6.0.0-rc.
|
|
24
|
-
"@webiny/handler-graphql": "6.0.0-rc.
|
|
25
|
-
"@webiny/icons": "6.0.0-rc.
|
|
26
|
-
"@webiny/project": "6.0.0-rc.
|
|
27
|
-
"@webiny/project-aws": "6.0.0-rc.
|
|
16
|
+
"@webiny/admin-ui": "6.0.0-rc.4",
|
|
17
|
+
"@webiny/api-core": "6.0.0-rc.4",
|
|
18
|
+
"@webiny/api-headless-cms": "6.0.0-rc.4",
|
|
19
|
+
"@webiny/app": "6.0.0-rc.4",
|
|
20
|
+
"@webiny/app-aco": "6.0.0-rc.4",
|
|
21
|
+
"@webiny/app-admin": "6.0.0-rc.4",
|
|
22
|
+
"@webiny/app-headless-cms": "6.0.0-rc.4",
|
|
23
|
+
"@webiny/feature": "6.0.0-rc.4",
|
|
24
|
+
"@webiny/handler-graphql": "6.0.0-rc.4",
|
|
25
|
+
"@webiny/icons": "6.0.0-rc.4",
|
|
26
|
+
"@webiny/project": "6.0.0-rc.4",
|
|
27
|
+
"@webiny/project-aws": "6.0.0-rc.4",
|
|
28
28
|
"graphql-tag": "2.12.6",
|
|
29
29
|
"mobx": "6.15.0",
|
|
30
30
|
"mobx-react-lite": "3.4.3",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"react-dom": "18.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@webiny/build-tools": "6.0.0-rc.
|
|
35
|
+
"@webiny/build-tools": "6.0.0-rc.4",
|
|
36
36
|
"rimraf": "6.1.3",
|
|
37
37
|
"typescript": "5.9.3"
|
|
38
38
|
},
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"access": "public",
|
|
41
41
|
"directory": "dist"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "e2758ee1cfa3b9a7152e9bb995a90ccabd33266f"
|
|
44
44
|
}
|