@webiny/app-admin-ui 6.0.0-alpha.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.
Files changed (81) hide show
  1. package/Dashboard/Welcome.d.ts +3 -0
  2. package/Dashboard/Welcome.js +48 -0
  3. package/Dashboard/Welcome.js.map +1 -0
  4. package/Dashboard/components/ApplicationWidget.d.ts +9 -0
  5. package/Dashboard/components/ApplicationWidget.js +31 -0
  6. package/Dashboard/components/ApplicationWidget.js.map +1 -0
  7. package/Dashboard/components/AssistanceWidget.d.ts +2 -0
  8. package/Dashboard/components/AssistanceWidget.js +59 -0
  9. package/Dashboard/components/AssistanceWidget.js.map +1 -0
  10. package/Dashboard/components/CommunityWidget.d.ts +2 -0
  11. package/Dashboard/components/CommunityWidget.js +65 -0
  12. package/Dashboard/components/CommunityWidget.js.map +1 -0
  13. package/Dashboard/components/MissingPermissionsWidget.d.ts +2 -0
  14. package/Dashboard/components/MissingPermissionsWidget.js +17 -0
  15. package/Dashboard/components/MissingPermissionsWidget.js.map +1 -0
  16. package/Dashboard/components/assets/github.svg +1 -0
  17. package/Dashboard/components/assets/slack.svg +8 -0
  18. package/Dashboard/components/assets/x-twitter.svg +5 -0
  19. package/Dashboard/components/assets/youtube.svg +11 -0
  20. package/Dashboard/components/index.d.ts +4 -0
  21. package/Dashboard/components/index.js +6 -0
  22. package/Dashboard/components/index.js.map +1 -0
  23. package/Dashboard.d.ts +2 -0
  24. package/Dashboard.js +10 -0
  25. package/Dashboard.js.map +1 -0
  26. package/Dialog/DialogContainer.d.ts +2 -0
  27. package/Dialog/DialogContainer.js +71 -0
  28. package/Dialog/DialogContainer.js.map +1 -0
  29. package/Dialog/DialogProvider.d.ts +5 -0
  30. package/Dialog/DialogProvider.js +11 -0
  31. package/Dialog/DialogProvider.js.map +1 -0
  32. package/Dialog.d.ts +2 -0
  33. package/Dialog.js +13 -0
  34. package/Dialog.js.map +1 -0
  35. package/LICENSE +21 -0
  36. package/Layout.d.ts +2 -0
  37. package/Layout.js +30 -0
  38. package/Layout.js.map +1 -0
  39. package/Logo.d.ts +2 -0
  40. package/Logo.js +17 -0
  41. package/Logo.js.map +1 -0
  42. package/Navigation/Navigation.d.ts +2 -0
  43. package/Navigation/Navigation.js +36 -0
  44. package/Navigation/Navigation.js.map +1 -0
  45. package/Navigation/SidebarMenuItems.d.ts +10 -0
  46. package/Navigation/SidebarMenuItems.js +44 -0
  47. package/Navigation/SidebarMenuItems.js.map +1 -0
  48. package/Navigation/SidebarProvider.d.ts +6 -0
  49. package/Navigation/SidebarProvider.js +9 -0
  50. package/Navigation/SidebarProvider.js.map +1 -0
  51. package/Navigation.d.ts +2 -0
  52. package/Navigation.js +11 -0
  53. package/Navigation.js.map +1 -0
  54. package/NotFound/notFound.svg +1 -0
  55. package/NotFound.d.ts +2 -0
  56. package/NotFound.js +21 -0
  57. package/NotFound.js.map +1 -0
  58. package/README.md +7 -0
  59. package/UserMenu/UserMenu.d.ts +2 -0
  60. package/UserMenu/UserMenu.js +30 -0
  61. package/UserMenu/UserMenu.js.map +1 -0
  62. package/UserMenu/UserMenuHandle.d.ts +2 -0
  63. package/UserMenu/UserMenuHandle.js +45 -0
  64. package/UserMenu/UserMenuHandle.js.map +1 -0
  65. package/UserMenu/UserMenuItem.d.ts +3 -0
  66. package/UserMenu/UserMenuItem.js +15 -0
  67. package/UserMenu/UserMenuItem.js.map +1 -0
  68. package/UserMenu/UserMenuLink.d.ts +3 -0
  69. package/UserMenu/UserMenuLink.js +15 -0
  70. package/UserMenu/UserMenuLink.js.map +1 -0
  71. package/UserMenu/UserMenuSeparator.d.ts +2 -0
  72. package/UserMenu/UserMenuSeparator.js +12 -0
  73. package/UserMenu/UserMenuSeparator.js.map +1 -0
  74. package/UserMenu.d.ts +2 -0
  75. package/UserMenu.js +11 -0
  76. package/UserMenu.js.map +1 -0
  77. package/index.d.ts +2 -0
  78. package/index.js +13 -0
  79. package/index.js.map +1 -0
  80. package/package.json +47 -0
  81. package/styles.scss +2 -0
