@webiny/app-admin-rmwc 5.37.5 → 5.37.6-beta.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/index.js CHANGED
@@ -28,6 +28,4 @@ var RMWCProviderPlugin = (0, _appAdmin.createProviderPlugin)(function (Component
28
28
  var RMWC = function RMWC() {
29
29
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(RMWCProviderPlugin, null), /*#__PURE__*/_react.default.createElement(_Layout.Layout, null), /*#__PURE__*/_react.default.createElement(_Dashboard.Dashboard, null), /*#__PURE__*/_react.default.createElement(_NotFound.NotFound, null), /*#__PURE__*/_react.default.createElement(_Brand.Brand, null), /*#__PURE__*/_react.default.createElement(_Navigation.Navigation, null), /*#__PURE__*/_react.default.createElement(_UserMenu.UserMenu, null), /*#__PURE__*/_react.default.createElement(_Overlays.Overlays, null));
30
30
  };
31
- exports.RMWC = RMWC;
32
-
33
- //# sourceMappingURL=index.js.map
31
+ exports.RMWC = RMWC;
@@ -54,6 +54,4 @@ var Brand = function Brand() {
54
54
  logo: /*#__PURE__*/_react.default.createElement(WebinyLogo, null)
55
55
  }));
56
56
  };
57
- exports.Brand = Brand;
58
-
59
- //# sourceMappingURL=index.js.map
57
+ exports.Brand = Brand;
@@ -245,6 +245,4 @@ var Welcome = function Welcome() {
245
245
  }), /*#__PURE__*/_react.default.createElement("p", null, "Twitter"))))));
246
246
  };
247
247
  var _default = Welcome;
248
- exports.default = _default;
249
-
250
- //# sourceMappingURL=Welcome.js.map
248
+ exports.default = _default;
@@ -22,6 +22,4 @@ var Dashboard = function Dashboard() {
22
22
  with: DashboardRendererHOC
23
23
  });
24
24
  };
25
- exports.Dashboard = Dashboard;
26
-
27
- //# sourceMappingURL=index.js.map
25
+ exports.Dashboard = Dashboard;
package/modules/Layout.js CHANGED
@@ -53,6 +53,4 @@ var Layout = function Layout() {
53
53
  with: RMWCLayout
54
54
  });
55
55
  };
56
- exports.Layout = Layout;
57
-
58
- //# sourceMappingURL=Layout.js.map
56
+ exports.Layout = Layout;
@@ -32,6 +32,4 @@ var Hamburger = function Hamburger() {
32
32
  });
33
33
  };
34
34
  var _default = Hamburger;
35
- exports.default = _default;
36
-
37
- //# sourceMappingURL=Hamburger.js.map
35
+ exports.default = _default;
@@ -57,6 +57,4 @@ var subFooter = /*#__PURE__*/(0, _emotion.css)({
57
57
  margin: 0
58
58
  }
59
59
  }, "label:subFooter;");
60
- exports.subFooter = subFooter;
61
-
62
- //# sourceMappingURL=Styled.js.map
60
+ exports.subFooter = subFooter;
@@ -140,6 +140,4 @@ var Navigation = function Navigation() {
140
140
  with: [_MenuGroupRenderer.MenuGroupRenderer, _MenuSectionItemRenderer.MenuSectionItemRenderer, _MenuSectionRenderer.MenuSectionRenderer, _MenuLinkRenderer.MenuLinkRenderer, _MenuElementRenderer.MenuElementRenderer]
141
141
  }));
142
142
  };
143
- exports.Navigation = Navigation;
144
-
145
- //# sourceMappingURL=index.js.map
143
+ exports.Navigation = Navigation;
@@ -17,6 +17,4 @@ var MenuElementRenderer = function MenuElementRenderer(PrevMenuItem) {
17
17
  return menuItem.element;
18
18
  };
19
19
  };
20
- exports.MenuElementRenderer = MenuElementRenderer;
21
-
22
- //# sourceMappingURL=MenuElementRenderer.js.map
20
+ exports.MenuElementRenderer = MenuElementRenderer;
@@ -136,6 +136,4 @@ var MenuGroupRenderer = function MenuGroupRenderer(PrevMenuItem) {
136
136
  }) : null);
