@webiny/app 0.0.0-unstable.fcdad0bc61 → 0.0.0-unstable.fdd9228b5d
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/App.d.ts +26 -0
- package/App.js +95 -0
- package/App.js.map +1 -0
- package/AppContainer.d.ts +23 -0
- package/AppContainer.js +9 -0
- package/AppContainer.js.map +1 -0
- package/apollo-client/InMemoryCache.d.ts +3 -2
- package/apollo-client/InMemoryCache.js +17 -76
- package/apollo-client/InMemoryCache.js.map +1 -1
- package/apollo-client/IntrospectionFragmentMatcher.d.ts +11 -0
- package/apollo-client/IntrospectionFragmentMatcher.js +45 -0
- package/apollo-client/IntrospectionFragmentMatcher.js.map +1 -0
- package/components/Image.d.ts +3 -3
- package/components/Image.js +12 -32
- package/components/Image.js.map +1 -1
- package/components/Routes.d.ts +2 -2
- package/components/Routes.js +21 -34
- package/components/Routes.js.map +1 -1
- package/components/View.d.ts +1 -1
- package/components/View.js +15 -37
- package/components/View.js.map +1 -1
- package/components/index.js +3 -20
- package/components/index.js.map +1 -1
- package/config/RouterConfig/Route.d.ts +30 -0
- package/config/RouterConfig/Route.js +42 -0
- package/config/RouterConfig/Route.js.map +1 -0
- package/config/RouterConfig.d.ts +32 -0
- package/config/RouterConfig.js +18 -0
- package/config/RouterConfig.js.map +1 -0
- package/config.d.ts +1 -1
- package/config.js +8 -16
- package/config.js.map +1 -1
- package/contexts/Ui/index.d.ts +4 -8
- package/contexts/Ui/index.js +29 -89
- package/contexts/Ui/index.js.map +1 -1
- package/core/DebounceRender.d.ts +12 -0
- package/core/DebounceRender.js +31 -0
- package/core/DebounceRender.js.map +1 -0
- package/core/Plugin.d.ts +8 -0
- package/core/Plugin.js +14 -0
- package/core/Plugin.js.map +1 -0
- package/core/Plugins.d.ts +15 -0
- package/core/Plugins.js +39 -0
- package/core/Plugins.js.map +1 -0
- package/core/Provider.d.ts +8 -0
- package/core/Provider.js +18 -0
- package/core/Provider.js.map +1 -0
- package/core/Routes.d.ts +6 -0
- package/core/Routes.js +34 -0
- package/core/Routes.js.map +1 -0
- package/core/createProvider.d.ts +10 -0
- package/core/createProvider.js +9 -0
- package/core/createProvider.js.map +1 -0
- package/core/createProviderPlugin.d.ts +8 -0
- package/core/createProviderPlugin.js +17 -0
- package/core/createProviderPlugin.js.map +1 -0
- package/hooks/useAutocomplete/index.js +2 -12
- package/hooks/useAutocomplete/index.js.map +1 -1
- package/hooks/useAutocomplete/useAutocomplete.d.ts +1 -1
- package/hooks/useAutocomplete/useAutocomplete.js +10 -25
- package/hooks/useAutocomplete/useAutocomplete.js.map +1 -1
- package/hooks/useDataList/functions/getData.js +3 -15
- package/hooks/useDataList/functions/getData.js.map +1 -1
- package/hooks/useDataList/functions/getError.js +3 -15
- package/hooks/useDataList/functions/getError.js.map +1 -1
- package/hooks/useDataList/functions/getMeta.js +3 -15
- package/hooks/useDataList/functions/getMeta.js.map +1 -1
- package/hooks/useDataList/functions/index.js +4 -30
- package/hooks/useDataList/functions/index.js.map +1 -1
- package/hooks/useDataList/functions/searchDataByKey.js +5 -16
- package/hooks/useDataList/functions/searchDataByKey.js.map +1 -1
- package/hooks/useDataList/index.js +2 -12
- package/hooks/useDataList/index.js.map +1 -1
- package/hooks/useDataList/useDataList.d.ts +2 -2
- package/hooks/useDataList/useDataList.js +82 -107
- package/hooks/useDataList/useDataList.js.map +1 -1
- package/hooks/useDataList/utils/index.js +3 -22
- package/hooks/useDataList/utils/index.js.map +1 -1
- package/hooks/useDataList/utils/prepareLoadListParams.d.ts +1 -2
- package/hooks/useDataList/utils/prepareLoadListParams.js +33 -43
- package/hooks/useDataList/utils/prepareLoadListParams.js.map +1 -1
- package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js +11 -16
- package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js.map +1 -1
- package/hooks/useDataList/utils/types.d.ts +21 -15
- package/hooks/useDataList/utils/types.js +2 -4
- package/hooks/useDataList/utils/types.js.map +1 -1
- package/hooks/useHandler.js +13 -14
- package/hooks/useHandler.js.map +1 -1
- package/hooks/useHandlers.d.ts +3 -3
- package/hooks/useHandlers.js +14 -21
- package/hooks/useHandlers.js.map +1 -1
- package/hooks/useRegisterLegacyPlugin.d.ts +2 -0
- package/hooks/useRegisterLegacyPlugin.js +11 -0
- package/hooks/useRegisterLegacyPlugin.js.map +1 -0
- package/hooks/useUi.d.ts +1 -1
- package/hooks/useUi.js +5 -14
- package/hooks/useUi.js.map +1 -1
- package/i18n/i18n.js +6 -20
- package/i18n/i18n.js.map +1 -1
- package/i18n/index.js +2 -14
- package/i18n/index.js.map +1 -1
- package/index.d.ts +14 -1
- package/index.js +18 -35
- package/index.js.map +1 -1
- package/package.json +25 -30
- package/plugins/AddQuerySelectionPlugin.d.ts +9 -2
- package/plugins/AddQuerySelectionPlugin.js +64 -124
- package/plugins/AddQuerySelectionPlugin.js.map +1 -1
- package/plugins/ApolloCacheObjectIdPlugin.js +13 -50
- package/plugins/ApolloCacheObjectIdPlugin.js.map +1 -1
- package/plugins/ApolloDynamicLink.d.ts +3 -2
- package/plugins/ApolloDynamicLink.js +20 -72
- package/plugins/ApolloDynamicLink.js.map +1 -1
- package/plugins/ApolloLinkPlugin.d.ts +1 -1
- package/plugins/ApolloLinkPlugin.js +19 -60
- package/plugins/ApolloLinkPlugin.js.map +1 -1
- package/plugins/ConsoleLinkPlugin.js +21 -58
- package/plugins/ConsoleLinkPlugin.js.map +1 -1
- package/plugins/LocaleHeaderLinkPlugin.d.ts +1 -6
- package/plugins/LocaleHeaderLinkPlugin.js +24 -69
- package/plugins/LocaleHeaderLinkPlugin.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.d.ts +1 -1
- package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js +41 -72
- package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin/StyledComponents.d.ts +8 -4
- package/plugins/NetworkErrorLinkPlugin/StyledComponents.js +76 -19
- package/plugins/NetworkErrorLinkPlugin/StyledComponents.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.d.ts +1 -1
- package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js +24 -31
- package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin.js +24 -59
- package/plugins/NetworkErrorLinkPlugin.js.map +1 -1
- package/plugins/OmitTypenameLinkPlugin.js +13 -47
- package/plugins/OmitTypenameLinkPlugin.js.map +1 -1
- package/plugins/RoutePlugin.d.ts +1 -1
- package/plugins/RoutePlugin.js +13 -50
- package/plugins/RoutePlugin.js.map +1 -1
- package/plugins/TenantHeaderLinkPlugin.d.ts +1 -6
- package/plugins/TenantHeaderLinkPlugin.js +31 -77
- package/plugins/TenantHeaderLinkPlugin.js.map +1 -1
- package/plugins/ViewPlugin.d.ts +1 -1
- package/plugins/ViewPlugin.js +16 -55
- package/plugins/ViewPlugin.js.map +1 -1
- package/plugins/image.d.ts +1 -1
- package/plugins/image.js +55 -94
- package/plugins/image.js.map +1 -1
- package/plugins/index.d.ts +3 -3
- package/plugins/index.js +34 -78
- package/plugins/index.js.map +1 -1
- package/react-butterfiles/Files.d.ts +69 -0
- package/react-butterfiles/Files.js +227 -0
- package/react-butterfiles/Files.js.map +1 -0
- package/react-butterfiles/index.d.ts +2 -0
- package/react-butterfiles/index.js +4 -0
- package/react-butterfiles/index.js.map +1 -0
- package/react-butterfiles/utils/generateId.d.ts +1 -0
- package/react-butterfiles/utils/generateId.js +5 -0
- package/react-butterfiles/utils/generateId.js.map +1 -0
- package/react-butterfiles/utils/readFileContent.d.ts +1 -0
- package/react-butterfiles/utils/readFileContent.js +15 -0
- package/react-butterfiles/utils/readFileContent.js.map +1 -0
- package/renderApp.d.ts +2 -0
- package/renderApp.js +9 -0
- package/renderApp.js.map +1 -0
- package/types.d.ts +24 -27
- package/types.js +12 -11
- package/types.js.map +1 -1
- package/utils/createGenericContext.d.ts +13 -0
- package/utils/createGenericContext.js +25 -0
- package/utils/createGenericContext.js.map +1 -0
- package/utils/createHashing.d.ts +2 -0
- package/utils/createHashing.js +18 -0
- package/utils/createHashing.js.map +1 -0
- package/utils/getApiUrl.d.ts +1 -0
- package/utils/getApiUrl.js +5 -0
- package/utils/getApiUrl.js.map +1 -0
- package/utils/getGqlApiUrl.d.ts +1 -0
- package/utils/getGqlApiUrl.js +6 -0
- package/utils/getGqlApiUrl.js.map +1 -0
- package/utils/getHeadlessCmsGqlApiUrl.d.ts +5 -0
- package/utils/getHeadlessCmsGqlApiUrl.js +12 -0
- package/utils/getHeadlessCmsGqlApiUrl.js.map +1 -0
- package/utils/getLocaleCode.d.ts +6 -0
- package/utils/getLocaleCode.js +33 -0
- package/utils/getLocaleCode.js.map +1 -0
- package/utils/getPrerenderId.d.ts +6 -0
- package/utils/getPrerenderId.js +5 -0
- package/utils/getPrerenderId.js.map +1 -0
- package/utils/getTenantId.d.ts +6 -0
- package/utils/getTenantId.js +45 -0
- package/utils/getTenantId.js.map +1 -0
- package/utils/index.d.ts +10 -0
- package/utils/index.js +12 -0
- package/utils/index.js.map +1 -0
- package/utils/isLocalhost.d.ts +1 -0
- package/utils/isLocalhost.js +7 -0
- package/utils/isLocalhost.js.map +1 -0
- package/utils/isPrerendering.d.ts +1 -0
- package/utils/isPrerendering.js +5 -0
- package/utils/isPrerendering.js.map +1 -0
- package/utils/legacyPluginToReactComponent.d.ts +7 -0
- package/utils/legacyPluginToReactComponent.js +14 -0
- package/utils/legacyPluginToReactComponent.js.map +1 -0
package/hooks/useHandler.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { useRef, useEffect } from "react";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.useHandler = useHandler;
|
|
3
|
+
/**
|
|
4
|
+
* TODO: figure out any types.
|
|
5
|
+
*/
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var handler = factory(propsRef.current);
|
|
14
|
-
return handler.apply(void 0, arguments);
|
|
7
|
+
export function useHandler(props, factory) {
|
|
8
|
+
const propsRef = useRef(props);
|
|
9
|
+
const handlerRef = useRef((...args) => {
|
|
10
|
+
const handler = factory(propsRef.current);
|
|
11
|
+
return handler(...args);
|
|
15
12
|
});
|
|
16
|
-
|
|
13
|
+
useEffect(() => {
|
|
17
14
|
propsRef.current = props;
|
|
18
15
|
});
|
|
19
16
|
return handlerRef.current;
|
|
20
|
-
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=useHandler.js.map
|
package/hooks/useHandler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useHandler","props","factory","propsRef","
|
|
1
|
+
{"version":3,"names":["useRef","useEffect","useHandler","props","factory","propsRef","handlerRef","args","handler","current"],"sources":["useHandler.ts"],"sourcesContent":["import { useRef, useEffect } from \"react\";\n\n/**\n * TODO: figure out any types.\n */\ninterface Props {\n [key: string]: any;\n}\ninterface Factory {\n (...args: any): any;\n}\nexport function useHandler(props: Props, factory: Factory) {\n const propsRef = useRef(props);\n\n const handlerRef = useRef((...args: any) => {\n const handler = factory(propsRef.current);\n return handler(...args);\n });\n\n useEffect(() => {\n propsRef.current = props;\n });\n\n return handlerRef.current;\n}\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,SAAS,QAAQ,OAAO;;AAEzC;AACA;AACA;;AAOA,OAAO,SAASC,UAAUA,CAACC,KAAY,EAAEC,OAAgB,EAAE;EACvD,MAAMC,QAAQ,GAAGL,MAAM,CAACG,KAAK,CAAC;EAE9B,MAAMG,UAAU,GAAGN,MAAM,CAAC,CAAC,GAAGO,IAAS,KAAK;IACxC,MAAMC,OAAO,GAAGJ,OAAO,CAACC,QAAQ,CAACI,OAAO,CAAC;IACzC,OAAOD,OAAO,CAAC,GAAGD,IAAI,CAAC;EAC3B,CAAC,CAAC;EAEFN,SAAS,CAAC,MAAM;IACZI,QAAQ,CAACI,OAAO,GAAGN,KAAK;EAC5B,CAAC,CAAC;EAEF,OAAOG,UAAU,CAACG,OAAO;AAC7B","ignoreList":[]}
|
package/hooks/useHandlers.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
type HandlerProps = {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
};
|
|
4
|
-
|
|
4
|
+
type HandlerFactories = {
|
|
5
5
|
[key: string]: (props: HandlerProps) => (...params: any[]) => any;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type Handlers = {
|
|
8
8
|
[K in keyof HandlerFactories]: (...params: any[]) => any;
|
|
9
9
|
};
|
|
10
10
|
export declare function useHandlers<H = Handlers>(props: HandlerProps, factories: HandlerFactories): H;
|
package/hooks/useHandlers.js
CHANGED
|
@@ -1,30 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
function useHandlers(props, factories) {
|
|
11
|
-
var propsRef = (0, _react.useRef)(props);
|
|
12
|
-
var handlersRef = (0, _react.useRef)(function () {
|
|
13
|
-
var names = Object.keys(factories);
|
|
14
|
-
return names.reduce(function (handlers, name) {
|
|
1
|
+
import { useRef, useEffect } from "react";
|
|
2
|
+
export function useHandlers(props, factories) {
|
|
3
|
+
const propsRef = useRef(props);
|
|
4
|
+
const handlersRef = useRef((() => {
|
|
5
|
+
const names = Object.keys(factories);
|
|
6
|
+
return names.reduce((handlers, name) => {
|
|
15
7
|
/**
|
|
16
8
|
* TODO: figure out args types
|
|
17
9
|
*/
|
|
18
|
-
handlers[name] =
|
|
19
|
-
|
|
20
|
-
return handler
|
|
10
|
+
handlers[name] = (...args) => {
|
|
11
|
+
const handler = factories[name](propsRef.current);
|
|
12
|
+
return handler(...args);
|
|
21
13
|
};
|
|
22
|
-
|
|
23
14
|
return handlers;
|
|
24
15
|
}, {});
|
|
25
|
-
}());
|
|
26
|
-
|
|
16
|
+
})());
|
|
17
|
+
useEffect(() => {
|
|
27
18
|
propsRef.current = props;
|
|
28
19
|
});
|
|
29
20
|
return handlersRef.current;
|
|
30
|
-
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=useHandlers.js.map
|
package/hooks/useHandlers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useHandlers","props","factories","propsRef","
|
|
1
|
+
{"version":3,"names":["useRef","useEffect","useHandlers","props","factories","propsRef","handlersRef","names","Object","keys","reduce","handlers","name","args","handler","current"],"sources":["useHandlers.ts"],"sourcesContent":["import { useRef, useEffect } from \"react\";\n\ntype HandlerProps = { [key: string]: any };\ntype HandlerFactories = { [key: string]: (props: HandlerProps) => (...params: any[]) => any };\ntype Handlers = {\n [K in keyof HandlerFactories]: (...params: any[]) => any;\n};\n\nexport function useHandlers<H = Handlers>(props: HandlerProps, factories: HandlerFactories) {\n const propsRef = useRef(props);\n\n const handlersRef = useRef(\n (() => {\n const names = Object.keys(factories);\n return names.reduce((handlers, name) => {\n /**\n * TODO: figure out args types\n */\n handlers[name] = (...args: any) => {\n const handler = factories[name](propsRef.current);\n return handler(...args);\n };\n return handlers;\n }, {} as Record<string, any>);\n })()\n );\n\n useEffect(() => {\n propsRef.current = props;\n });\n\n return handlersRef.current as H;\n}\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAQzC,OAAO,SAASC,WAAWA,CAAeC,KAAmB,EAAEC,SAA2B,EAAE;EACxF,MAAMC,QAAQ,GAAGL,MAAM,CAACG,KAAK,CAAC;EAE9B,MAAMG,WAAW,GAAGN,MAAM,CACtB,CAAC,MAAM;IACH,MAAMO,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACL,SAAS,CAAC;IACpC,OAAOG,KAAK,CAACG,MAAM,CAAC,CAACC,QAAQ,EAAEC,IAAI,KAAK;MACpC;AAChB;AACA;MACgBD,QAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,GAAGC,IAAS,KAAK;QAC/B,MAAMC,OAAO,GAAGV,SAAS,CAACQ,IAAI,CAAC,CAACP,QAAQ,CAACU,OAAO,CAAC;QACjD,OAAOD,OAAO,CAAC,GAAGD,IAAI,CAAC;MAC3B,CAAC;MACD,OAAOF,QAAQ;IACnB,CAAC,EAAE,CAAC,CAAwB,CAAC;EACjC,CAAC,EAAE,CACP,CAAC;EAEDV,SAAS,CAAC,MAAM;IACZI,QAAQ,CAACU,OAAO,GAAGZ,KAAK;EAC5B,CAAC,CAAC;EAEF,OAAOG,WAAW,CAACS,OAAO;AAC9B","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
import { plugins } from "@webiny/plugins";
|
|
3
|
+
export function useRegisterLegacyPlugin(plugin) {
|
|
4
|
+
const pluginRegistered = useRef(false);
|
|
5
|
+
if (!pluginRegistered.current) {
|
|
6
|
+
pluginRegistered.current = true;
|
|
7
|
+
plugins.register(plugin);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=useRegisterLegacyPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useRef","plugins","useRegisterLegacyPlugin","plugin","pluginRegistered","current","register"],"sources":["useRegisterLegacyPlugin.tsx"],"sourcesContent":["import { useRef } from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { type Plugin } from \"@webiny/plugins/types\";\n\nexport function useRegisterLegacyPlugin<TPlugin extends Plugin>(plugin: TPlugin) {\n const pluginRegistered = useRef<boolean>(false);\n if (!pluginRegistered.current) {\n pluginRegistered.current = true;\n plugins.register(plugin);\n }\n}\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,OAAO;AAC9B,SAASC,OAAO,QAAQ,iBAAiB;AAGzC,OAAO,SAASC,uBAAuBA,CAAyBC,MAAe,EAAE;EAC7E,MAAMC,gBAAgB,GAAGJ,MAAM,CAAU,KAAK,CAAC;EAC/C,IAAI,CAACI,gBAAgB,CAACC,OAAO,EAAE;IAC3BD,gBAAgB,CAACC,OAAO,GAAG,IAAI;IAC/BJ,OAAO,CAACK,QAAQ,CAACH,MAAM,CAAC;EAC5B;AACJ","ignoreList":[]}
|
package/hooks/useUi.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UiContextValue } from "../contexts/Ui";
|
|
1
|
+
import type { UiContextValue } from "../contexts/Ui";
|
|
2
2
|
export declare const useUi: () => UiContextValue;
|
package/hooks/useUi.js
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.useUi = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var _Ui = require("./../contexts/Ui");
|
|
11
|
-
|
|
12
|
-
var useUi = function useUi() {
|
|
13
|
-
return (0, _react.useContext)(_Ui.UiContext);
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { UiContext } from "../contexts/Ui";
|
|
3
|
+
export const useUi = () => {
|
|
4
|
+
return useContext(UiContext);
|
|
14
5
|
};
|
|
15
6
|
|
|
16
|
-
|
|
7
|
+
//# sourceMappingURL=useUi.js.map
|
package/hooks/useUi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useContext","UiContext","useUi"],"sources":["useUi.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport type { UiContextValue } from \"~/contexts/Ui\";\nimport { UiContext } from \"~/contexts/Ui\";\n\nexport const useUi = () => {\n return useContext(UiContext) as UiContextValue;\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAElC,SAASC,SAAS;AAElB,OAAO,MAAMC,KAAK,GAAGA,CAAA,KAAM;EACvB,OAAOF,UAAU,CAACC,SAAS,CAAC;AAChC,CAAC","ignoreList":[]}
|
package/i18n/i18n.js
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import i18n, { defaultProcessor, defaultModifiers } from "@webiny/i18n";
|
|
2
|
+
import reactProcessor from "@webiny/i18n-react";
|
|
3
|
+
i18n.registerProcessors([defaultProcessor, reactProcessor]);
|
|
4
|
+
i18n.registerModifiers(defaultModifiers);
|
|
5
|
+
export default i18n;
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _i18n = _interopRequireWildcard(require("@webiny/i18n"));
|
|
13
|
-
|
|
14
|
-
var _i18nReact = _interopRequireDefault(require("@webiny/i18n-react"));
|
|
15
|
-
|
|
16
|
-
_i18n.default.registerProcessors([_i18n.defaultProcessor, _i18nReact.default]);
|
|
17
|
-
|
|
18
|
-
_i18n.default.registerModifiers(_i18n.defaultModifiers);
|
|
19
|
-
|
|
20
|
-
var _default = _i18n.default;
|
|
21
|
-
exports.default = _default;
|
|
7
|
+
//# sourceMappingURL=i18n.js.map
|
package/i18n/i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["i18n","
|
|
1
|
+
{"version":3,"names":["i18n","defaultProcessor","defaultModifiers","reactProcessor","registerProcessors","registerModifiers"],"sources":["i18n.ts"],"sourcesContent":["import i18n, { defaultProcessor, defaultModifiers } from \"@webiny/i18n\";\nimport reactProcessor from \"@webiny/i18n-react\";\n\ni18n.registerProcessors([defaultProcessor, reactProcessor]);\ni18n.registerModifiers(defaultModifiers);\n\nexport default i18n;\n"],"mappings":"AAAA,OAAOA,IAAI,IAAIC,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAc;AACvE,OAAOC,cAAc,MAAM,oBAAoB;AAE/CH,IAAI,CAACI,kBAAkB,CAAC,CAACH,gBAAgB,EAAEE,cAAc,CAAC,CAAC;AAC3DH,IAAI,CAACK,iBAAiB,CAACH,gBAAgB,CAAC;AAExC,eAAeF,IAAI","ignoreList":[]}
|
package/i18n/index.js
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
export { default as i18n } from "./i18n";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "i18n", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _i18n.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
var _i18n = _interopRequireDefault(require("./i18n"));
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
package/i18n/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default as i18n } from \"./i18n\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["default","i18n"],"sources":["index.ts"],"sourcesContent":["export { default as i18n } from \"./i18n\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAAI","ignoreList":[]}
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
export { AddQuerySelectionPlugin } from "./plugins/AddQuerySelectionPlugin";
|
|
2
2
|
export { ApolloLinkPlugin } from "./plugins/ApolloLinkPlugin";
|
|
3
3
|
export { RoutePlugin } from "./plugins/RoutePlugin";
|
|
4
|
-
export { ApolloCacheObjectIdPlugin } from "./plugins/ApolloCacheObjectIdPlugin";
|
|
4
|
+
export { ApolloCacheObjectIdPlugin, type ApolloCacheObject } from "./plugins/ApolloCacheObjectIdPlugin";
|
|
5
|
+
export * from "@webiny/react-composition";
|
|
6
|
+
export type { HigherOrderComponent, ComposeProps, ComposableFC } from "@webiny/react-composition";
|
|
7
|
+
export * from "./App";
|
|
8
|
+
export * from "./AppContainer";
|
|
9
|
+
export type { AppProps } from "./App";
|
|
10
|
+
export * from "./core/Plugins";
|
|
11
|
+
export * from "./core/Plugin";
|
|
12
|
+
export * from "./core/Provider";
|
|
13
|
+
export * from "./core/DebounceRender";
|
|
14
|
+
export * from "./core/createProvider";
|
|
15
|
+
export * from "./core/createProviderPlugin";
|
|
16
|
+
export * from "./renderApp";
|
|
17
|
+
export * from "./utils/createGenericContext";
|
package/index.js
CHANGED
|
@@ -1,37 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
export { AddQuerySelectionPlugin } from "./plugins/AddQuerySelectionPlugin";
|
|
2
|
+
export { ApolloLinkPlugin } from "./plugins/ApolloLinkPlugin";
|
|
3
|
+
export { RoutePlugin } from "./plugins/RoutePlugin";
|
|
4
|
+
export { ApolloCacheObjectIdPlugin } from "./plugins/ApolloCacheObjectIdPlugin";
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "ApolloLinkPlugin", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _ApolloLinkPlugin.ApolloLinkPlugin;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "RoutePlugin", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _RoutePlugin.RoutePlugin;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
6
|
+
// Composition - we re-export this for ease of use
|
|
7
|
+
export * from "@webiny/react-composition";
|
|
8
|
+
// App framework
|
|
9
|
+
export * from "./App";
|
|
10
|
+
export * from "./AppContainer";
|
|
11
|
+
export * from "./core/Plugins";
|
|
12
|
+
export * from "./core/Plugin";
|
|
13
|
+
export * from "./core/Provider";
|
|
14
|
+
export * from "./core/DebounceRender";
|
|
15
|
+
export * from "./core/createProvider";
|
|
16
|
+
export * from "./core/createProviderPlugin";
|
|
17
|
+
export * from "./renderApp";
|
|
18
|
+
export * from "./utils/createGenericContext";
|
|
30
19
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var _ApolloLinkPlugin = require("./plugins/ApolloLinkPlugin");
|
|
34
|
-
|
|
35
|
-
var _RoutePlugin = require("./plugins/RoutePlugin");
|
|
36
|
-
|
|
37
|
-
var _ApolloCacheObjectIdPlugin = require("./plugins/ApolloCacheObjectIdPlugin");
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { AddQuerySelectionPlugin } from \"./plugins/AddQuerySelectionPlugin\";\nexport { ApolloLinkPlugin } from \"./plugins/ApolloLinkPlugin\";\nexport { RoutePlugin } from \"./plugins/RoutePlugin\";\nexport {
|
|
1
|
+
{"version":3,"names":["AddQuerySelectionPlugin","ApolloLinkPlugin","RoutePlugin","ApolloCacheObjectIdPlugin"],"sources":["index.ts"],"sourcesContent":["export { AddQuerySelectionPlugin } from \"./plugins/AddQuerySelectionPlugin\";\nexport { ApolloLinkPlugin } from \"./plugins/ApolloLinkPlugin\";\nexport { RoutePlugin } from \"./plugins/RoutePlugin\";\nexport {\n ApolloCacheObjectIdPlugin,\n type ApolloCacheObject\n} from \"./plugins/ApolloCacheObjectIdPlugin\";\n\n// Composition - we re-export this for ease of use\nexport * from \"@webiny/react-composition\";\nexport type { HigherOrderComponent, ComposeProps, ComposableFC } from \"@webiny/react-composition\";\n\n// App framework\nexport * from \"./App\";\nexport * from \"./AppContainer\";\nexport type { AppProps } from \"./App\";\nexport * from \"./core/Plugins\";\nexport * from \"./core/Plugin\";\nexport * from \"./core/Provider\";\nexport * from \"./core/DebounceRender\";\nexport * from \"./core/createProvider\";\nexport * from \"./core/createProviderPlugin\";\nexport * from \"./renderApp\";\nexport * from \"./utils/createGenericContext\";\n"],"mappings":"AAAA,SAASA,uBAAuB;AAChC,SAASC,gBAAgB;AACzB,SAASC,WAAW;AACpB,SACIC,yBAAyB;;AAI7B;AACA,cAAc,2BAA2B;AAGzC;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.fdd9228b5d",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@apollo/react-hooks": "3.1.5",
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
"@
|
|
21
|
-
"@
|
|
22
|
-
"@webiny/
|
|
23
|
-
"@webiny/
|
|
24
|
-
"@webiny/
|
|
25
|
-
"@webiny/react-router": "0.0.0-unstable.
|
|
26
|
-
"@webiny/ui": "0.0.0-unstable.
|
|
18
|
+
"@emotion/styled": "11.10.6",
|
|
19
|
+
"@types/react": "18.2.79",
|
|
20
|
+
"@webiny/i18n": "0.0.0-unstable.fdd9228b5d",
|
|
21
|
+
"@webiny/i18n-react": "0.0.0-unstable.fdd9228b5d",
|
|
22
|
+
"@webiny/plugins": "0.0.0-unstable.fdd9228b5d",
|
|
23
|
+
"@webiny/react-composition": "0.0.0-unstable.fdd9228b5d",
|
|
24
|
+
"@webiny/react-properties": "0.0.0-unstable.fdd9228b5d",
|
|
25
|
+
"@webiny/react-router": "0.0.0-unstable.fdd9228b5d",
|
|
26
|
+
"@webiny/ui": "0.0.0-unstable.fdd9228b5d",
|
|
27
27
|
"apollo-cache": "1.3.5",
|
|
28
28
|
"apollo-cache-inmemory": "1.6.6",
|
|
29
29
|
"apollo-client": "2.6.10",
|
|
@@ -33,43 +33,38 @@
|
|
|
33
33
|
"apollo-link-http-common": "0.2.16",
|
|
34
34
|
"apollo-utilities": "1.3.4",
|
|
35
35
|
"boolean": "3.2.0",
|
|
36
|
-
"
|
|
36
|
+
"bytes": "3.1.2",
|
|
37
|
+
"graphql": "15.9.0",
|
|
37
38
|
"invariant": "2.2.4",
|
|
38
39
|
"lodash": "4.17.21",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"react
|
|
40
|
+
"minimatch": "5.1.6",
|
|
41
|
+
"nanoid": "3.3.8",
|
|
42
|
+
"react": "18.2.0",
|
|
43
|
+
"react-dom": "18.2.0",
|
|
44
|
+
"ts-invariant": "0.10.3",
|
|
42
45
|
"warning": "4.0.3"
|
|
43
46
|
},
|
|
44
47
|
"devDependencies": {
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"@babel/preset-typescript": "^7.18.6",
|
|
51
|
-
"@types/warning": "^3.0.0",
|
|
52
|
-
"@webiny/cli": "^0.0.0-unstable.fcdad0bc61",
|
|
53
|
-
"@webiny/project-utils": "^0.0.0-unstable.fcdad0bc61",
|
|
54
|
-
"babel-plugin-lodash": "^3.3.4",
|
|
55
|
-
"rimraf": "^3.0.2",
|
|
56
|
-
"typescript": "4.7.4"
|
|
48
|
+
"@types/lodash": "4.17.13",
|
|
49
|
+
"@types/warning": "3.0.0",
|
|
50
|
+
"@webiny/project-utils": "0.0.0-unstable.fdd9228b5d",
|
|
51
|
+
"rimraf": "6.0.1",
|
|
52
|
+
"typescript": "5.3.3"
|
|
57
53
|
},
|
|
58
54
|
"publishConfig": {
|
|
59
55
|
"access": "public",
|
|
60
56
|
"directory": "dist"
|
|
61
57
|
},
|
|
62
58
|
"scripts": {
|
|
63
|
-
"build": "
|
|
64
|
-
"watch": "
|
|
59
|
+
"build": "node ../cli/bin.js run build",
|
|
60
|
+
"watch": "node ../cli/bin.js run watch"
|
|
65
61
|
},
|
|
66
62
|
"adio": {
|
|
67
63
|
"ignore": {
|
|
68
64
|
"dependencies": [
|
|
69
|
-
"@types/web",
|
|
70
65
|
"react-dom"
|
|
71
66
|
]
|
|
72
67
|
}
|
|
73
68
|
},
|
|
74
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "fdd9228b5d2636463e8a34b6e0d26eea1e29c01d"
|
|
75
70
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ApolloLink } from "apollo-link";
|
|
2
|
-
import { DocumentNode } from "graphql";
|
|
2
|
+
import type { DocumentNode } from "graphql";
|
|
3
3
|
import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
|
|
4
|
+
declare module "graphql" {
|
|
5
|
+
interface DocumentNode {
|
|
6
|
+
__webiny__: Set<string>;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
4
9
|
interface Config {
|
|
5
10
|
operationName: string;
|
|
6
11
|
selectionPath: string;
|
|
@@ -10,6 +15,8 @@ export declare class AddQuerySelectionPlugin extends ApolloLinkPlugin {
|
|
|
10
15
|
private readonly config;
|
|
11
16
|
constructor(config: Config);
|
|
12
17
|
createLink(): ApolloLink;
|
|
13
|
-
addSelectionToQuery(operationName: string,
|
|
18
|
+
addSelectionToQuery(operationName: string, document: DocumentNode): void;
|
|
19
|
+
private isProcessed;
|
|
20
|
+
private markProcessed;
|
|
14
21
|
}
|
|
15
22
|
export {};
|
|
@@ -1,132 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.AddQuerySelectionPlugin = void 0;
|
|
9
|
-
|
|
10
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
-
|
|
12
|
-
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
|
13
|
-
|
|
14
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
-
|
|
16
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
-
|
|
18
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
19
|
-
|
|
20
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
21
|
-
|
|
22
|
-
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
23
|
-
|
|
24
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
|
|
26
|
-
var _apolloLink = require("apollo-link");
|
|
27
|
-
|
|
28
|
-
var _ApolloLinkPlugin2 = require("./ApolloLinkPlugin");
|
|
29
|
-
|
|
30
|
-
var AddQuerySelectionPlugin = /*#__PURE__*/function (_ApolloLinkPlugin) {
|
|
31
|
-
(0, _inherits2.default)(AddQuerySelectionPlugin, _ApolloLinkPlugin);
|
|
32
|
-
|
|
33
|
-
var _super = (0, _createSuper2.default)(AddQuerySelectionPlugin);
|
|
34
|
-
|
|
35
|
-
function AddQuerySelectionPlugin(config) {
|
|
36
|
-
var _this;
|
|
37
|
-
|
|
38
|
-
(0, _classCallCheck2.default)(this, AddQuerySelectionPlugin);
|
|
39
|
-
_this = _super.call(this);
|
|
40
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "config", void 0);
|
|
41
|
-
_this.config = config;
|
|
42
|
-
return _this;
|
|
1
|
+
import { ApolloLink } from "apollo-link";
|
|
2
|
+
import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
|
|
3
|
+
export class AddQuerySelectionPlugin extends ApolloLinkPlugin {
|
|
4
|
+
constructor(config) {
|
|
5
|
+
super();
|
|
6
|
+
this.config = config;
|
|
43
7
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
value: function createLink() {
|
|
48
|
-
var _this2 = this;
|
|
49
|
-
|
|
50
|
-
return new _apolloLink.ApolloLink(function (operation, forward) {
|
|
51
|
-
if (operation.operationName !== _this2.config.operationName) {
|
|
52
|
-
return forward(operation);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
_this2.addSelectionToQuery(operation.operationName, operation.query);
|
|
56
|
-
|
|
8
|
+
createLink() {
|
|
9
|
+
return new ApolloLink((operation, forward) => {
|
|
10
|
+
if (operation.operationName !== this.config.operationName) {
|
|
57
11
|
return forward(operation);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}, {
|
|
61
|
-
key: "addSelectionToQuery",
|
|
62
|
-
value: function addSelectionToQuery(operationName, query) {
|
|
63
|
-
var _tree;
|
|
64
|
-
|
|
65
|
-
if (operationName !== this.config.operationName) {
|
|
66
|
-
return;
|
|
67
12
|
}
|
|
13
|
+
this.addSelectionToQuery(operation.operationName, operation.query);
|
|
14
|
+
return forward(operation);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
addSelectionToQuery(operationName, document) {
|
|
18
|
+
if (operationName !== this.config.operationName) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
68
21
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
96
|
-
var selection = _step2.value;
|
|
97
|
-
|
|
98
|
-
if (!selection.selectionSet) {
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (selection.name.value === field) {
|
|
103
|
-
tree = selection.selectionSet.selections;
|
|
104
|
-
continue fieldLoop;
|
|
105
|
-
}
|
|
106
|
-
} // If we get here, it means we didn't find the necessary selection
|
|
107
|
-
|
|
108
|
-
} catch (err) {
|
|
109
|
-
_iterator2.e(err);
|
|
110
|
-
} finally {
|
|
111
|
-
_iterator2.f();
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return;
|
|
22
|
+
// If this plugin already processed the given document (documents are always passed by reference),
|
|
23
|
+
// then we don't want to apply the selection again, to avoid adding duplicate selections.
|
|
24
|
+
if (this.isProcessed(document)) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.markProcessed(document);
|
|
28
|
+
const {
|
|
29
|
+
addSelection,
|
|
30
|
+
selectionPath
|
|
31
|
+
} = this.config;
|
|
32
|
+
const firstQueryDefinition = document.definitions[0];
|
|
33
|
+
if (!firstQueryDefinition) {
|
|
34
|
+
return;
|
|
35
|
+
} else if (!firstQueryDefinition.selectionSet) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
let tree = firstQueryDefinition.selectionSet.selections;
|
|
39
|
+
const fields = selectionPath.split(".");
|
|
40
|
+
fieldLoop: for (const field of fields) {
|
|
41
|
+
for (const selection of tree) {
|
|
42
|
+
if (!selection.selectionSet) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (selection.name.value === field) {
|
|
46
|
+
tree = selection.selectionSet.selections;
|
|
47
|
+
continue fieldLoop;
|
|
115
48
|
}
|
|
116
|
-
} catch (err) {
|
|
117
|
-
_iterator.e(err);
|
|
118
|
-
} finally {
|
|
119
|
-
_iterator.f();
|
|
120
49
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
(_tree = tree).push.apply(_tree, (0, _toConsumableArray2.default)(addSelection.definitions[0].selectionSet.selections));
|
|
50
|
+
// If we get here, it means we didn't find the necessary selection
|
|
51
|
+
return;
|
|
127
52
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
53
|
+
/**
|
|
54
|
+
* We must cast because there are a lot of types that are not intertwined and TS is complaining
|
|
55
|
+
*/
|
|
56
|
+
tree.push(...addSelection.definitions[0].selectionSet.selections);
|
|
57
|
+
}
|
|
58
|
+
isProcessed(document) {
|
|
59
|
+
if (!document.hasOwnProperty("__webiny__")) {
|
|
60
|
+
document.__webiny__ = new Set();
|
|
61
|
+
}
|
|
62
|
+
return document.__webiny__.has(this.cacheKey);
|
|
63
|
+
}
|
|
64
|
+
markProcessed(document) {
|
|
65
|
+
if (!document.hasOwnProperty("__webiny__")) {
|
|
66
|
+
document.__webiny__ = new Set();
|
|
67
|
+
}
|
|
68
|
+
document.__webiny__.add(this.cacheKey);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
131
71
|
|
|
132
|
-
|
|
72
|
+
//# sourceMappingURL=AddQuerySelectionPlugin.js.map
|