package/Logo.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","LogoRenderer","useAdminConfig","minHeight","Logo","createDecorator","tenant","createElement","style","logo"],"sources":["Logo.tsx"],"sourcesContent":["import React from \"react\";\nimport { LogoRenderer, useAdminConfig } from \"@webiny/app-admin\";\n\nconst minHeight = { minHeight: 48 };\n\nexport const Logo = LogoRenderer.createDecorator(() => {\n return function Logo() {\n const { tenant } = useAdminConfig();\n return <div style={minHeight}>{tenant.logo || null}</div>;\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,EAAEC,cAAc,QAAQ,mBAAmB;AAEhE,MAAMC,SAAS,GAAG;EAAEA,SAAS,EAAE;AAAG,CAAC;AAEnC,OAAO,MAAMC,IAAI,GAAGH,YAAY,CAACI,eAAe,CAAC,MAAM;EACnD,OAAO,SAASD,IAAIA,CAAA,EAAG;IACnB,MAAM;MAAEE;IAAO,CAAC,GAAGJ,cAAc,CAAC,CAAC;IACnC,oBAAOF,KAAA,CAAAO,aAAA;MAAKC,KAAK,EAAEL;IAAU,GAAEG,MAAM,CAACG,IAAI,IAAI,IAAU,CAAC;EAC7D,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const Navigation: (props: unknown) => React.JSX.Element;
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ import { NavigationRenderer, useAdminConfig } from "@webiny/app-admin";
3
+ import { Sidebar } from "@webiny/admin-ui";
4
+ import { SidebarMenuItems } from "./SidebarMenuItems";
5
+ import { Link } from "@webiny/react-router";
6
+ export const Navigation = NavigationRenderer.createDecorator(() => {
7
+ return function Navigation() {
8
+ const {
9
+ menus,
10
+ tenant
11
+ } = useAdminConfig();
12
+ const title = /*#__PURE__*/React.createElement(Link, {
13
+ to: "/"
14
+ }, tenant.name);
15
+ const icon = /*#__PURE__*/React.createElement(Link, {
16
+ to: "/"
17
+ }, /*#__PURE__*/React.createElement(Sidebar.Icon, {
18
+ element: tenant.logo,
19
+ label: "Webiny"
20
+ }));
21
+ return /*#__PURE__*/React.createElement(Sidebar, {
22
+ title: title,
23
+ icon: icon,
24
+ footer: /*#__PURE__*/React.createElement(SidebarMenuItems, {
25
+ menus: menus,
26
+ where: {
27
+ tags: ["footer"]
28
+ }
29
+ })
30
+ }, /*#__PURE__*/React.createElement(SidebarMenuItems, {
31
+ menus: menus
32
+ }));
33
+ };
34
+ });
35
+
36
+ //# sourceMappingURL=Navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","NavigationRenderer","useAdminConfig","Sidebar","SidebarMenuItems","Link","Navigation","createDecorator","menus","tenant","title","createElement","to","name","icon","Icon","element","logo","label","footer","where","tags"],"sources":["Navigation.tsx"],"sourcesContent":["import React from \"react\";\nimport { NavigationRenderer, useAdminConfig } from \"@webiny/app-admin\";\nimport { Sidebar } from \"@webiny/admin-ui\";\nimport { SidebarMenuItems } from \"./SidebarMenuItems\";\nimport { Link } from \"@webiny/react-router\";\n\nexport const Navigation = NavigationRenderer.createDecorator(() => {\n return function Navigation() {\n const { menus, tenant } = useAdminConfig();\n\n const title = <Link to={\"/\"}>{tenant.name}</Link>;\n const icon = (\n <Link to={\"/\"}>\n <Sidebar.Icon element={tenant.logo} label={\"Webiny\"} />\n </Link>\n );\n\n return (\n <Sidebar\n title={title}\n icon={icon}\n footer={<SidebarMenuItems menus={menus} where={{ tags: [\"footer\"] }} />}\n >\n <SidebarMenuItems menus={menus} />\n </Sidebar>\n );\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,mBAAmB;AACtE,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,gBAAgB;AACzB,SAASC,IAAI,QAAQ,sBAAsB;AAE3C,OAAO,MAAMC,UAAU,GAAGL,kBAAkB,CAACM,eAAe,CAAC,MAAM;EAC/D,OAAO,SAASD,UAAUA,CAAA,EAAG;IACzB,MAAM;MAAEE,KAAK;MAAEC;IAAO,CAAC,GAAGP,cAAc,CAAC,CAAC;IAE1C,MAAMQ,KAAK,gBAAGV,KAAA,CAAAW,aAAA,CAACN,IAAI;MAACO,EAAE,EAAE;IAAI,GAAEH,MAAM,CAACI,IAAW,CAAC;IACjD,MAAMC,IAAI,gBACNd,KAAA,CAAAW,aAAA,CAACN,IAAI;MAACO,EAAE,EAAE;IAAI,gBACVZ,KAAA,CAAAW,aAAA,CAACR,OAAO,CAACY,IAAI;MAACC,OAAO,EAAEP,MAAM,CAACQ,IAAK;MAACC,KAAK,EAAE;IAAS,CAAE,CACpD,CACT;IAED,oBACIlB,KAAA,CAAAW,aAAA,CAACR,OAAO;MACJO,KAAK,EAAEA,KAAM;MACbI,IAAI,EAAEA,IAAK;MACXK,MAAM,eAAEnB,KAAA,CAAAW,aAAA,CAACP,gBAAgB;QAACI,KAAK,EAAEA,KAAM;QAACY,KAAK,EAAE;UAAEC,IAAI,EAAE,CAAC,QAAQ;QAAE;MAAE,CAAE;IAAE,gBAExErB,KAAA,CAAAW,aAAA,CAACP,gBAAgB;MAACI,KAAK,EAAEA;IAAM,CAAE,CAC5B,CAAC;EAElB,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import type { MenuConfig } from "@webiny/app-admin/config/AdminConfig/Menu";
3
+ export interface MenusProps {
4
+ menus: MenuConfig[];
5
+ where?: {
6
+ tags?: string[];
7
+ parent?: string;
8
+ };
9
+ }
10
+ export declare const SidebarMenuItems: (props: MenusProps) => (React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null)[];
@@ -0,0 +1,44 @@
1
+ import React from "react";
2
+ // This component is called recursively to render root and nested menu items.
3
+ // The menu items are defined via AdminConfig.
4
+ export const SidebarMenuItems = props => {
5
+ const {
6
+ menus: allMenus,
7
+ where = {}
8
+ } = props;
9
+ const filteredMenus = allMenus.filter(menu => {
10
+ const whereParent = where.parent || null;
11
+ const menuParent = menu.parent;
12
+ if (whereParent !== menuParent) {
13
+ return false;
14
+ }
15
+ const whereTags = where.tags || [];
16
+ const menuTags = menu.tags || [];
17
+ if (whereTags.length > 0) {
18
+ // If not all tags are present, return false.
19
+ return whereTags.every(tag => menuTags.includes(tag));
20
+ }
21
+ return menuTags.length === 0;
22
+ });
23
+ return filteredMenus.map(m => {
24
+ if (! /*#__PURE__*/React.isValidElement(m.element)) {
25
+ return null;
26
+ }
27
+ const hasChildMenus = allMenus.some(menu => menu.parent === m.name);
28
+ if (hasChildMenus) {
29
+ return /*#__PURE__*/React.cloneElement(m.element, {
30
+ key: m.parent + m.name
31
+ }, /*#__PURE__*/React.createElement(SidebarMenuItems, {
32
+ menus: allMenus,
33
+ where: {
34
+ parent: m.name
35
+ }
36
+ }));
37
+ }
38
+ return /*#__PURE__*/React.cloneElement(m.element, {
39
+ key: m.parent + m.name
40
+ });
41
+ });
42
+ };
43
+
44
+ //# sourceMappingURL=SidebarMenuItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","SidebarMenuItems","props","menus","allMenus","where","filteredMenus","filter","menu","whereParent","parent","menuParent","whereTags","tags","menuTags","length","every","tag","includes","map","m","isValidElement","element","hasChildMenus","some","name","cloneElement","key","createElement"],"sources":["SidebarMenuItems.tsx"],"sourcesContent":["import React from \"react\";\nimport type { MenuConfig } from \"@webiny/app-admin/config/AdminConfig/Menu\";\n\nexport interface MenusProps {\n menus: MenuConfig[];\n where?: { tags?: string[]; parent?: string };\n}\n\n// This component is called recursively to render root and nested menu items.\n// The menu items are defined via AdminConfig.\nexport const SidebarMenuItems = (props: MenusProps) => {\n const { menus: allMenus, where = {} } = props;\n const filteredMenus = allMenus.filter(menu => {\n const whereParent = where.parent || null;\n const menuParent = menu.parent;\n if (whereParent !== menuParent) {\n return false;\n }\n\n const whereTags = where.tags || [];\n const menuTags = menu.tags || [];\n\n if (whereTags.length > 0) {\n // If not all tags are present, return false.\n return whereTags.every(tag => menuTags.includes(tag));\n }\n\n return menuTags.length === 0;\n });\n\n return filteredMenus.map(m => {\n if (!React.isValidElement(m.element)) {\n return null;\n }\n\n const hasChildMenus = allMenus.some(menu => menu.parent === m.name);\n if (hasChildMenus) {\n return React.cloneElement(\n m.element,\n { key: m.parent + m.name },\n <SidebarMenuItems menus={allMenus} where={{ parent: m.name }} />\n );\n }\n\n return React.cloneElement(m.element, { key: m.parent + m.name });\n });\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAQzB;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAIC,KAAiB,IAAK;EACnD,MAAM;IAAEC,KAAK,EAAEC,QAAQ;IAAEC,KAAK,GAAG,CAAC;EAAE,CAAC,GAAGH,KAAK;EAC7C,MAAMI,aAAa,GAAGF,QAAQ,CAACG,MAAM,CAACC,IAAI,IAAI;IAC1C,MAAMC,WAAW,GAAGJ,KAAK,CAACK,MAAM,IAAI,IAAI;IACxC,MAAMC,UAAU,GAAGH,IAAI,CAACE,MAAM;IAC9B,IAAID,WAAW,KAAKE,UAAU,EAAE;MAC5B,OAAO,KAAK;IAChB;IAEA,MAAMC,SAAS,GAAGP,KAAK,CAACQ,IAAI,IAAI,EAAE;IAClC,MAAMC,QAAQ,GAAGN,IAAI,CAACK,IAAI,IAAI,EAAE;IAEhC,IAAID,SAAS,CAACG,MAAM,GAAG,CAAC,EAAE;MACtB;MACA,OAAOH,SAAS,CAACI,KAAK,CAACC,GAAG,IAAIH,QAAQ,CAACI,QAAQ,CAACD,GAAG,CAAC,CAAC;IACzD;IAEA,OAAOH,QAAQ,CAACC,MAAM,KAAK,CAAC;EAChC,CAAC,CAAC;EAEF,OAAOT,aAAa,CAACa,GAAG,CAACC,CAAC,IAAI;IAC1B,IAAI,eAACpB,KAAK,CAACqB,cAAc,CAACD,CAAC,CAACE,OAAO,CAAC,EAAE;MAClC,OAAO,IAAI;IACf;IAEA,MAAMC,aAAa,GAAGnB,QAAQ,CAACoB,IAAI,CAAChB,IAAI,IAAIA,IAAI,CAACE,MAAM,KAAKU,CAAC,CAACK,IAAI,CAAC;IACnE,IAAIF,aAAa,EAAE;MACf,oBAAOvB,KAAK,CAAC0B,YAAY,CACrBN,CAAC,CAACE,OAAO,EACT;QAAEK,GAAG,EAAEP,CAAC,CAACV,MAAM,GAAGU,CAAC,CAACK;MAAK,CAAC,eAC1BzB,KAAA,CAAA4B,aAAA,CAAC3B,gBAAgB;QAACE,KAAK,EAAEC,QAAS;QAACC,KAAK,EAAE;UAAEK,MAAM,EAAEU,CAAC,CAACK;QAAK;MAAE,CAAE,CACnE,CAAC;IACL;IAEA,oBAAOzB,KAAK,CAAC0B,YAAY,CAACN,CAAC,CAACE,OAAO,EAAE;MAAEK,GAAG,EAAEP,CAAC,CAACV,MAAM,GAAGU,CAAC,CAACK;IAAK,CAAC,CAAC;EACpE,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface NavigationProviderProps {
3
+ children?: React.ReactNode;
4
+ }
5
+ export declare const SidebarProvider: (Component: React.ComponentType<NavigationProviderProps>) => (props: NavigationProviderProps) => React.JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { SidebarProvider as AdminUiSidebar } from "@webiny/admin-ui";
3
+ export const SidebarProvider = Component => {
4
+ return function SidebarProvider(props) {
5
+ return /*#__PURE__*/React.createElement(AdminUiSidebar, null, /*#__PURE__*/React.createElement(Component, props));
6
+ };
7
+ };
8
+
9
+ //# sourceMappingURL=SidebarProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","SidebarProvider","AdminUiSidebar","Component","props","createElement"],"sources":["SidebarProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { SidebarProvider as AdminUiSidebar } from \"@webiny/admin-ui\";\n\ninterface NavigationProviderProps {\n children?: React.ReactNode;\n}\n\nexport const SidebarProvider = (Component: React.ComponentType<NavigationProviderProps>) => {\n return function SidebarProvider(props: NavigationProviderProps) {\n return (\n <AdminUiSidebar>\n <Component {...props} />\n </AdminUiSidebar>\n );\n };\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,IAAIC,cAAc,QAAQ,kBAAkB;AAMpE,OAAO,MAAMD,eAAe,GAAIE,SAAuD,IAAK;EACxF,OAAO,SAASF,eAAeA,CAACG,KAA8B,EAAE;IAC5D,oBACIJ,KAAA,CAAAK,aAAA,CAACH,cAAc,qBACXF,KAAA,CAAAK,aAAA,CAACF,SAAS,EAAKC,KAAQ,CACX,CAAC;EAEzB,CAAC;AACL,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const Navigation: () => React.JSX.Element;
package/Navigation.js ADDED
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { Provider } from "@webiny/app-admin";
3
+ import { SidebarProvider } from "./Navigation/SidebarProvider";
4
+ import { Navigation as DecoratedNavigation } from "./Navigation/Navigation";
5
+ export const Navigation = () => {
6
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Provider, {
7
+ hoc: SidebarProvider
8
+ }), /*#__PURE__*/React.createElement(DecoratedNavigation, null));
9
+ };
10
+
11
+ //# sourceMappingURL=Navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Provider","SidebarProvider","Navigation","DecoratedNavigation","createElement","Fragment","hoc"],"sources":["Navigation.tsx"],"sourcesContent":["import React from \"react\";\nimport { Provider } from \"@webiny/app-admin\";\nimport { SidebarProvider } from \"./Navigation/SidebarProvider\";\nimport { Navigation as DecoratedNavigation } from \"./Navigation/Navigation\";\n\nexport const Navigation = () => {\n return (\n <>\n <Provider hoc={SidebarProvider} />\n <DecoratedNavigation />\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,eAAe;AACxB,SAASC,UAAU,IAAIC,mBAAmB;AAE1C,OAAO,MAAMD,UAAU,GAAGA,CAAA,KAAM;EAC5B,oBACIH,KAAA,CAAAK,aAAA,CAAAL,KAAA,CAAAM,QAAA,qBACIN,KAAA,CAAAK,aAAA,CAACJ,QAAQ;IAACM,GAAG,EAAEL;EAAgB,CAAE,CAAC,eAClCF,KAAA,CAAAK,aAAA,CAACD,mBAAmB,MAAE,CACxB,CAAC;AAEX,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ <svg id="ffa0e257-4b46-4632-a8d6-93195cbf254d" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="895.68" height="517.48" viewBox="0 0 895.68 517.48"><defs><linearGradient id="74471b12-b6be-488b-b2aa-2815e91483d9" x1="790.94" y1="640.76" x2="790.94" y2="264.76" gradientTransform="translate(1229.99 -336.2) rotate(90)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity="0.25"/><stop offset="0.54" stop-color="gray" stop-opacity="0.12"/><stop offset="1" stop-color="gray" stop-opacity="0.1"/></linearGradient><linearGradient id="f5c756da-9879-448e-9194-9478f83d355f" x1="785.97" y1="446.14" x2="785.97" y2="321.91" gradientTransform="translate(1166.67 -399.94) rotate(90)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="5c9be04e-db0f-4829-87c1-2cfa193e30b8" x1="660.92" y1="518.19" x2="660.92" y2="494.17" gradientTransform="translate(1146.84 -172.9) rotate(90)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="b92f3a53-b4d2-4abd-916c-aeb632188996" x1="433.66" y1="605.23" x2="433.66" y2="235.23" gradientTransform="translate(13.58 8.51)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="44577794-7f8e-40ae-89fc-019e5bfac17e" x1="428.36" y1="413.71" x2="428.36" y2="291.46" gradientTransform="translate(-1.05 11.3)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="666bb7d3-84d0-4835-ad07-c313c2384f21" x1="295.22" y1="484.61" x2="295.22" y2="460.98" gradientTransform="translate(28.38 37.45)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="59939605-05af-4a9a-9980-f700897f3f8b" x1="455.07" y1="464.48" x2="455.07" y2="10.48" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="6c0ba2ee-2d81-48f4-b4cf-f21b525fcc13" x1="449.07" y1="229.48" x2="449.07" y2="79.48" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="45b0c09d-2995-447e-8cb2-7f6b59b5e20c" x1="298.07" y1="316.48" x2="298.07" y2="287.48" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="e5b0a96a-81f6-4370-afe3-5a7d6a35b55e" x1="457.07" y1="517.48" x2="457.07" y2="364.48" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="a1850e5a-cf77-4889-926a-0125112ab273" x1="611.23" y1="564.74" x2="611.23" y2="464.74" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="66998849-614e-4d8a-b9ff-f14bbc588ed8" x1="611.23" y1="660.74" x2="611.23" y2="602.74" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/></defs><title>safe</title><rect x="792.23" y="49.92" width="19.88" height="470.41" transform="translate(247.6 844.09) rotate(-81.36)" fill="#f5f5f5"/><rect x="589.23" y="209.59" width="376" height="490.29" transform="translate(58.72 963.57) rotate(-81.36)" fill="url(#74471b12-b6be-488b-b2aa-2815e91483d9)"/><rect x="603.48" y="229.23" width="342.87" height="470.41" transform="translate(47.16 969.52) rotate(-81.36)" fill="#f5f5f5"/><circle cx="580.99" cy="251.51" r="4.86" transform="translate(92.88 596.86) rotate(-81.36)" fill="#ff5252"/><circle cx="594.2" cy="253.52" r="4.86" transform="translate(102.12 611.62) rotate(-81.36)" fill="#ff0"/><circle cx="607.41" cy="255.53" r="4.86" transform="translate(111.36 626.39) rotate(-81.36)" fill="#69f0ae"/><rect x="720.53" y="174.84" width="124.23" height="422.38" transform="translate(131.25 910.54) rotate(-81.36)" fill="url(#f5c756da-9879-448e-9194-9478f83d355f)"/><rect x="576.36" y="328.95" width="413.27" height="115.12" transform="translate(-85.2 -304.51) rotate(8.64)" fill="#fa5a28"/><rect x="628.65" y="473.94" width="24.02" height="28.16" transform="translate(-90.24 856.82) rotate(-81.36)" fill="url(#5c9be04e-db0f-4829-87c1-2cfa193e30b8)"/><rect x="627.88" y="477.73" width="26.5" height="19.88" transform="translate(-71.61 -282.05) rotate(8.64)" fill="#fa5a28"/><rect x="622.77" y="511.3" width="26.5" height="19.88" transform="translate(-66.63 -280.9) rotate(8.64)" fill="#ff5252"/><rect x="617.67" y="544.87" width="26.5" height="19.88" transform="translate(-61.64 -279.75) rotate(8.64)" fill="#ff9800"/><rect x="696.41" y="506.51" width="213.67" height="11.59" transform="translate(-66.07 -306.13) rotate(8.64)" fill="#fa5a28" opacity="0.4"/><rect x="691.31" y="540.08" width="213.67" height="11.59" transform="translate(-61.09 -304.98) rotate(8.64)" fill="#fa5a28" opacity="0.4"/><rect x="686.21" y="573.65" width="213.67" height="11.59" transform="translate(-56.1 -303.83) rotate(8.64)" fill="#fa5a28" opacity="0.4"/><rect x="159.15" y="254.51" width="500.84" height="19.56" transform="translate(-199.95 -95.55) rotate(-12.6)" fill="#f5f5f5"/><rect x="186.23" y="243.74" width="522" height="370" transform="translate(-234.92 -83.38) rotate(-12.6)" fill="url(#b92f3a53-b4d2-4abd-916c-aeb632188996)"/><rect x="198.08" y="269.78" width="500.84" height="337.4" transform="translate(-237.01 -82.86) rotate(-12.6)" fill="#f5f5f5"/><ellipse cx="177.11" cy="316.25" rx="5.17" ry="4.78" transform="translate(-216.88 -145.01) rotate(-12.6)" fill="#ff5252"/><ellipse cx="191" cy="313.15" rx="5.17" ry="4.78" transform="translate(-215.87 -142.05) rotate(-12.6)" fill="#ff0"/><ellipse cx="204.88" cy="310.05" rx="5.17" ry="4.78" transform="translate(-214.86 -139.1) rotate(-12.6)" fill="#69f0ae"/><rect x="202.46" y="302.76" width="449.7" height="122.25" transform="translate(-221.25 -89.28) rotate(-12.6)" fill="url(#44577794-7f8e-40ae-89fc-019e5bfac17e)"/><rect x="207.83" y="307.54" width="440" height="113.28" transform="translate(-221.3 -89.16) rotate(-12.6)" fill="#fa5a28"/><rect x="308.61" y="498.42" width="29.98" height="23.63" transform="translate(-255.67 -108.38) rotate(-12.6)" fill="url(#666bb7d3-84d0-4835-ad07-c313c2384f21)"/><rect x="309.83" y="499.96" width="28.22" height="19.56" transform="matrix(0.98, -0.22, 0.22, 0.98, -255.56, -108.32)" fill="#fa5a28"/><rect x="317.12" y="532.57" width="28.22" height="19.56" transform="translate(-262.49 -105.94) rotate(-12.6)" fill="#ff5252"/><rect x="324.41" y="565.18" width="28.22" height="19.56" transform="matrix(0.98, -0.22, 0.22, 0.98, -269.43, -103.57)" fill="#ff9800"/><rect x="380.57" y="465.95" width="227.49" height="11.41" transform="translate(-243.14 -72.07) rotate(-12.6)" fill="#fa5a28" opacity="0.4"/><rect x="387.86" y="498.56" width="227.49" height="11.41" transform="translate(-250.08 -69.69) rotate(-12.6)" fill="#fa5a28" opacity="0.4"/><rect x="395.15" y="531.17" width="227.49" height="11.41" transform="translate(-257.02 -67.32) rotate(-12.6)" fill="#fa5a28" opacity="0.4"/><rect x="170.07" y="18.48" width="568" height="24" fill="#f5f5f5"/><rect x="159.07" y="10.48" width="592" height="454" fill="url(#59939605-05af-4a9a-9980-f700897f3f8b)"/><rect x="170.07" y="42.48" width="568" height="414" fill="#fff"/><circle cx="183.94" cy="30.48" r="5.87" fill="#ff5252"/><circle cx="200.07" cy="30.48" r="5.87" fill="#ff0"/><circle cx="216.2" cy="30.48" r="5.87" fill="#69f0ae"/><rect x="194.07" y="79.48" width="510" height="150" fill="url(#6c0ba2ee-2d81-48f4-b4cf-f21b525fcc13)"/><rect x="200.07" y="85.48" width="499" height="139" fill="#fa5a28"/><rect x="281.07" y="287.48" width="34" height="29" fill="url(#45b0c09d-2995-447e-8cb2-7f6b59b5e20c)"/><rect x="282.57" y="289.48" width="32" height="24" fill="#fa5a28"/><rect x="282.57" y="330.48" width="32" height="24" fill="#ff5252"/><rect x="282.57" y="371.48" width="32" height="24" fill="#ff9800"/><rect x="367.57" y="294.48" width="258" height="14" fill="#fa5a28" opacity="0.4"/><rect x="367.57" y="335.48" width="258" height="14" fill="#fa5a28" opacity="0.4"/><rect x="367.57" y="376.48" width="258" height="14" fill="#fa5a28" opacity="0.4"/><rect x="364.07" y="364.48" width="186" height="153" fill="url(#e5b0a96a-81f6-4370-afe3-5a7d6a35b55e)"/><path d="M559.15,531.41a52.08,52.08,0,0,1,104.17,0v33.33H677.9V531.41a66.67,66.67,0,1,0-133.33,0v33.33h14.58Z" transform="translate(-152.16 -191.26)" fill="url(#a1850e5a-cf77-4889-926a-0125112ab273)"/><path d="M561.23,530.74a50,50,0,0,1,100,0v32h14v-32a64,64,0,0,0-128,0v32h14Z" transform="translate(-152.16 -191.26)" fill="#fff"/><rect x="372.07" y="369.48" width="174" height="142" fill="#fa5a28"/><rect x="372.07" y="369.48" width="174" height="142" fill="#fff"/><rect x="372.07" y="397.48" width="174" height="86" fill="#fa5a28"/><path d="M624,615.5a12.76,12.76,0,1,0-22,8.74v27.22a9.28,9.28,0,0,0,18.56,0V624.24A12.7,12.7,0,0,0,624,615.5Z" transform="translate(-152.16 -191.26)" fill="url(#66998849-614e-4d8a-b9ff-f14bbc588ed8)"/><path d="M622.23,617.74a11,11,0,1,0-19,7.53v23.47a8,8,0,1,0,16,0V625.27A11,11,0,0,0,622.23,617.74Z" transform="translate(-152.16 -191.26)" opacity="0.2"/></svg>
package/NotFound.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export declare const NotFound: (props: unknown) => React.JSX.Element;
package/NotFound.js ADDED
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ import { NotFound as NotFoundBase } from "@webiny/app-admin";
3
+ import notFoundImage from "./NotFound/notFound.svg";
4
+ import { Link, Text } from "@webiny/admin-ui";
5
+ export const NotFound = NotFoundBase.createDecorator(() => {
6
+ return function NotFound() {
7
+ return /*#__PURE__*/React.createElement("div", {
8
+ className: "wby-h-full wby-flex wby-flex-col wby-items-center wby-justify-center wby-text-center wby-gap-xs"
9
+ }, /*#__PURE__*/React.createElement("img", {
10
+ width: 200,
11
+ height: 200,
12
+ src: notFoundImage,
13
+ alt: "Not Accessible",
14
+ className: "wby-mb-xl"
15
+ }), /*#__PURE__*/React.createElement(Text, null, "The route is either missing, or you're not authorized to view it."), /*#__PURE__*/React.createElement(Text, null, "Please contact your administrator to report the issue."), /*#__PURE__*/React.createElement(Link, {
16
+ to: "/"
17
+ }, "Take me back."));
18
+ };
19
+ });
20
+
21
+ //# sourceMappingURL=NotFound.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","NotFound","NotFoundBase","notFoundImage","Link","Text","createDecorator","createElement","className","width","height","src","alt","to"],"sources":["NotFound.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { NotFound as NotFoundBase } from \"@webiny/app-admin\";\nimport notFoundImage from \"./NotFound/notFound.svg\";\nimport { Link, Text } from \"@webiny/admin-ui\";\n\nexport const NotFound = NotFoundBase.createDecorator(() => {\n return function NotFound() {\n return (\n <div\n className={\n \"wby-h-full wby-flex wby-flex-col wby-items-center wby-justify-center wby-text-center wby-gap-xs\"\n }\n >\n <img\n width={200}\n height={200}\n src={notFoundImage}\n alt=\"Not Accessible\"\n className={\"wby-mb-xl\"}\n />\n <Text>The route is either missing, or you&apos;re not authorized to view it.</Text>\n <Text>Please contact your administrator to report the issue.</Text>\n <Link to=\"/\">Take me back.</Link>\n </div>\n );\n };\n});\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,IAAIC,YAAY,QAAQ,mBAAmB;AAC5D,OAAOC,aAAa;AACpB,SAASC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AAE7C,OAAO,MAAMJ,QAAQ,GAAGC,YAAY,CAACI,eAAe,CAAC,MAAM;EACvD,OAAO,SAASL,QAAQA,CAAA,EAAG;IACvB,oBACID,KAAA,CAAAO,aAAA;MACIC,SAAS,EACL;IACH,gBAEDR,KAAA,CAAAO,aAAA;MACIE,KAAK,EAAE,GAAI;MACXC,MAAM,EAAE,GAAI;MACZC,GAAG,EAAER,aAAc;MACnBS,GAAG,EAAC,gBAAgB;MACpBJ,SAAS,EAAE;IAAY,CAC1B,CAAC,eACFR,KAAA,CAAAO,aAAA,CAACF,IAAI,QAAC,mEAA4E,CAAC,eACnFL,KAAA,CAAAO,aAAA,CAACF,IAAI,QAAC,wDAA4D,CAAC,eACnEL,KAAA,CAAAO,aAAA,CAACH,IAAI;MAACS,EAAE,EAAC;IAAG,GAAC,eAAmB,CAC/B,CAAC;EAEd,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # @webiny/app-admin-ui
2
+ [![](https://img.shields.io/npm/dw/@webiny/app-admin-ui.svg)](https://www.npmjs.com/package/@webiny/app-admin-ui)
3
+ [![](https://img.shields.io/npm/v/@webiny/app-admin-ui.svg)](https://www.npmjs.com/package/@webiny/app-admin-ui)
4
+ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
5
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
6
+
7
+ An implementation of core UI components for @webiny/app-serverless-cms using UI UI library.
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const UserMenu: (props: unknown) => React.JSX.Element;
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { UserMenuRenderer as UserMenuRendererSpec, UserMenuHandle, useAdminConfig } from "@webiny/app-admin";
3
+ import { DropdownMenu } from "@webiny/admin-ui";
4
+ import { useSecurity } from "@webiny/app-security";
5
+ export const UserMenu = UserMenuRendererSpec.createDecorator(() => {
6
+ return function UserMenu() {
7
+ const security = useSecurity();
8
+ const {
9
+ userMenus
10
+ } = useAdminConfig();
11
+ if (!security || !security.identity) {
12
+ return null;
13
+ }
14
+ const dropDownMenuItems = userMenus.map(m => {
15
+ if (/*#__PURE__*/React.isValidElement(m.element)) {
16
+ return /*#__PURE__*/React.cloneElement(m.element, {
17
+ key: m.name
18
+ });
19
+ }
20
+ return null;
21
+ });
22
+ return /*#__PURE__*/React.createElement(DropdownMenu, {
23
+ trigger: /*#__PURE__*/React.createElement(UserMenuHandle, null),
24
+ "data-testid": "logged-in-user-menu-list",
25
+ className: "wby-w-[220px]"
26
+ }, dropDownMenuItems);
27
+ };
28
+ });
29
+
30
+ //# sourceMappingURL=UserMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","UserMenuRenderer","UserMenuRendererSpec","UserMenuHandle","useAdminConfig","DropdownMenu","useSecurity","UserMenu","createDecorator","security","userMenus","identity","dropDownMenuItems","map","m","isValidElement","element","cloneElement","key","name","createElement","trigger","className"],"sources":["UserMenu.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n UserMenuRenderer as UserMenuRendererSpec,\n UserMenuHandle,\n useAdminConfig\n} from \"@webiny/app-admin\";\nimport { DropdownMenu } from \"@webiny/admin-ui\";\nimport { useSecurity } from \"@webiny/app-security\";\n\nexport const UserMenu = UserMenuRendererSpec.createDecorator(() => {\n return function UserMenu() {\n const security = useSecurity();\n const { userMenus } = useAdminConfig();\n\n if (!security || !security.identity) {\n return null;\n }\n\n const dropDownMenuItems = userMenus.map(m => {\n if (React.isValidElement(m.element)) {\n return React.cloneElement(m.element, { key: m.name });\n }\n\n return null;\n });\n\n return (\n <DropdownMenu\n trigger={<UserMenuHandle />}\n data-testid={\"logged-in-user-menu-list\"}\n className={\"wby-w-[220px]\"}\n >\n {dropDownMenuItems}\n </DropdownMenu>\n );\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACIC,gBAAgB,IAAIC,oBAAoB,EACxCC,cAAc,EACdC,cAAc,QACX,mBAAmB;AAC1B,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,WAAW,QAAQ,sBAAsB;AAElD,OAAO,MAAMC,QAAQ,GAAGL,oBAAoB,CAACM,eAAe,CAAC,MAAM;EAC/D,OAAO,SAASD,QAAQA,CAAA,EAAG;IACvB,MAAME,QAAQ,GAAGH,WAAW,CAAC,CAAC;IAC9B,MAAM;MAAEI;IAAU,CAAC,GAAGN,cAAc,CAAC,CAAC;IAEtC,IAAI,CAACK,QAAQ,IAAI,CAACA,QAAQ,CAACE,QAAQ,EAAE;MACjC,OAAO,IAAI;IACf;IAEA,MAAMC,iBAAiB,GAAGF,SAAS,CAACG,GAAG,CAACC,CAAC,IAAI;MACzC,iBAAId,KAAK,CAACe,cAAc,CAACD,CAAC,CAACE,OAAO,CAAC,EAAE;QACjC,oBAAOhB,KAAK,CAACiB,YAAY,CAACH,CAAC,CAACE,OAAO,EAAE;UAAEE,GAAG,EAAEJ,CAAC,CAACK;QAAK,CAAC,CAAC;MACzD;MAEA,OAAO,IAAI;IACf,CAAC,CAAC;IAEF,oBACInB,KAAA,CAAAoB,aAAA,CAACf,YAAY;MACTgB,OAAO,eAAErB,KAAA,CAAAoB,aAAA,CAACjB,cAAc,MAAE,CAAE;MAC5B,eAAa,0BAA2B;MACxCmB,SAAS,EAAE;IAAgB,GAE1BV,iBACS,CAAC;EAEvB,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const UserMenuHandle: (props: unknown) => React.JSX.Element;
@@ -0,0 +1,45 @@
1
+ import React from "react";
2
+ import { Avatar, IconButton } from "@webiny/admin-ui";
3
+ import { useSecurity } from "@webiny/app-security";
4
+ import { ReactComponent as KeyboardArrowRightIcon } from "@webiny/icons/keyboard_arrow_down.svg";
5
+ import { UserMenuHandleRenderer as UserMenuHandleRendererSpec } from "@webiny/app-admin";
6
+ export const UserMenuHandle = UserMenuHandleRendererSpec.createDecorator(() => {
7
+ return function UserMenuHandle() {
8
+ const {
9
+ identity
10
+ } = useSecurity();
11
+ if (!identity) {
12
+ return null;
13
+ }
14
+ const profile = identity.profile;
15
+ const {
16
+ firstName,
17
+ lastName,
18
+ avatar
19
+ } = profile || {};
20
+ const fullName = `${firstName} ${lastName}`;
21
+ return /*#__PURE__*/React.createElement("div", {
22
+ className: "wby-flex wby-gap-x-sm wby-cursor-pointer"
23
+ }, /*#__PURE__*/React.createElement("div", {
24
+ "data-testid": "logged-in-user-menu-avatar",
25
+ className: "wby-flex wby-items-center wby-rounded-md wby-gap-xxs wby-py-xs wby-px-xs wby-bg-neutral-light"
26
+ }, /*#__PURE__*/React.createElement(Avatar, {
27
+ size: "sm",
28
+ variant: "strong",
29
+ image: /*#__PURE__*/React.createElement(Avatar.Image, {
30
+ src: avatar?.src
31
+ }),
32
+ fallback: /*#__PURE__*/React.createElement(Avatar.Fallback, {
33
+ className: "wby-uppercase",
34
+ delayMs: 0
35
+ }, fullName[0])
36
+ }), /*#__PURE__*/React.createElement(IconButton, {
37
+ variant: "ghost",
38
+ size: "xs",
39
+ color: "neutral-strong",
40
+ icon: /*#__PURE__*/React.createElement(KeyboardArrowRightIcon, null)
41
+ })));
42
+ };
43
+ });
44
+
45
+ //# sourceMappingURL=UserMenuHandle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Avatar","IconButton","useSecurity","ReactComponent","KeyboardArrowRightIcon","UserMenuHandleRenderer","UserMenuHandleRendererSpec","UserMenuHandle","createDecorator","identity","profile","firstName","lastName","avatar","fullName","createElement","className","size","variant","image","Image","src","fallback","Fallback","delayMs","color","icon"],"sources":["UserMenuHandle.tsx"],"sourcesContent":["import React from \"react\";\nimport { Avatar, IconButton } from \"@webiny/admin-ui\";\nimport { useSecurity } from \"@webiny/app-security\";\nimport { ReactComponent as KeyboardArrowRightIcon } from \"@webiny/icons/keyboard_arrow_down.svg\";\nimport { UserMenuHandleRenderer as UserMenuHandleRendererSpec } from \"@webiny/app-admin\";\n\nexport const UserMenuHandle = UserMenuHandleRendererSpec.createDecorator(() => {\n return function UserMenuHandle() {\n const { identity } = useSecurity();\n\n if (!identity) {\n return null;\n }\n\n const profile = identity.profile;\n\n const { firstName, lastName, avatar } = profile || {};\n const fullName = `${firstName} ${lastName}`;\n\n return (\n <div className={\"wby-flex wby-gap-x-sm wby-cursor-pointer\"}>\n <div\n data-testid=\"logged-in-user-menu-avatar\"\n className={\n \"wby-flex wby-items-center wby-rounded-md wby-gap-xxs wby-py-xs wby-px-xs wby-bg-neutral-light\"\n }\n >\n <Avatar\n size={\"sm\"}\n variant={\"strong\"}\n image={<Avatar.Image src={avatar?.src} />}\n fallback={\n <Avatar.Fallback className={\"wby-uppercase\"} delayMs={0}>\n {fullName[0]}\n </Avatar.Fallback>\n }\n />\n <IconButton\n variant={\"ghost\"}\n size={\"xs\"}\n color={\"neutral-strong\"}\n icon={<KeyboardArrowRightIcon />}\n />\n </div>\n </div>\n );\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,UAAU,QAAQ,kBAAkB;AACrD,SAASC,WAAW,QAAQ,sBAAsB;AAClD,SAASC,cAAc,IAAIC,sBAAsB,QAAQ,uCAAuC;AAChG,SAASC,sBAAsB,IAAIC,0BAA0B,QAAQ,mBAAmB;AAExF,OAAO,MAAMC,cAAc,GAAGD,0BAA0B,CAACE,eAAe,CAAC,MAAM;EAC3E,OAAO,SAASD,cAAcA,CAAA,EAAG;IAC7B,MAAM;MAAEE;IAAS,CAAC,GAAGP,WAAW,CAAC,CAAC;IAElC,IAAI,CAACO,QAAQ,EAAE;MACX,OAAO,IAAI;IACf;IAEA,MAAMC,OAAO,GAAGD,QAAQ,CAACC,OAAO;IAEhC,MAAM;MAAEC,SAAS;MAAEC,QAAQ;MAAEC;IAAO,CAAC,GAAGH,OAAO,IAAI,CAAC,CAAC;IACrD,MAAMI,QAAQ,GAAG,GAAGH,SAAS,IAAIC,QAAQ,EAAE;IAE3C,oBACIb,KAAA,CAAAgB,aAAA;MAAKC,SAAS,EAAE;IAA2C,gBACvDjB,KAAA,CAAAgB,aAAA;MACI,eAAY,4BAA4B;MACxCC,SAAS,EACL;IACH,gBAEDjB,KAAA,CAAAgB,aAAA,CAACf,MAAM;MACHiB,IAAI,EAAE,IAAK;MACXC,OAAO,EAAE,QAAS;MAClBC,KAAK,eAAEpB,KAAA,CAAAgB,aAAA,CAACf,MAAM,CAACoB,KAAK;QAACC,GAAG,EAAER,MAAM,EAAEQ;MAAI,CAAE,CAAE;MAC1CC,QAAQ,eACJvB,KAAA,CAAAgB,aAAA,CAACf,MAAM,CAACuB,QAAQ;QAACP,SAAS,EAAE,eAAgB;QAACQ,OAAO,EAAE;MAAE,GACnDV,QAAQ,CAAC,CAAC,CACE;IACpB,CACJ,CAAC,eACFf,KAAA,CAAAgB,aAAA,CAACd,UAAU;MACPiB,OAAO,EAAE,OAAQ;MACjBD,IAAI,EAAE,IAAK;MACXQ,KAAK,EAAE,gBAAiB;MACxBC,IAAI,eAAE3B,KAAA,CAAAgB,aAAA,CAACX,sBAAsB,MAAE;IAAE,CACpC,CACA,CACJ,CAAC;EAEd,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare const UserMenuItem: (props: unknown) => React.JSX.Element;
3
+ export declare const UserMenuItemIcon: (props: unknown) => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { DropdownMenu } from "@webiny/admin-ui";
3
+ import { UserMenuItemRenderer, UserMenuItemIconRenderer } from "@webiny/app-admin";
4
+ export const UserMenuItem = UserMenuItemRenderer.createDecorator(() => {
5
+ return function UserMenuItemRenderer(props) {
6
+ return /*#__PURE__*/React.createElement(DropdownMenu.Item, props);
7
+ };
8
+ });
9
+ export const UserMenuItemIcon = UserMenuItemIconRenderer.createDecorator(() => {
10
+ return function UserMenuItemRenderer(props) {
11
+ return /*#__PURE__*/React.createElement(DropdownMenu.Item.Icon, props);
12
+ };
13
+ });
14
+
15
+ //# sourceMappingURL=UserMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","DropdownMenu","UserMenuItemRenderer","UserMenuItemIconRenderer","UserMenuItem","createDecorator","props","createElement","Item","UserMenuItemIcon","Icon"],"sources":["UserMenuItem.tsx"],"sourcesContent":["import React from \"react\";\nimport { DropdownMenu } from \"@webiny/admin-ui\";\nimport { UserMenuItemRenderer, UserMenuItemIconRenderer } from \"@webiny/app-admin\";\n\nexport const UserMenuItem = UserMenuItemRenderer.createDecorator(() => {\n return function UserMenuItemRenderer(props) {\n return <DropdownMenu.Item {...props} />;\n };\n});\n\nexport const UserMenuItemIcon = UserMenuItemIconRenderer.createDecorator(() => {\n return function UserMenuItemRenderer(props) {\n return <DropdownMenu.Item.Icon {...props} />;\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,oBAAoB,EAAEC,wBAAwB,QAAQ,mBAAmB;AAElF,OAAO,MAAMC,YAAY,GAAGF,oBAAoB,CAACG,eAAe,CAAC,MAAM;EACnE,OAAO,SAASH,oBAAoBA,CAACI,KAAK,EAAE;IACxC,oBAAON,KAAA,CAAAO,aAAA,CAACN,YAAY,CAACO,IAAI,EAAKF,KAAQ,CAAC;EAC3C,CAAC;AACL,CAAC,CAAC;AAEF,OAAO,MAAMG,gBAAgB,GAAGN,wBAAwB,CAACE,eAAe,CAAC,MAAM;EAC3E,OAAO,SAASH,oBAAoBA,CAACI,KAAK,EAAE;IACxC,oBAAON,KAAA,CAAAO,aAAA,CAACN,YAAY,CAACO,IAAI,CAACE,IAAI,EAAKJ,KAAQ,CAAC;EAChD,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare const UserMenuLink: (props: unknown) => React.JSX.Element;
3
+ export declare const UserMenuLinkIcon: (props: unknown) => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { DropdownMenu } from "@webiny/admin-ui";
3
+ import { UserMenuLinkRenderer, UserMenuLinkIconRenderer } from "@webiny/app-admin";
4
+ export const UserMenuLink = UserMenuLinkRenderer.createDecorator(() => {
5
+ return function UserMenuLinkRenderer(props) {
6
+ return /*#__PURE__*/React.createElement(DropdownMenu.Link, props);
7
+ };
8
+ });
9
+ export const UserMenuLinkIcon = UserMenuLinkIconRenderer.createDecorator(() => {
10
+ return function UserMenuLinkRenderer(props) {
11
+ return /*#__PURE__*/React.createElement(DropdownMenu.Link.Icon, props);
12
+ };
13
+ });
14
+
15
+ //# sourceMappingURL=UserMenuLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","DropdownMenu","UserMenuLinkRenderer","UserMenuLinkIconRenderer","UserMenuLink","createDecorator","props","createElement","Link","UserMenuLinkIcon","Icon"],"sources":["UserMenuLink.tsx"],"sourcesContent":["import React from \"react\";\nimport { DropdownMenu } from \"@webiny/admin-ui\";\nimport { UserMenuLinkRenderer, UserMenuLinkIconRenderer } from \"@webiny/app-admin\";\n\nexport const UserMenuLink = UserMenuLinkRenderer.createDecorator(() => {\n return function UserMenuLinkRenderer(props) {\n return <DropdownMenu.Link {...props} />;\n };\n});\n\nexport const UserMenuLinkIcon = UserMenuLinkIconRenderer.createDecorator(() => {\n return function UserMenuLinkRenderer(props) {\n return <DropdownMenu.Link.Icon {...props} />;\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,oBAAoB,EAAEC,wBAAwB,QAAQ,mBAAmB;AAElF,OAAO,MAAMC,YAAY,GAAGF,oBAAoB,CAACG,eAAe,CAAC,MAAM;EACnE,OAAO,SAASH,oBAAoBA,CAACI,KAAK,EAAE;IACxC,oBAAON,KAAA,CAAAO,aAAA,CAACN,YAAY,CAACO,IAAI,EAAKF,KAAQ,CAAC;EAC3C,CAAC;AACL,CAAC,CAAC;AAEF,OAAO,MAAMG,gBAAgB,GAAGN,wBAAwB,CAACE,eAAe,CAAC,MAAM;EAC3E,OAAO,SAASH,oBAAoBA,CAACI,KAAK,EAAE;IACxC,oBAAON,KAAA,CAAAO,aAAA,CAACN,YAAY,CAACO,IAAI,CAACE,IAAI,EAAKJ,KAAQ,CAAC;EAChD,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const UserMenuSeparator: (props: unknown) => React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { DropdownMenu } from "@webiny/admin-ui";
3
+ import { UserMenuSeparatorRenderer } from "@webiny/app-admin";
4
+ export const UserMenuSeparator = UserMenuSeparatorRenderer.createDecorator(() => {
5
+ return function UserMenuSeparatorRenderer(props) {
6
+ return /*#__PURE__*/React.createElement(DropdownMenu.Separator, Object.assign({
7
+ variant: "dimmed"
8
+ }, props));
9
+ };
10
+ });
11
+
12
+ //# sourceMappingURL=UserMenuSeparator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","DropdownMenu","UserMenuSeparatorRenderer","UserMenuSeparator","createDecorator","props","createElement","Separator","Object","assign","variant"],"sources":["UserMenuSeparator.tsx"],"sourcesContent":["import React from \"react\";\nimport { DropdownMenu } from \"@webiny/admin-ui\";\nimport { UserMenuSeparatorRenderer } from \"@webiny/app-admin\";\n\nexport const UserMenuSeparator = UserMenuSeparatorRenderer.createDecorator(() => {\n return function UserMenuSeparatorRenderer(props) {\n return <DropdownMenu.Separator variant={\"dimmed\"} {...props} />;\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,yBAAyB,QAAQ,mBAAmB;AAE7D,OAAO,MAAMC,iBAAiB,GAAGD,yBAAyB,CAACE,eAAe,CAAC,MAAM;EAC7E,OAAO,SAASF,yBAAyBA,CAACG,KAAK,EAAE;IAC7C,oBAAOL,KAAA,CAAAM,aAAA,CAACL,YAAY,CAACM,SAAS,EAAAC,MAAA,CAAAC,MAAA;MAACC,OAAO,EAAE;IAAS,GAAKL,KAAK,CAAG,CAAC;EACnE,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
package/UserMenu.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const UserMenu: () => React.JSX.Element;
package/UserMenu.js ADDED
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { UserMenu as BaseUserMenu } from "./UserMenu/UserMenu";
3
+ import { UserMenuHandle } from "./UserMenu/UserMenuHandle";
4
+ import { UserMenuItem, UserMenuItemIcon } from "./UserMenu/UserMenuItem";
5
+ import { UserMenuLink, UserMenuLinkIcon } from "./UserMenu/UserMenuLink";
6
+ import { UserMenuSeparator } from "./UserMenu/UserMenuSeparator";
7
+ export const UserMenu = () => {
8
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(UserMenuHandle, null), /*#__PURE__*/React.createElement(BaseUserMenu, null), /*#__PURE__*/React.createElement(UserMenuItem, null), /*#__PURE__*/React.createElement(UserMenuItemIcon, null), /*#__PURE__*/React.createElement(UserMenuLink, null), /*#__PURE__*/React.createElement(UserMenuLinkIcon, null), /*#__PURE__*/React.createElement(UserMenuSeparator, null));
9
+ };
10
+
11
+ //# sourceMappingURL=UserMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","UserMenu","BaseUserMenu","UserMenuHandle","UserMenuItem","UserMenuItemIcon","UserMenuLink","UserMenuLinkIcon","UserMenuSeparator","createElement","Fragment"],"sources":["UserMenu.tsx"],"sourcesContent":["import React from \"react\";\nimport { UserMenu as BaseUserMenu } from \"./UserMenu/UserMenu\";\nimport { UserMenuHandle } from \"./UserMenu/UserMenuHandle\";\nimport { UserMenuItem, UserMenuItemIcon } from \"./UserMenu/UserMenuItem\";\nimport { UserMenuLink, UserMenuLinkIcon } from \"./UserMenu/UserMenuLink\";\nimport { UserMenuSeparator } from \"./UserMenu/UserMenuSeparator\";\n\nexport const UserMenu = () => {\n return (\n <>\n <UserMenuHandle />\n <BaseUserMenu />\n <UserMenuItem />\n <UserMenuItemIcon />\n <UserMenuLink />\n <UserMenuLinkIcon />\n <UserMenuSeparator />\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,IAAIC,YAAY;AACjC,SAASC,cAAc;AACvB,SAASC,YAAY,EAAEC,gBAAgB;AACvC,SAASC,YAAY,EAAEC,gBAAgB;AACvC,SAASC,iBAAiB;AAE1B,OAAO,MAAMP,QAAQ,GAAGA,CAAA,KAAM;EAC1B,oBACID,KAAA,CAAAS,aAAA,CAAAT,KAAA,CAAAU,QAAA,qBACIV,KAAA,CAAAS,aAAA,CAACN,cAAc,MAAE,CAAC,eAClBH,KAAA,CAAAS,aAAA,CAACP,YAAY,MAAE,CAAC,eAChBF,KAAA,CAAAS,aAAA,CAACL,YAAY,MAAE,CAAC,eAChBJ,KAAA,CAAAS,aAAA,CAACJ,gBAAgB,MAAE,CAAC,eACpBL,KAAA,CAAAS,aAAA,CAACH,YAAY,MAAE,CAAC,eAChBN,KAAA,CAAAS,aAAA,CAACF,gBAAgB,MAAE,CAAC,eACpBP,KAAA,CAAAS,aAAA,CAACD,iBAAiB,MAAE,CACtB,CAAC;AAEX,CAAC","ignoreList":[]}
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const AdminUI: () => React.JSX.Element;
package/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { Layout } from "./Layout";
3
+ import { Navigation } from "./Navigation";
4
+ import { UserMenu } from "./UserMenu";
5
+ import { Dialog } from "./Dialog";
6
+ import { NotFound } from "./NotFound";
7
+ import { Dashboard } from "./Dashboard";
8
+ import { Logo } from "./Logo";
9
+ export const AdminUI = () => {
10
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dashboard, null), /*#__PURE__*/React.createElement(Dialog, null), /*#__PURE__*/React.createElement(Layout, null), /*#__PURE__*/React.createElement(Navigation, null), /*#__PURE__*/React.createElement(NotFound, null), /*#__PURE__*/React.createElement(UserMenu, null), /*#__PURE__*/React.createElement(Logo, null));
11
+ };
12
+
13
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Layout","Navigation","UserMenu","Dialog","NotFound","Dashboard","Logo","AdminUI","createElement","Fragment"],"sources":["index.tsx"],"sourcesContent":["import React from \"react\";\nimport { Layout } from \"./Layout\";\nimport { Navigation } from \"./Navigation\";\nimport { UserMenu } from \"~/UserMenu\";\nimport { Dialog } from \"./Dialog\";\nimport { NotFound } from \"./NotFound\";\nimport { Dashboard } from \"./Dashboard\";\nimport { Logo } from \"./Logo\";\n\nexport const AdminUI = () => {\n return (\n <>\n <Dashboard />\n <Dialog />\n <Layout />\n <Navigation />\n <NotFound />\n <UserMenu />\n <Logo />\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM;AACf,SAASC,UAAU;AACnB,SAASC,QAAQ;AACjB,SAASC,MAAM;AACf,SAASC,QAAQ;AACjB,SAASC,SAAS;AAClB,SAASC,IAAI;AAEb,OAAO,MAAMC,OAAO,GAAGA,CAAA,KAAM;EACzB,oBACIR,KAAA,CAAAS,aAAA,CAAAT,KAAA,CAAAU,QAAA,qBACIV,KAAA,CAAAS,aAAA,CAACH,SAAS,MAAE,CAAC,eACbN,KAAA,CAAAS,aAAA,CAACL,MAAM,MAAE,CAAC,eACVJ,KAAA,CAAAS,aAAA,CAACR,MAAM,MAAE,CAAC,eACVD,KAAA,CAAAS,aAAA,CAACP,UAAU,MAAE,CAAC,eACdF,KAAA,CAAAS,aAAA,CAACJ,QAAQ,MAAE,CAAC,eACZL,KAAA,CAAAS,aAAA,CAACN,QAAQ,MAAE,CAAC,eACZH,KAAA,CAAAS,aAAA,CAACF,IAAI,MAAE,CACT,CAAC;AAEX,CAAC","ignoreList":[]}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@webiny/app-admin-ui",
3
+ "version": "6.0.0-alpha.0",
4
+ "main": "index.js",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/webiny/webiny-js.git"
8
+ },
9
+ "author": "Webiny Ltd.",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "@types/react": "18.2.79",
13
+ "@webiny/admin-ui": "6.0.0-alpha.0",
14
+ "@webiny/app": "6.0.0-alpha.0",
15
+ "@webiny/app-admin": "6.0.0-alpha.0",
16
+ "@webiny/app-plugin-admin-welcome-screen": "6.0.0-alpha.0",
17
+ "@webiny/app-security": "6.0.0-alpha.0",
18
+ "@webiny/icons": "6.0.0-alpha.0",
19
+ "@webiny/plugins": "6.0.0-alpha.0",
20
+ "@webiny/react-router": "6.0.0-alpha.0",
21
+ "react": "18.2.0",
22
+ "react-dom": "18.2.0",
23
+ "react-helmet": "6.1.0"
24
+ },
25
+ "devDependencies": {
26
+ "@emotion/babel-plugin": "11.11.0",
27
+ "@types/react-helmet": "6.1.11",
28
+ "@webiny/project-utils": "6.0.0-alpha.0",
29
+ "babel-plugin-named-asset-import": "1.0.0-next.fb6e6f70",
30
+ "rimraf": "6.0.1",
31
+ "typescript": "5.3.3"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public",
35
+ "directory": "dist"
36
+ },
37
+ "scripts": {
38
+ "build": "node ../cli/bin.js run build",
39
+ "watch": "node ../cli/bin.js run watch"
40
+ },
41
+ "svgo": {
42
+ "plugins": {
43
+ "removeViewBox": false
44
+ }
45
+ },
46
+ "gitHead": "a5b28fed7a242d8f56712197a8ea83aa6d2ed101"
47
+ }
package/styles.scss ADDED
@@ -0,0 +1,2 @@
1
+ // The default theme. Learn more: https://webiny.link/admin-themes.
2
+ @import "~@webiny/admin-ui/theme.scss";