137
137
  };
138
138
  };
139
- exports.MenuGroupRenderer = MenuGroupRenderer;
140
-
141
- //# sourceMappingURL=MenuGroupRenderer.js.map
139
+ exports.MenuGroupRenderer = MenuGroupRenderer;
@@ -50,6 +50,4 @@ var MenuLinkRenderer = function MenuLinkRenderer(PrevMenuItem) {
50
50
  return menuItem.path ? withLink(item) : item;
51
51
  };
52
52
  };
53
- exports.MenuLinkRenderer = MenuLinkRenderer;
54
-
55
- //# sourceMappingURL=MenuLinkRenderer.js.map
53
+ exports.MenuLinkRenderer = MenuLinkRenderer;
@@ -75,6 +75,4 @@ var MenuSectionItemRenderer = function MenuSectionItemRenderer(PrevMenuItem) {
75
75
  }, menuItem.label)));
76
76
  };
77
77
  };
78
- exports.MenuSectionItemRenderer = MenuSectionItemRenderer;
79
-
80
- //# sourceMappingURL=MenuSectionItemRenderer.js.map
78
+ exports.MenuSectionItemRenderer = MenuSectionItemRenderer;
@@ -46,6 +46,4 @@ var MenuSectionRenderer = function MenuSectionRenderer(PrevMenuItem) {
46
46
  }));
47
47
  };
48
48
  };
49
- exports.MenuSectionRenderer = MenuSectionRenderer;
50
-
51
- //# sourceMappingURL=MenuSectionRenderer.js.map
49
+ exports.MenuSectionRenderer = MenuSectionRenderer;
@@ -62,6 +62,4 @@ var NotFound = function NotFound() {
62
62
  with: NotFoundHOC
63
63
  });
64
64
  };
65
- exports.NotFound = NotFound;
66
-
67
- //# sourceMappingURL=index.js.map
65
+ exports.NotFound = NotFound;
@@ -93,6 +93,4 @@ var DialogContainer = function DialogContainer() {
93
93
  onClick: handleConfirm
94
94
  }, actions.accept.label)));
95
95
  };
96
- exports.DialogContainer = DialogContainer;
97
-
98
- //# sourceMappingURL=Dialog.js.map
96
+ exports.DialogContainer = DialogContainer;
@@ -10,6 +10,4 @@ var Dialog = /*#__PURE__*/(0, _styled.default)("div", {
10
10
  label: "Dialog",
11
11
  target: "eruevcs0"
12
12
  })("background-color:rgba(0,0,0,0.32);height:100%;width:100%;position:fixed;z-index:2312321;top:0;.dialog{position:fixed;top:350px;left:50%;transform:translate(-50%,-50%);background-color:white;width:700px;height:500px;z-index:auto;box-shadow:0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12);> ul{overflow-y:scroll;height:444px;margin-bottom:10px;> li{.section-title{bottom-bottom:1px solid var(--mdc-theme-on-background);padding:10px 15px 5px 15px;}ul{li{padding:10px 15px;cursor:pointer;&.focused{background-color:var(--mdc-theme-background);}.section-item-title{margin-bottom:3px;color:var(--mdc-theme-primary);}.section-item-description{color:var(--mdc-theme-text-primary-on-background);}}}}}}");
13
- exports.Dialog = Dialog;
14
-
15
- //# sourceMappingURL=Dialog.js.map
13
+ exports.Dialog = Dialog;
@@ -245,6 +245,4 @@ var OmniSearch = function OmniSearch() {
245
245
  onChange: onFilter
246
246
  })), renderedResults));
247
247
  };
248
- exports.OmniSearch = OmniSearch;
249
-
250
- //# sourceMappingURL=OmniSearch.js.map
248
+ exports.OmniSearch = OmniSearch;
@@ -29,6 +29,4 @@ var SnackbarMain = function SnackbarMain() {
29
29
  }, options));
30
30
  };
31
31
  var _default = SnackbarMain;
