@webiny/app 5.25.0-beta.1 → 5.25.0-beta.2

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.
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const Routes: () => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import React from "react";
3
3
  import { plugins } from "@webiny/plugins";
4
- import { Switch } from "@webiny/react-router";
4
+ import { Routes as ReactRouterRoutes } from "@webiny/react-router";
5
5
  export var Routes = function Routes() {
6
6
  // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.
7
7
  var routes = _toConsumableArray(plugins.byType("route")).sort(function (a, b) {
@@ -25,7 +25,7 @@ export var Routes = function Routes() {
25
25
  return 0;
26
26
  });
27
27
 
28
- return /*#__PURE__*/React.createElement(Switch, null, routes.map(function (_ref) {
28
+ return /*#__PURE__*/React.createElement(ReactRouterRoutes, null, routes.map(function (_ref) {
29
29
  var route = _ref.route,
30
30
  name = _ref.name;
31
31
  return /*#__PURE__*/React.cloneElement(route, {
@@ -1 +1 @@
1
- {"version":3,"sources":["Routes.tsx"],"names":["React","plugins","Switch","Routes","routes","byType","sort","a","b","pathA","route","props","path","pathB","includes","map","name","cloneElement","key"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,QAAwB,iBAAxB;AACA,SAASC,MAAT,QAAuB,sBAAvB;AAGA,OAAO,IAAMC,MAAM,GAAG,SAATA,MAAS,GAAM;AACxB;AACA,MAAMC,MAAM,GAAG,mBAAIH,OAAO,CAACI,MAAR,CAA4B,OAA5B,CAAJ,EAA0CC,IAA1C,CAA+C,UAACC,CAAD,EAAIC,CAAJ,EAAU;AACpE,QAAMC,KAAK,GAAGF,CAAC,CAACG,KAAF,CAAQC,KAAR,CAAcC,IAAd,IAAsB,GAApC;AACA,QAAMC,KAAK,GAAGL,CAAC,CAACE,KAAF,CAAQC,KAAR,CAAcC,IAAd,IAAsB,GAApC,CAFoE,CAIpE;;AACA,QAAIH,KAAK,KAAK,GAAV,IAAiBI,KAAK,KAAK,GAA/B,EAAoC;AAChC,aAAO,CAAC,CAAR;AACH,KAPmE,CASpE;;;AACA,QAAIJ,KAAK,KAAK,GAAV,IAAiBA,KAAK,KAAK,GAA/B,EAAoC;AAChC,aAAO,CAAP;AACH,KAZmE,CAcpE;;;AACA,QAAI,CAAC,GAAD,EAAM,GAAN,EAAWK,QAAX,CAAoBD,KAApB,CAAJ,EAAgC;AAC5B,aAAO,CAAC,CAAR;AACH;;AAED,WAAO,CAAP;AACH,GApBc,CAAf;;AAsBA,sBACI,oBAAC,MAAD,QAAST,MAAM,CAACW,GAAP,CAAW;AAAA,QAAGL,KAAH,QAAGA,KAAH;AAAA,QAAUM,IAAV,QAAUA,IAAV;AAAA,wBAAqBhB,KAAK,CAACiB,YAAN,CAAmBP,KAAnB,EAA0B;AAAEQ,MAAAA,GAAG,EAAEF;AAAP,KAA1B,CAArB;AAAA,GAAX,CAAT,CADJ;AAGH,CA3BM","sourcesContent":["import React from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Switch } from \"@webiny/react-router\";\nimport { RoutePlugin } from \"../types\";\n\nexport const Routes = () => {\n // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.\n const routes = [...plugins.byType<RoutePlugin>(\"route\")].sort((a, b) => {\n const pathA = a.route.props.path || \"*\";\n const pathB = b.route.props.path || \"*\";\n\n // This will sort paths at the very bottom of the list\n if (pathA === \"/\" && pathB === \"*\") {\n return -1;\n }\n\n // This will push * and / to the bottom of the list\n if (pathA === \"*\" || pathA === \"/\") {\n return 1;\n }\n\n // This will push * and / to the bottom of the list\n if ([\"*\", \"/\"].includes(pathB)) {\n return -1;\n }\n\n return 0;\n });\n\n return (\n <Switch>{routes.map(({ route, name }) => React.cloneElement(route, { key: name }))}</Switch>\n );\n};\n"]}
1
+ {"version":3,"sources":["Routes.tsx"],"names":["React","plugins","Routes","ReactRouterRoutes","routes","byType","sort","a","b","pathA","route","props","path","pathB","includes","map","name","cloneElement","key"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,QAAwB,iBAAxB;AACA,SAASC,MAAM,IAAIC,iBAAnB,QAA4C,sBAA5C;AAGA,OAAO,IAAMD,MAAM,GAAG,SAATA,MAAS,GAAM;AACxB;AACA,MAAME,MAAM,GAAG,mBAAIH,OAAO,CAACI,MAAR,CAA4B,OAA5B,CAAJ,EAA0CC,IAA1C,CAA+C,UAACC,CAAD,EAAIC,CAAJ,EAAU;AACpE,QAAMC,KAAK,GAAGF,CAAC,CAACG,KAAF,CAAQC,KAAR,CAAcC,IAAd,IAAsB,GAApC;AACA,QAAMC,KAAK,GAAGL,CAAC,CAACE,KAAF,CAAQC,KAAR,CAAcC,IAAd,IAAsB,GAApC,CAFoE,CAIpE;;AACA,QAAIH,KAAK,KAAK,GAAV,IAAiBI,KAAK,KAAK,GAA/B,EAAoC;AAChC,aAAO,CAAC,CAAR;AACH,KAPmE,CASpE;;;AACA,QAAIJ,KAAK,KAAK,GAAV,IAAiBA,KAAK,KAAK,GAA/B,EAAoC;AAChC,aAAO,CAAP;AACH,KAZmE,CAcpE;;;AACA,QAAI,CAAC,GAAD,EAAM,GAAN,EAAWK,QAAX,CAAoBD,KAApB,CAAJ,EAAgC;AAC5B,aAAO,CAAC,CAAR;AACH;;AAED,WAAO,CAAP;AACH,GApBc,CAAf;;AAsBA,sBACI,oBAAC,iBAAD,QACKT,MAAM,CAACW,GAAP,CAAW;AAAA,QAAGL,KAAH,QAAGA,KAAH;AAAA,QAAUM,IAAV,QAAUA,IAAV;AAAA,wBAAqBhB,KAAK,CAACiB,YAAN,CAAmBP,KAAnB,EAA0B;AAAEQ,MAAAA,GAAG,EAAEF;AAAP,KAA1B,CAArB;AAAA,GAAX,CADL,CADJ;AAKH,CA7BM","sourcesContent":["import React from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Routes as ReactRouterRoutes } from \"@webiny/react-router\";\nimport { RoutePlugin } from \"../types\";\n\nexport const Routes = () => {\n // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.\n const routes = [...plugins.byType<RoutePlugin>(\"route\")].sort((a, b) => {\n const pathA = a.route.props.path || \"*\";\n const pathB = b.route.props.path || \"*\";\n\n // This will sort paths at the very bottom of the list\n if (pathA === \"/\" && pathB === \"*\") {\n return -1;\n }\n\n // This will push * and / to the bottom of the list\n if (pathA === \"*\" || pathA === \"/\") {\n return 1;\n }\n\n // This will push * and / to the bottom of the list\n if ([\"*\", \"/\"].includes(pathB)) {\n return -1;\n }\n\n return 0;\n });\n\n return (\n <ReactRouterRoutes>\n {routes.map(({ route, name }) => React.cloneElement(route, { key: name }))}\n </ReactRouterRoutes>\n );\n};\n"]}
@@ -1,3 +1,4 @@
1
+ /// <reference types="web" />
1
2
  interface Params {
2
3
  after?: string;
3
4
  before?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app",
3
- "version": "5.25.0-beta.1",
3
+ "version": "5.25.0-beta.2",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,20 +15,21 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@apollo/react-hooks": "3.1.5",
18
- "@babel/runtime": "7.17.2",
18
+ "@babel/runtime": "7.17.7",
19
19
  "@emotion/styled": "10.3.0",
20
20
  "@types/react": "16.14.2",
21
- "@webiny/i18n": "5.25.0-beta.1",
22
- "@webiny/i18n-react": "5.25.0-beta.1",
23
- "@webiny/plugins": "5.25.0-beta.1",
24
- "@webiny/react-router": "5.25.0-beta.1",
25
- "@webiny/ui": "5.25.0-beta.1",
21
+ "@webiny/i18n": "5.25.0-beta.2",
22
+ "@webiny/i18n-react": "5.25.0-beta.2",
23
+ "@webiny/plugins": "5.25.0-beta.2",
24
+ "@webiny/react-router": "5.25.0-beta.2",
25
+ "@webiny/ui": "5.25.0-beta.2",
26
26
  "apollo-cache": "1.3.5",
27
27
  "apollo-cache-inmemory": "1.6.6",
28
28
  "apollo-client": "2.6.10",
29
29
  "apollo-link": "1.2.14",
30
30
  "apollo-link-context": "1.0.20",
31
31
  "apollo-link-error": "1.1.13",
32
+ "apollo-link-http-common": "0.2.16",
32
33
  "apollo-utilities": "1.3.4",
33
34
  "boolean": "3.2.0",
34
35
  "graphql": "15.8.0",
@@ -47,8 +48,8 @@
47
48
  "@babel/preset-react": "^7.16.0",
48
49
  "@babel/preset-typescript": "^7.16.0",
49
50
  "@types/warning": "^3.0.0",
50
- "@webiny/cli": "^5.25.0-beta.1",
51
- "@webiny/project-utils": "^5.25.0-beta.1",
51
+ "@webiny/cli": "^5.25.0-beta.2",
52
+ "@webiny/project-utils": "^5.25.0-beta.2",
52
53
  "babel-plugin-lodash": "^3.3.4",
53
54
  "rimraf": "^3.0.2",
54
55
  "typescript": "4.5.5"
@@ -68,5 +69,5 @@
68
69
  ]
69
70
  }
70
71
  },
71
- "gitHead": "c5cbc36b39a28e3f1c58de7d768fdcd113ad8e15"
72
+ "gitHead": "ed2f22976af47aea0b6b5d638f8afdc39951b014"
72
73
  }
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare const OverlayWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
3
2
  export declare const Pre: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLPreElement>, HTMLPreElement>, Pick<import("react").ClassAttributes<HTMLPreElement> & import("react").HTMLAttributes<HTMLPreElement>, keyof import("react").HTMLAttributes<HTMLPreElement>>, object>;