@webiny/app 5.25.0-beta.1 → 5.25.0-beta.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/components/Routes.d.ts +0 -1
- package/components/Routes.js +2 -2
- package/components/Routes.js.map +1 -1
- package/hooks/useDataList/utils/prepareLoadListParams.d.ts +1 -0
- package/package.json +11 -10
- package/plugins/ApolloCacheObjectIdPlugin.d.ts +2 -2
- package/plugins/ApolloCacheObjectIdPlugin.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin/StyledComponents.d.ts +0 -1
package/components/Routes.d.ts
CHANGED
package/components/Routes.js
CHANGED
|
@@ -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 {
|
|
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(
|
|
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, {
|
package/components/Routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Routes.tsx"],"names":["React","plugins","
|
|
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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app",
|
|
3
|
-
"version": "5.25.0-beta.
|
|
3
|
+
"version": "5.25.0-beta.4",
|
|
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.
|
|
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.
|
|
22
|
-
"@webiny/i18n-react": "5.25.0-beta.
|
|
23
|
-
"@webiny/plugins": "5.25.0-beta.
|
|
24
|
-
"@webiny/react-router": "5.25.0-beta.
|
|
25
|
-
"@webiny/ui": "5.25.0-beta.
|
|
21
|
+
"@webiny/i18n": "5.25.0-beta.4",
|
|
22
|
+
"@webiny/i18n-react": "5.25.0-beta.4",
|
|
23
|
+
"@webiny/plugins": "5.25.0-beta.4",
|
|
24
|
+
"@webiny/react-router": "5.25.0-beta.4",
|
|
25
|
+
"@webiny/ui": "5.25.0-beta.4",
|
|
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.
|
|
51
|
-
"@webiny/project-utils": "^5.25.0-beta.
|
|
51
|
+
"@webiny/cli": "^5.25.0-beta.4",
|
|
52
|
+
"@webiny/project-utils": "^5.25.0-beta.4",
|
|
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": "
|
|
72
|
+
"gitHead": "625ab53457e211940b30b1fe86add4f19f63c8b0"
|
|
72
73
|
}
|
|
@@ -4,12 +4,12 @@ export interface ApolloCacheObject {
|
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
}
|
|
6
6
|
interface ApolloCacheObjectIdPluginCallable<T> {
|
|
7
|
-
(data: T):
|
|
7
|
+
(data: T): string | null;
|
|
8
8
|
}
|
|
9
9
|
export declare class ApolloCacheObjectIdPlugin<T extends ApolloCacheObject = ApolloCacheObject> extends Plugin {
|
|
10
10
|
static readonly type: string;
|
|
11
11
|
private readonly _getObjectId?;
|
|
12
12
|
constructor(getObjectId?: ApolloCacheObjectIdPluginCallable<T>);
|
|
13
|
-
getObjectId(data: T):
|
|
13
|
+
getObjectId(data: T): string | null;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ApolloCacheObjectIdPlugin.ts"],"names":["Plugin","ApolloCacheObjectIdPlugin","getObjectId","_getObjectId","data","Error"],"mappings":";;;;;;AAAA,SAASA,MAAT,QAAuB,iBAAvB;
|
|
1
|
+
{"version":3,"sources":["ApolloCacheObjectIdPlugin.ts"],"names":["Plugin","ApolloCacheObjectIdPlugin","getObjectId","_getObjectId","data","Error"],"mappings":";;;;;;AAAA,SAASA,MAAT,QAAuB,iBAAvB;AAWA,WAAaC,yBAAb;AAAA;;AAAA;;AAMI,qCAAmBC,WAAnB,EAAuE;AAAA;;AAAA;;AACnE;;AADmE;;AAEnE,UAAKC,YAAL,GAAoBD,WAApB;AAFmE;AAGtE;;AATL;AAAA;AAAA,WAWI,qBAAmBE,IAAnB,EAA4B;AACxB,UAAI,OAAO,KAAKD,YAAZ,KAA6B,UAAjC,EAA6C;AACzC,cAAME,KAAK,kHAAX;AAGH;;AAED,aAAO,KAAKF,YAAL,CAAkBC,IAAlB,CAAP;AACH;AAnBL;;AAAA;AAAA,EAEUJ,MAFV;;gBAAaC,yB,UAGsC,qB","sourcesContent":["import { Plugin } from \"@webiny/plugins\";\n\nexport interface ApolloCacheObject {\n __typename?: string;\n [key: string]: any;\n}\n\ninterface ApolloCacheObjectIdPluginCallable<T> {\n (data: T): string | null;\n}\n\nexport class ApolloCacheObjectIdPlugin<\n T extends ApolloCacheObject = ApolloCacheObject\n> extends Plugin {\n public static override readonly type: string = \"cache-get-object-id\";\n private readonly _getObjectId?: ApolloCacheObjectIdPluginCallable<T>;\n\n public constructor(getObjectId?: ApolloCacheObjectIdPluginCallable<T>) {\n super();\n this._getObjectId = getObjectId;\n }\n\n public getObjectId(data: T) {\n if (typeof this._getObjectId !== \"function\") {\n throw Error(\n `You must provide a \"getObjectId\" callable to the plugin constructor or extend the ApolloCacheObjectIdPlugin.`\n );\n }\n\n return this._getObjectId(data);\n }\n}\n"]}
|
|
@@ -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>;
|