32
- exports.default = _default;
33
-
34
- //# sourceMappingURL=Snackbar.js.map
32
+ exports.default = _default;
@@ -37,6 +37,4 @@ var Overlays = function Overlays() {
37
37
  hoc: OverlaysHOC
38
38
  });
39
39
  };
40
- exports.Overlays = Overlays;
41
-
42
- //# sourceMappingURL=index.js.map
40
+ exports.Overlays = Overlays;
@@ -21,6 +21,4 @@ var Search = function Search() {
21
21
  with: SearchRenderer
22
22
  });
23
23
  };
24
- exports.Search = Search;
25
-
26
- //# sourceMappingURL=index.js.map
24
+ exports.Search = Search;
@@ -43,11 +43,26 @@ var UserMenuHandleRendererImpl = function UserMenuHandleRendererImpl() {
43
43
  if (!identity) {
44
44
  return null;
45
45
  }
46
- var _ref = identity.profile || {},
47
- firstName = _ref.firstName,
48
- lastName = _ref.lastName,
49
- avatar = _ref.avatar,
50
- gravatar = _ref.gravatar;
46
+ var profile = identity.profile;
47
+ if (!profile) {
48
+ return /*#__PURE__*/_react.default.createElement(_Avatar.Avatar, {
49
+ "data-testid": "logged-in-user-menu-avatar",
50
+ src: undefined,
51
+ alt: identity.displayName,
52
+ fallbackText: identity.displayName,
53
+ renderImage: function renderImage(props) {
54
+ return /*#__PURE__*/_react.default.createElement(_components.Image, Object.assign({}, props, {
55
+ transform: {
56
+ width: 100
57
+ }
58
+ }));
59
+ }
60
+ });
61
+ }
62
+ var firstName = profile.firstName,
63
+ lastName = profile.lastName,
64
+ avatar = profile.avatar,
65
+ gravatar = profile.gravatar;
51
66
  var fullName = "".concat(firstName, " ").concat(lastName);
52
67
  return /*#__PURE__*/_react.default.createElement(_Avatar.Avatar, {
53
68
  "data-testid": "logged-in-user-menu-avatar",
@@ -107,6 +122,4 @@ var UserMenu = function UserMenu() {
107
122
  with: UserMenuItemRendererImpl
108
123
  }));
109
124
  };
110
- exports.UserMenu = UserMenu;
111
-
112
- //# sourceMappingURL=index.js.map
125
+ exports.UserMenu = UserMenu;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_emotion","_appAdmin","_Menu","_List","_Icon","_reactRouter","_appSecurity","_Avatar","_components","_TopAppBar","UserMenuRendererImpl","UserMenu","security","useSecurity","_useUserMenu","useUserMenu","menuItems","identity","default","createElement","Menu","anchor","handle","TopAppBarActionItem","icon","UserMenuHandle","List","UserMenuItems","UserMenuHandleRendererImpl","_useSecurity","_ref","profile","firstName","lastName","avatar","gravatar","fullName","concat","Avatar","src","alt","fallbackText","renderImage","props","Image","Object","assign","transform","width","linkStyles","css","textDecoration","UserMenuItemRendererImpl","UserMenuItemRenderer","_useUserMenuItem","useUserMenuItem","label","path","onClick","element","Link","to","className","ListItem","ListItemGraphic","Icon","Fragment","Compose","component","UserMenuHandleRendererSpec","with","UserMenuRendererSpec","UserMenuItemRendererSpec","exports"],"sources":["index.tsx"],"sourcesContent":["import React, { Fragment } from \"react\";\nimport { css } from \"emotion\";\nimport {\n Compose,\n UserMenuHandle,\n UserMenuHandleRenderer as UserMenuHandleRendererSpec,\n UserMenuRenderer as UserMenuRendererSpec,\n UserMenuItems,\n UserMenuItemRenderer as UserMenuItemRendererSpec,\n useUserMenuItem,\n useUserMenu\n} from \"@webiny/app-admin\";\nimport { Menu } from \"@webiny/ui/Menu\";\nimport { List, ListItem, ListItemGraphic } from \"@webiny/ui/List\";\nimport { Icon } from \"@webiny/ui/Icon\";\nimport { Link } from \"@webiny/react-router\";\nimport { useSecurity } from \"@webiny/app-security\";\nimport { Avatar } from \"@webiny/ui/Avatar\";\nimport { Image } from \"@webiny/app/components\";\nimport { TopAppBarActionItem } from \"@webiny/ui/TopAppBar\";\n\nconst UserMenuRendererImpl = (): React.FC => {\n return function UserMenu() {\n const security = useSecurity();\n const { menuItems } = useUserMenu();\n\n if (!security || !security.identity) {\n return null;\n }\n\n return (\n <Menu anchor={\"topEnd\"} handle={<TopAppBarActionItem icon={<UserMenuHandle />} />}>\n <List data-testid=\"logged-in-user-menu-list\">\n <UserMenuItems menuItems={menuItems} />\n </List>\n </Menu>\n );\n };\n};\n\nconst UserMenuHandleRendererImpl = (): React.FC => {\n return function UserMenuHandle() {\n const { identity } = useSecurity();\n\n if (!identity) {\n return null;\n }\n\n const { firstName, lastName, avatar, gravatar } = identity.profile || {};\n const fullName = `${firstName} ${lastName}`;\n\n return (\n <Avatar\n data-testid=\"logged-in-user-menu-avatar\"\n src={avatar ? avatar.src : gravatar}\n alt={fullName}\n fallbackText={fullName}\n renderImage={props => <Image {...props} transform={{ width: 100 }} />}\n />\n );\n };\n};\n\nconst linkStyles = css({\n \"&:hover\": {\n textDecoration: \"none\"\n }\n});\n\nconst UserMenuItemRendererImpl = (): React.FC => {\n return function UserMenuItemRenderer() {\n const { label, path, icon, onClick, element } = useUserMenuItem();\n\n if (element) {\n return element;\n }\n\n if (path) {\n return (\n <Link to={path} className={linkStyles}>\n <ListItem>\n <ListItemGraphic>{icon ? <Icon icon={icon} /> : null}</ListItemGraphic>\n {label}\n </ListItem>\n </Link>\n );\n }\n\n return (\n <ListItem onClick={onClick}>\n <ListItemGraphic>{icon ? <Icon icon={icon} /> : null}</ListItemGraphic>\n {label}\n </ListItem>\n );\n };\n};\n\nexport const UserMenu: React.FC = () => {\n return (\n <Fragment>\n <Compose component={UserMenuHandleRendererSpec} with={UserMenuHandleRendererImpl} />\n <Compose component={UserMenuRendererSpec} with={User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AEM,IAAM7C,QAAkB,GAAG,SAArBA,QAAkBA,CAAA,EAAS;EACpC,oBACId,MAAA,CAAAqB,OAAA,CAAAC,aAAA,CAACtB,MAAA,CAAAqE,QAAQ,qBACLrE,MAAA,CAAAqB,OAAA,CAAAC,aAAA,CAAClB,SAAA,CAAAkE,OAAO;IAACC,SAAS,EAAEC,gCAA2B;IAACC,IAAI,EAAE1C;EAA2B,CAAE,CAAC,eACpF/B,MAAA,CAAAqB,OAAA,CAAAC,aAAA,CAAClB,SAAA,CAAAkE,OAAO;IAACC,SAAS,EAAEG,0BAAqB;IAACD,IAAI,EAAE5D;EAAqB,CAAE,CAAC,eACxEb,MAAA,CAAAqB,OAAA,CAAAC,aAAA,CAAClB,SAAA,CAAAkE,OAAO;IAACC,SAAS,EAAEI,8BAAyB;IAACF,IAAI,EAAElB;EAAyB,CAAE,CACzE,CAAC;AAEnB,CAAC;AAACqB,OAAA,CAAA9D,QAAA,GAAAA,QAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_emotion","_appAdmin","_Menu","_List","_Icon","_reactRouter","_appSecurity","_Avatar","_components","_TopAppBar","UserMenuRendererImpl","UserMenu","security","useSecurity","_useUserMenu","useUserMenu","menuItems","identity","default","createElement","Menu","anchor","handle","TopAppBarActionItem","icon","UserMenuHandle","List","UserMenuItems","UserMenuHandleRendererImpl","_useSecurity","profile","Avatar","src","undefined","alt","displayName","fallbackText","renderImage","props","Image","Object","assign","transform","width","firstName","lastName","avatar","gravatar","fullName","concat","linkStyles","css","textDecoration","UserMenuItemRendererImpl","UserMenuItemRenderer","_useUserMenuItem","useUserMenuItem","label","path","onClick","element","Link","to","className","ListItem","ListItemGraphic","Icon","Fragment","Compose","component","UserMenuHandleRendererSpec","with","UserMenuRendererSpec","UserMenuItemRendererSpec","exports"],"sources":["index.tsx"],"sourcesContent":["import React, { Fragment } from \"react\";\nimport { css } from \"emotion\";\nimport {\n Compose,\n UserMenuHandle,\n UserMenuHandleRenderer as UserMenuHandleRendererSpec,\n UserMenuRenderer as UserMenuRendererSpec,\n UserMenuItems,\n UserMenuItemRenderer as UserMenuItemRendererSpec,\n useUserMenuItem,\n useUserMenu\n} from \"@webiny/app-admin\";\nimport { Menu } from \"@webiny/ui/Menu\";\nimport { List, ListItem, ListItemGraphic } from \"@webiny/ui/List\";\nimport { Icon } from \"@webiny/ui/Icon\";\nimport { Link } from \"@webiny/react-router\";\nimport { useSecurity } from \"@webiny/app-security\";\nimport { Avatar } from \"@webiny/ui/Avatar\";\nimport { Image } from \"@webiny/app/components\";\nimport { TopAppBarActionItem } from \"@webiny/ui/TopAppBar\";\n\nconst UserMenuRendererImpl = (): React.FC => {\n return function UserMenu() {\n const security = useSecurity();\n const { menuItems } = useUserMenu();\n\n if (!security || !security.identity) {\n return null;\n }\n\n return (\n <Menu anchor={\"topEnd\"} handle={<TopAppBarActionItem icon={<UserMenuHandle />} />}>\n <List data-testid=\"logged-in-user-menu-list\">\n <UserMenuItems menuItems={menuItems} />\n </List>\n </Menu>\n );\n };\n};\n\nconst UserMenuHandleRendererImpl = (): React.FC => {\n return function UserMenuHandle() {\n const { identity } = useSecurity();\n\n if (!identity) {\n return null;\n }\n\n const profile = identity.profile;\n\n if (!profile) {\n return (\n <Avatar\n data-testid=\"logged-in-user-menu-avatar\"\n src={undefined}\n alt={identity.displayName}\n fallbackText={identity.displayName}\n renderImage={props => <Image {...props} transform={{ width: 100 }} />}\n />\n );\n }\n\n const { firstName, lastName, avatar, gravatar } = profile;\n const fullName = `${firstName} ${lastName}`;\n\n return (\n <Avatar\n data-testid=\"logged-in-user-menu-avatar\"\n src={avatar ? avatar.src : gravatar}\n alt={fullName}\n fallbackText={fullName}\n renderImage={props => <Image {...props} transform={{ width: 100 }} />}\n />\n );\n };\n};\n\nconst linkStyles = css({\n \"&:hover\": {\n textDecoration: \"none\"\n }\n});\n\nconst UserMenuItemRendererImpl = (): React.FC => {\n return function UserMenuItemRenderer() {\n const { label, path, icon, onClick, element } = useUserMenuItem();\n\n if (element) {\n return element;\n }\n\n if (path) {\n return (\n <Link to={path} className={linkStyles}>\n <ListItem>\n <ListItemGraphic>{icon ? <Icon icon={icon} /> : null}</ListItemGraphic>\n {label}\n </ListItem>\n </Link>\n );\n }\n\n return (\n <ListItem onClick={onClick}>\n <ListItemGraphic>{icon ? <Icon icon={icon} /> : null}</ListItemGraphic>\n {label}\n </ListItem>\n );\n };\n};\n\nexport const UserMenu: React.FC = () => {\n return (\n <Fragment>\n <Compose component={UserMenuHandleRendererSpec} with={UserMenuHandleRendererImpl} />\n <Compose component={UserMenuRendererSpec} with={UserMenuRendererImpl} />\n <Compose component={UserMenuItemRendererSpec} with={UserMenuItemRendererImpl} />\n </Fragment>\n );\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAUA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AAEA,IAAMW,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAA,EAAmB;EACzC,OAAO,SAASC,QAAQA,CAAA,EAAG;IACvB,IAAMC,QAAQ,GAAG,IAAAC,wBAAW,EAAC,CAAC;IAC9B,IAAAC,YAAA,GAAsB,IAAAC,qBAAW,EAAC,CAAC;MAA3BC,SAAS,GAAAF,YAAA,CAATE,SAAS;IAEjB,IAAI,CAACJ,QAAQ,IAAI,CAACA,QAAQ,CAACK,QAAQ,EAAE;MACjC,OAAO,IAAI;IACf;IAEA,oBACIpB,MAAA,CAAAqB,OAAA,CAAAC,aAAA,CAACjB,KAAA,CAAAkB,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AAE7D;EAAqB,CAAE,CAAC,eACxEb,MAAA,CAAAqB,OAAA,CAAAC,aAAA,CAAClB,SAAA,CAAAmE,OAAO;IAACC,SAAS,EAAEI,8BAAyB;IAACF,IAAI,EAAElB;EAAyB,CAAE,CACzE,CAAC;AAEnB,CAAC;AAACqB,OAAA,CAAA/D,QAAA,GAAAA,QAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-admin-rmwc",
3
- "version": "5.37.5",
3
+ "version": "5.37.6-beta.0",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,14 +15,14 @@
15
15
  "@rmwc/base": "7.0.3",
16
16
  "@rmwc/provider": "7.0.3",
17
17
  "@types/react": "17.0.39",
18
- "@webiny/app": "5.37.5",
19
- "@webiny/app-admin": "5.37.5",
20
- "@webiny/app-plugin-admin-welcome-screen": "5.37.5",
21
- "@webiny/app-security": "5.37.5",
22
- "@webiny/feature-flags": "5.37.5",
23
- "@webiny/plugins": "5.37.5",
24
- "@webiny/react-router": "5.37.5",
25
- "@webiny/ui": "5.37.5",
18
+ "@webiny/app": "5.37.6-beta.0",
19
+ "@webiny/app-admin": "5.37.6-beta.0",
20
+ "@webiny/app-plugin-admin-welcome-screen": "5.37.6-beta.0",
21
+ "@webiny/app-security": "5.37.6-beta.0",
22
+ "@webiny/feature-flags": "5.37.6-beta.0",
23
+ "@webiny/plugins": "5.37.6-beta.0",
24
+ "@webiny/react-router": "5.37.6-beta.0",
25
+ "@webiny/ui": "5.37.6-beta.0",
26
26
  "classnames": "2.3.2",
27
27
  "emotion": "10.0.27",
28
28
  "lodash": "4.17.21",
@@ -40,8 +40,8 @@
40
40
  "@babel/preset-react": "7.22.5",
41
41
  "@babel/preset-typescript": "7.22.5",
42
42
  "@types/react-helmet": "6.1.6",
43
- "@webiny/cli": "5.37.5",
44
- "@webiny/project-utils": "5.37.5",
43
+ "@webiny/cli": "5.37.6-beta.0",
44
+ "@webiny/project-utils": "5.37.6-beta.0",
45
45
  "babel-plugin-emotion": "9.2.11",
46
46
  "babel-plugin-named-asset-import": "1.0.0-next.fb6e6f70",
47
47
  "rimraf": "3.0.2",
@@ -61,5 +61,5 @@
61
61
  "removeViewBox": false
62
62
  }
63
63
  },
64
- "gitHead": "88829ab0c5d875491d6b260f184b7b7fe3a6d449"
64
+ "gitHead": "5aec35310842da122e7c78bb47ab4fd4c353d106"
65
65
  }