@webiny/app-serverless-cms 6.0.0-alpha.5 → 6.0.0-rc.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/Admin.d.ts +1 -2
- package/Admin.js +17 -23
- package/Admin.js.map +1 -1
- package/README.md +7 -38
- package/apolloClientFactory.js +4 -4
- package/apolloClientFactory.js.map +1 -1
- package/apolloLinks.d.ts +5 -4
- package/apolloLinks.js +6 -5
- package/apolloLinks.js.map +1 -1
- package/index.d.ts +6 -8
- package/index.js +4 -6
- package/index.js.map +1 -1
- package/package.json +30 -35
- package/styles.scss +3 -10
package/Admin.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { AdminProps as BaseAdminProps } from "@webiny/app-admin";
|
|
3
|
-
export interface AdminProps extends Omit<BaseAdminProps, "createApolloClient"> {
|
|
4
|
-
createApolloClient?: BaseAdminProps["createApolloClient"];
|
|
3
|
+
export interface AdminProps extends Omit<BaseAdminProps, "createApolloClient" | "createLegacyPlugins"> {
|
|
5
4
|
children?: React.ReactNode;
|
|
6
5
|
}
|
|
7
6
|
export declare const Admin: React.NamedExoticComponent<AdminProps>;
|
package/Admin.js
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import React, { memo } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { Admin as BaseAdmin, AppInstaller, Provider } from "@webiny/app-admin";
|
|
4
|
-
import { Tenancy } from "@webiny/app-tenancy";
|
|
5
|
-
import { Security } from "@webiny/app-security";
|
|
6
|
-
import { I18N } from "@webiny/app-i18n";
|
|
7
|
-
import { I18NContent } from "@webiny/app-i18n-content";
|
|
2
|
+
import { Admin as BaseAdmin, SystemInstallerProvider } from "@webiny/app-admin";
|
|
8
3
|
import { HeadlessCMS } from "@webiny/app-headless-cms";
|
|
9
4
|
import { AdminUI } from "@webiny/app-admin-ui";
|
|
10
|
-
import { FileManager } from "@webiny/app-file-manager/app";
|
|
5
|
+
import { FileManager } from "@webiny/app-file-manager/app.js";
|
|
11
6
|
import { GraphQLPlayground } from "@webiny/app-graphql-playground";
|
|
12
7
|
import { AccessManagement } from "@webiny/app-security-access-management";
|
|
13
|
-
import { imagePlugin } from "@webiny/app/plugins";
|
|
8
|
+
import { imagePlugin } from "@webiny/app/plugins/index.js";
|
|
14
9
|
import fileStorageS3Plugin from "@webiny/app-file-manager-s3";
|
|
15
|
-
import { createApolloClient
|
|
16
|
-
import apolloLinks from "./apolloLinks";
|
|
17
|
-
import { createViewCompositionProvider } from "@webiny/app-admin/base/providers/ViewCompositionProvider";
|
|
18
|
-
import { AdvancedPublishingWorkflow } from "@webiny/app-apw";
|
|
19
|
-
import { TenantManager } from "@webiny/app-tenant-manager";
|
|
10
|
+
import { createApolloClient } from "./apolloClientFactory.js";
|
|
11
|
+
import apolloLinks from "./apolloLinks.js";
|
|
20
12
|
import { AuditLogs } from "@webiny/app-audit-logs";
|
|
21
13
|
import { LexicalEditorActions } from "@webiny/lexical-editor-actions";
|
|
22
14
|
import { Module as MailerSettings } from "@webiny/app-mailer";
|
|
@@ -24,21 +16,23 @@ import { Websockets } from "@webiny/app-websockets";
|
|
|
24
16
|
import { RecordLocking } from "@webiny/app-record-locking";
|
|
25
17
|
import { TrashBinConfigs } from "@webiny/app-trash-bin";
|
|
26
18
|
import { AdvancedContentOrganisation } from "@webiny/app-aco";
|
|
27
|
-
import { Extension as WebsiteBuilder } from "@webiny/app-website-builder/Extension";
|
|
28
|
-
import { SchedulerConfigs } from "@webiny/app-headless-cms-scheduler
|
|
19
|
+
import { Extension as WebsiteBuilder } from "@webiny/app-website-builder/Extension.js";
|
|
20
|
+
import { SchedulerConfigs } from "@webiny/app-headless-cms-scheduler";
|
|
21
|
+
import { Components as WorkflowComponents } from "@webiny/app-workflows";
|
|
22
|
+
import { CmsWorkflows } from "@webiny/app-headless-cms-workflows";
|
|
23
|
+
import { WebsiteBuilderWorkflows } from "@webiny/app-website-builder-workflows";
|
|
29
24
|
const App = props => {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
const createLegacyPlugins = container => {
|
|
26
|
+
return [imagePlugin(), fileStorageS3Plugin(), apolloLinks(container)];
|
|
27
|
+
};
|
|
33
28
|
return /*#__PURE__*/React.createElement(BaseAdmin, {
|
|
29
|
+
createApolloClient: createApolloClient,
|
|
30
|
+
createLegacyPlugins: createLegacyPlugins
|
|
31
|
+
}, /*#__PURE__*/React.createElement(AdminUI, null), /*#__PURE__*/React.createElement(AccessManagement, null), /*#__PURE__*/React.createElement(SystemInstallerProvider, null), /*#__PURE__*/React.createElement(FileManager, null), /*#__PURE__*/React.createElement(GraphQLPlayground, {
|
|
34
32
|
createApolloClient: createApolloClient
|
|
35
|
-
}, /*#__PURE__*/React.createElement(AdminUI, null), /*#__PURE__*/React.createElement(Tenancy, null), /*#__PURE__*/React.createElement(Security, null), /*#__PURE__*/React.createElement(AccessManagement, null), /*#__PURE__*/React.createElement(AppInstaller, null), /*#__PURE__*/React.createElement(FileManager, null), /*#__PURE__*/React.createElement(GraphQLPlayground, {
|
|
36
|
-
createApolloClient: createApolloClient
|
|
37
|
-
}), /*#__PURE__*/React.createElement(I18N, null), /*#__PURE__*/React.createElement(I18NContent, null), /*#__PURE__*/React.createElement(Provider, {
|
|
38
|
-
hoc: ViewCompositionProvider
|
|
39
33
|
}), /*#__PURE__*/React.createElement(Websockets, null), /*#__PURE__*/React.createElement(RecordLocking, null), /*#__PURE__*/React.createElement(LexicalEditorActions, null), /*#__PURE__*/React.createElement(HeadlessCMS, {
|
|
40
34
|
createApolloClient: createApolloClient
|
|
41
|
-
}), /*#__PURE__*/React.createElement(
|
|
35
|
+
}), /*#__PURE__*/React.createElement(AuditLogs, null), /*#__PURE__*/React.createElement(MailerSettings, null), /*#__PURE__*/React.createElement(SchedulerConfigs, null), /*#__PURE__*/React.createElement(TrashBinConfigs, null), /*#__PURE__*/React.createElement(AdvancedContentOrganisation, null), /*#__PURE__*/React.createElement(WebsiteBuilder, null), /*#__PURE__*/React.createElement(WorkflowComponents.App.WorkflowsAdminApp, null), /*#__PURE__*/React.createElement(CmsWorkflows, null), /*#__PURE__*/React.createElement(WebsiteBuilderWorkflows, null), props.children);
|
|
42
36
|
};
|
|
43
37
|
export const Admin = /*#__PURE__*/memo(App);
|
|
44
38
|
|
package/Admin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","
|
|
1
|
+
{"version":3,"names":["React","memo","Admin","BaseAdmin","SystemInstallerProvider","HeadlessCMS","AdminUI","FileManager","GraphQLPlayground","AccessManagement","imagePlugin","fileStorageS3Plugin","createApolloClient","apolloLinks","AuditLogs","LexicalEditorActions","Module","MailerSettings","Websockets","RecordLocking","TrashBinConfigs","AdvancedContentOrganisation","Extension","WebsiteBuilder","SchedulerConfigs","Components","WorkflowComponents","CmsWorkflows","WebsiteBuilderWorkflows","App","props","createLegacyPlugins","container","createElement","WorkflowsAdminApp","children"],"sources":["Admin.tsx"],"sourcesContent":["import React, { memo } from \"react\";\nimport type { AdminProps as BaseAdminProps } from \"@webiny/app-admin\";\nimport { Admin as BaseAdmin, SystemInstallerProvider } from \"@webiny/app-admin\";\nimport { HeadlessCMS } from \"@webiny/app-headless-cms\";\nimport { AdminUI } from \"@webiny/app-admin-ui\";\nimport { FileManager } from \"@webiny/app-file-manager/app.js\";\nimport { GraphQLPlayground } from \"@webiny/app-graphql-playground\";\nimport { AccessManagement } from \"@webiny/app-security-access-management\";\nimport { imagePlugin } from \"@webiny/app/plugins/index.js\";\nimport fileStorageS3Plugin from \"@webiny/app-file-manager-s3\";\nimport { createApolloClient } from \"./apolloClientFactory.js\";\nimport apolloLinks from \"./apolloLinks.js\";\nimport { AuditLogs } from \"@webiny/app-audit-logs\";\nimport { LexicalEditorActions } from \"@webiny/lexical-editor-actions\";\nimport { Module as MailerSettings } from \"@webiny/app-mailer\";\nimport { Websockets } from \"@webiny/app-websockets\";\nimport { RecordLocking } from \"@webiny/app-record-locking\";\nimport { TrashBinConfigs } from \"@webiny/app-trash-bin\";\nimport { AdvancedContentOrganisation } from \"@webiny/app-aco\";\nimport { Extension as WebsiteBuilder } from \"@webiny/app-website-builder/Extension.js\";\nimport { SchedulerConfigs } from \"@webiny/app-headless-cms-scheduler\";\nimport { Components as WorkflowComponents } from \"@webiny/app-workflows\";\nimport { CmsWorkflows } from \"@webiny/app-headless-cms-workflows\";\nimport { WebsiteBuilderWorkflows } from \"@webiny/app-website-builder-workflows\";\nimport { Container } from \"@webiny/di\";\nimport type { PluginCollection } from \"@webiny/plugins/types.js\";\n\nexport interface AdminProps\n extends Omit<BaseAdminProps, \"createApolloClient\" | \"createLegacyPlugins\"> {\n children?: React.ReactNode;\n}\n\nconst App = (props: AdminProps) => {\n const createLegacyPlugins = (container: Container): PluginCollection => {\n return [imagePlugin(), fileStorageS3Plugin(), apolloLinks(container)];\n };\n\n return (\n <BaseAdmin\n createApolloClient={createApolloClient}\n createLegacyPlugins={createLegacyPlugins}\n >\n <AdminUI />\n <AccessManagement />\n <SystemInstallerProvider />\n <FileManager />\n <GraphQLPlayground createApolloClient={createApolloClient} />\n <Websockets />\n <RecordLocking />\n <LexicalEditorActions />\n <HeadlessCMS createApolloClient={createApolloClient} />\n <AuditLogs />\n <MailerSettings />\n <SchedulerConfigs />\n <TrashBinConfigs />\n <AdvancedContentOrganisation />\n <WebsiteBuilder />\n <WorkflowComponents.App.WorkflowsAdminApp />\n <CmsWorkflows />\n <WebsiteBuilderWorkflows />\n {props.children}\n </BaseAdmin>\n );\n};\n\nexport const Admin = memo<AdminProps>(App);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AAEnC,SAASC,KAAK,IAAIC,SAAS,EAAEC,uBAAuB,QAAQ,mBAAmB;AAC/E,SAASC,WAAW,QAAQ,0BAA0B;AACtD,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,SAASC,WAAW,QAAQ,iCAAiC;AAC7D,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,gBAAgB,QAAQ,wCAAwC;AACzE,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,OAAOC,mBAAmB,MAAM,6BAA6B;AAC7D,SAASC,kBAAkB;AAC3B,OAAOC,WAAW;AAClB,SAASC,SAAS,QAAQ,wBAAwB;AAClD,SAASC,oBAAoB,QAAQ,gCAAgC;AACrE,SAASC,MAAM,IAAIC,cAAc,QAAQ,oBAAoB;AAC7D,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,2BAA2B,QAAQ,iBAAiB;AAC7D,SAASC,SAAS,IAAIC,cAAc,QAAQ,0CAA0C;AACtF,SAASC,gBAAgB,QAAQ,oCAAoC;AACrE,SAASC,UAAU,IAAIC,kBAAkB,QAAQ,uBAAuB;AACxE,SAASC,YAAY,QAAQ,oCAAoC;AACjE,SAASC,uBAAuB,QAAQ,uCAAuC;AAS/E,MAAMC,GAAG,GAAIC,KAAiB,IAAK;EAC/B,MAAMC,mBAAmB,GAAIC,SAAoB,IAAuB;IACpE,OAAO,CAACtB,WAAW,CAAC,CAAC,EAAEC,mBAAmB,CAAC,CAAC,EAAEE,WAAW,CAACmB,SAAS,CAAC,CAAC;EACzE,CAAC;EAED,oBACIhC,KAAA,CAAAiC,aAAA,CAAC9B,SAAS;IACNS,kBAAkB,EAAEA,kBAAmB;IACvCmB,mBAAmB,EAAEA;EAAoB,gBAEzC/B,KAAA,CAAAiC,aAAA,CAAC3B,OAAO,MAAE,CAAC,eACXN,KAAA,CAAAiC,aAAA,CAACxB,gBAAgB,MAAE,CAAC,eACpBT,KAAA,CAAAiC,aAAA,CAAC7B,uBAAuB,MAAE,CAAC,eAC3BJ,KAAA,CAAAiC,aAAA,CAAC1B,WAAW,MAAE,CAAC,eACfP,KAAA,CAAAiC,aAAA,CAACzB,iBAAiB;IAACI,kBAAkB,EAAEA;EAAmB,CAAE,CAAC,eAC7DZ,KAAA,CAAAiC,aAAA,CAACf,UAAU,MAAE,CAAC,eACdlB,KAAA,CAAAiC,aAAA,CAACd,aAAa,MAAE,CAAC,eACjBnB,KAAA,CAAAiC,aAAA,CAAClB,oBAAoB,MAAE,CAAC,eACxBf,KAAA,CAAAiC,aAAA,CAAC5B,WAAW;IAACO,kBAAkB,EAAEA;EAAmB,CAAE,CAAC,eACvDZ,KAAA,CAAAiC,aAAA,CAACnB,SAAS,MAAE,CAAC,eACbd,KAAA,CAAAiC,aAAA,CAAChB,cAAc,MAAE,CAAC,eAClBjB,KAAA,CAAAiC,aAAA,CAACT,gBAAgB,MAAE,CAAC,eACpBxB,KAAA,CAAAiC,aAAA,CAACb,eAAe,MAAE,CAAC,eACnBpB,KAAA,CAAAiC,aAAA,CAACZ,2BAA2B,MAAE,CAAC,eAC/BrB,KAAA,CAAAiC,aAAA,CAACV,cAAc,MAAE,CAAC,eAClBvB,KAAA,CAAAiC,aAAA,CAACP,kBAAkB,CAACG,GAAG,CAACK,iBAAiB,MAAE,CAAC,eAC5ClC,KAAA,CAAAiC,aAAA,CAACN,YAAY,MAAE,CAAC,eAChB3B,KAAA,CAAAiC,aAAA,CAACL,uBAAuB,MAAE,CAAC,EAC1BE,KAAK,CAACK,QACA,CAAC;AAEpB,CAAC;AAED,OAAO,MAAMjC,KAAK,gBAAGD,IAAI,CAAa4B,GAAG,CAAC","ignoreList":[]}
|
package/README.md
CHANGED
|
@@ -1,42 +1,11 @@
|
|
|
1
|
-
# @webiny/app-
|
|
2
|
-
[](https://www.npmjs.com/package/@webiny/app-i18n)
|
|
3
|
-
[](https://www.npmjs.com/package/@webiny/app-i18n)
|
|
4
|
-
[](https://github.com/prettier/prettier)
|
|
5
|
-
[](http://makeapullrequest.com)
|
|
1
|
+
# @webiny/app-serverless-cms
|
|
6
2
|
|
|
7
|
-
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> This package is part of the [Webiny](https://www.webiny.com) monorepo.
|
|
5
|
+
> It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
📘 **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
npm install --save @webiny/app-i18n
|
|
14
|
-
```
|
|
9
|
+
---
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
yarn add @webiny/app-i18n
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Setup
|
|
22
|
-
To setup, you must register a set of plugins. For more information on
|
|
23
|
-
plugins, please visit [Webiny documentation](https://docs.webiny.com/docs/developer-tutorials/plugins-crash-course).
|
|
24
|
-
|
|
25
|
-
#### Admin
|
|
26
|
-
```
|
|
27
|
-
import { plugins } from "@webiny/plugins";
|
|
28
|
-
import i18nPlugins from "@webiny/app-i18n/admin/plugins";
|
|
29
|
-
|
|
30
|
-
plugins.register(i18nPlugins);
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Note: the `i18nCmsPlugins` contains plugins for the Page Builder, which will
|
|
34
|
-
enable you to embed i18n in your pages.
|
|
35
|
-
|
|
36
|
-
#### Site
|
|
37
|
-
```
|
|
38
|
-
import { plugins } from "@webiny/plugins";
|
|
39
|
-
import i18nPlugins from "@webiny/app-i18n/site/plugins";
|
|
40
|
-
|
|
41
|
-
plugins.register(i18nPlugins);
|
|
42
|
-
```
|
|
11
|
+
_This README file is automatically generated during the publish process._
|
package/apolloClientFactory.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import ApolloClient from "apollo-client";
|
|
2
2
|
import { ApolloLink } from "apollo-link";
|
|
3
3
|
import { BatchHttpLink } from "apollo-link-batch-http";
|
|
4
|
-
import { InMemoryCache } from "@webiny/app/apollo-client/InMemoryCache";
|
|
4
|
+
import { InMemoryCache } from "@webiny/app/apollo-client/InMemoryCache.js";
|
|
5
5
|
import { plugins } from "@webiny/plugins";
|
|
6
|
-
import { ApolloDynamicLink } from "@webiny/app/plugins/ApolloDynamicLink";
|
|
7
|
-
import { ApolloCacheObjectIdPlugin } from "@webiny/app/plugins/ApolloCacheObjectIdPlugin";
|
|
8
|
-
import { IntrospectionFragmentMatcher } from "@webiny/app/apollo-client/IntrospectionFragmentMatcher";
|
|
6
|
+
import { ApolloDynamicLink } from "@webiny/app/plugins/ApolloDynamicLink.js";
|
|
7
|
+
import { ApolloCacheObjectIdPlugin } from "@webiny/app/plugins/ApolloCacheObjectIdPlugin.js";
|
|
8
|
+
import { IntrospectionFragmentMatcher } from "@webiny/app/apollo-client/IntrospectionFragmentMatcher.js";
|
|
9
9
|
export const createApolloClient = ({
|
|
10
10
|
uri,
|
|
11
11
|
batching
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ApolloClient","ApolloLink","BatchHttpLink","InMemoryCache","plugins","ApolloDynamicLink","ApolloCacheObjectIdPlugin","IntrospectionFragmentMatcher","createApolloClient","uri","batching","fragmentMatcher","introspectionQueryResultData","__schema","types","link","from","credentials","cache","addTypename","dataIdFromObject","obj","getters","byType","type","i","length","id","getObjectId"],"sources":["apolloClientFactory.ts"],"sourcesContent":["import ApolloClient from \"apollo-client\";\nimport { ApolloLink } from \"apollo-link\";\nimport { BatchHttpLink } from \"apollo-link-batch-http\";\nimport { InMemoryCache } from \"@webiny/app/apollo-client/InMemoryCache\";\nimport { plugins } from \"@webiny/plugins\";\nimport { ApolloDynamicLink } from \"@webiny/app/plugins/ApolloDynamicLink\";\nimport { ApolloCacheObjectIdPlugin } from \"@webiny/app/plugins/ApolloCacheObjectIdPlugin\";\nimport { IntrospectionFragmentMatcher } from \"@webiny/app/apollo-client/IntrospectionFragmentMatcher\";\n\nexport interface CreateApolloClientParams {\n uri: string;\n batching?: Pick<BatchHttpLink.Options, \"batchMax\" | \"batchInterval\" | \"batchKey\">;\n}\n\nexport const createApolloClient = ({ uri, batching }: CreateApolloClientParams) => {\n const fragmentMatcher = new IntrospectionFragmentMatcher({\n introspectionQueryResultData: {\n __schema: {\n types: []\n }\n }\n });\n\n return new ApolloClient({\n link: ApolloLink.from([\n /**\n * This will process links from plugins on every request.\n */\n new ApolloDynamicLink(),\n /**\n * This batches requests made to the API to pack multiple requests into a single HTTP request.\n * `credentials: \"include\"` is necessary to attach cookies to requests.\n */\n new BatchHttpLink({ uri, credentials: \"include\", ...batching })\n ]),\n cache: new InMemoryCache({\n addTypename: true,\n fragmentMatcher,\n dataIdFromObject: obj => {\n /**\n * Since every data type coming from API can have a different data structure,\n * we cannot rely on having an `id` field.\n */\n const getters = plugins.byType<ApolloCacheObjectIdPlugin>(\n ApolloCacheObjectIdPlugin.type\n );\n\n for (let i = 0; i < getters.length; i++) {\n const id = getters[i].getObjectId(obj);\n if (typeof id !== \"undefined\") {\n return id;\n }\n }\n\n /**\n * As a fallback, try getting object's `id`.\n */\n return obj.id || null;\n }\n })\n });\n};\n"],"mappings":"AAAA,OAAOA,YAAY,MAAM,eAAe;AACxC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,aAAa,QAAQ,
|
|
1
|
+
{"version":3,"names":["ApolloClient","ApolloLink","BatchHttpLink","InMemoryCache","plugins","ApolloDynamicLink","ApolloCacheObjectIdPlugin","IntrospectionFragmentMatcher","createApolloClient","uri","batching","fragmentMatcher","introspectionQueryResultData","__schema","types","link","from","credentials","cache","addTypename","dataIdFromObject","obj","getters","byType","type","i","length","id","getObjectId"],"sources":["apolloClientFactory.ts"],"sourcesContent":["import ApolloClient from \"apollo-client\";\nimport { ApolloLink } from \"apollo-link\";\nimport { BatchHttpLink } from \"apollo-link-batch-http\";\nimport { InMemoryCache } from \"@webiny/app/apollo-client/InMemoryCache.js\";\nimport { plugins } from \"@webiny/plugins\";\nimport { ApolloDynamicLink } from \"@webiny/app/plugins/ApolloDynamicLink.js\";\nimport { ApolloCacheObjectIdPlugin } from \"@webiny/app/plugins/ApolloCacheObjectIdPlugin.js\";\nimport { IntrospectionFragmentMatcher } from \"@webiny/app/apollo-client/IntrospectionFragmentMatcher.js\";\n\nexport interface CreateApolloClientParams {\n uri: string;\n batching?: Pick<BatchHttpLink.Options, \"batchMax\" | \"batchInterval\" | \"batchKey\">;\n}\n\nexport const createApolloClient = ({ uri, batching }: CreateApolloClientParams) => {\n const fragmentMatcher = new IntrospectionFragmentMatcher({\n introspectionQueryResultData: {\n __schema: {\n types: []\n }\n }\n });\n\n return new ApolloClient({\n link: ApolloLink.from([\n /**\n * This will process links from plugins on every request.\n */\n new ApolloDynamicLink(),\n /**\n * This batches requests made to the API to pack multiple requests into a single HTTP request.\n * `credentials: \"include\"` is necessary to attach cookies to requests.\n */\n new BatchHttpLink({ uri, credentials: \"include\", ...batching })\n ]),\n cache: new InMemoryCache({\n addTypename: true,\n fragmentMatcher,\n dataIdFromObject: obj => {\n /**\n * Since every data type coming from API can have a different data structure,\n * we cannot rely on having an `id` field.\n */\n const getters = plugins.byType<ApolloCacheObjectIdPlugin>(\n ApolloCacheObjectIdPlugin.type\n );\n\n for (let i = 0; i < getters.length; i++) {\n const id = getters[i].getObjectId(obj);\n if (typeof id !== \"undefined\") {\n return id;\n }\n }\n\n /**\n * As a fallback, try getting object's `id`.\n */\n return obj.id || null;\n }\n })\n });\n};\n"],"mappings":"AAAA,OAAOA,YAAY,MAAM,eAAe;AACxC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,aAAa,QAAQ,4CAA4C;AAC1E,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,iBAAiB,QAAQ,0CAA0C;AAC5E,SAASC,yBAAyB,QAAQ,kDAAkD;AAC5F,SAASC,4BAA4B,QAAQ,2DAA2D;AAOxG,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAAEC,GAAG;EAAEC;AAAmC,CAAC,KAAK;EAC/E,MAAMC,eAAe,GAAG,IAAIJ,4BAA4B,CAAC;IACrDK,4BAA4B,EAAE;MAC1BC,QAAQ,EAAE;QACNC,KAAK,EAAE;MACX;IACJ;EACJ,CAAC,CAAC;EAEF,OAAO,IAAId,YAAY,CAAC;IACpBe,IAAI,EAAEd,UAAU,CAACe,IAAI,CAAC;IAClB;AACZ;AACA;IACY,IAAIX,iBAAiB,CAAC,CAAC;IACvB;AACZ;AACA;AACA;IACY,IAAIH,aAAa,CAAC;MAAEO,GAAG;MAAEQ,WAAW,EAAE,SAAS;MAAE,GAAGP;IAAS,CAAC,CAAC,CAClE,CAAC;IACFQ,KAAK,EAAE,IAAIf,aAAa,CAAC;MACrBgB,WAAW,EAAE,IAAI;MACjBR,eAAe;MACfS,gBAAgB,EAAEC,GAAG,IAAI;QACrB;AAChB;AACA;AACA;QACgB,MAAMC,OAAO,GAAGlB,OAAO,CAACmB,MAAM,CAC1BjB,yBAAyB,CAACkB,IAC9B,CAAC;QAED,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,OAAO,CAACI,MAAM,EAAED,CAAC,EAAE,EAAE;UACrC,MAAME,EAAE,GAAGL,OAAO,CAACG,CAAC,CAAC,CAACG,WAAW,CAACP,GAAG,CAAC;UACtC,IAAI,OAAOM,EAAE,KAAK,WAAW,EAAE;YAC3B,OAAOA,EAAE;UACb;QACJ;;QAEA;AAChB;AACA;QACgB,OAAON,GAAG,CAACM,EAAE,IAAI,IAAI;MACzB;IACJ,CAAC;EACL,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
package/apolloLinks.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ConsoleLinkPlugin } from "@webiny/app/plugins/ConsoleLinkPlugin";
|
|
2
|
-
import { NetworkErrorLinkPlugin } from "@webiny/app/plugins/NetworkErrorLinkPlugin";
|
|
3
|
-
import { OmitTypenameLinkPlugin } from "@webiny/app/plugins/OmitTypenameLinkPlugin";
|
|
4
|
-
|
|
1
|
+
import { ConsoleLinkPlugin } from "@webiny/app/plugins/ConsoleLinkPlugin.js";
|
|
2
|
+
import { NetworkErrorLinkPlugin } from "@webiny/app/plugins/NetworkErrorLinkPlugin.js";
|
|
3
|
+
import { OmitTypenameLinkPlugin } from "@webiny/app/plugins/OmitTypenameLinkPlugin.js";
|
|
4
|
+
import { Container } from "@webiny/di";
|
|
5
|
+
declare const _default: (container: Container) => (OmitTypenameLinkPlugin | ConsoleLinkPlugin | NetworkErrorLinkPlugin)[];
|
|
5
6
|
export default _default;
|
package/apolloLinks.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ConsoleLinkPlugin } from "@webiny/app/plugins/ConsoleLinkPlugin";
|
|
2
|
-
import { NetworkErrorLinkPlugin } from "@webiny/app/plugins/NetworkErrorLinkPlugin";
|
|
3
|
-
import { OmitTypenameLinkPlugin } from "@webiny/app/plugins/OmitTypenameLinkPlugin";
|
|
4
|
-
|
|
1
|
+
import { ConsoleLinkPlugin } from "@webiny/app/plugins/ConsoleLinkPlugin.js";
|
|
2
|
+
import { NetworkErrorLinkPlugin } from "@webiny/app/plugins/NetworkErrorLinkPlugin.js";
|
|
3
|
+
import { OmitTypenameLinkPlugin } from "@webiny/app/plugins/OmitTypenameLinkPlugin.js";
|
|
4
|
+
import { EventPublisher } from "@webiny/app/features/eventPublisher/index.js";
|
|
5
|
+
export default container => [
|
|
5
6
|
/**
|
|
6
7
|
* This link removes `__typename` from the variables being sent to the API.
|
|
7
8
|
*/
|
|
@@ -13,6 +14,6 @@ new ConsoleLinkPlugin(),
|
|
|
13
14
|
/**
|
|
14
15
|
* This plugin creates an ApolloLink that checks for `NetworkError` and shows an ErrorOverlay in the browser.
|
|
15
16
|
*/
|
|
16
|
-
new NetworkErrorLinkPlugin()];
|
|
17
|
+
new NetworkErrorLinkPlugin(() => container.resolve(EventPublisher))];
|
|
17
18
|
|
|
18
19
|
//# sourceMappingURL=apolloLinks.js.map
|
package/apolloLinks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ConsoleLinkPlugin","NetworkErrorLinkPlugin","OmitTypenameLinkPlugin"],"sources":["apolloLinks.ts"],"sourcesContent":["import { ConsoleLinkPlugin } from \"@webiny/app/plugins/ConsoleLinkPlugin\";\nimport { NetworkErrorLinkPlugin } from \"@webiny/app/plugins/NetworkErrorLinkPlugin\";\nimport { OmitTypenameLinkPlugin } from \"@webiny/app/plugins/OmitTypenameLinkPlugin\";\n\nexport default [\n /**\n * This link removes `__typename` from the variables being sent to the API.\n */\n new OmitTypenameLinkPlugin(),\n /**\n * This link checks for presence of `extensions.console` in the response and logs all items to browser console.\n */\n new ConsoleLinkPlugin(),\n /**\n * This plugin creates an ApolloLink that checks for `NetworkError` and shows an ErrorOverlay in the browser.\n */\n new NetworkErrorLinkPlugin()\n];\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,
|
|
1
|
+
{"version":3,"names":["ConsoleLinkPlugin","NetworkErrorLinkPlugin","OmitTypenameLinkPlugin","EventPublisher","container","resolve"],"sources":["apolloLinks.ts"],"sourcesContent":["import { ConsoleLinkPlugin } from \"@webiny/app/plugins/ConsoleLinkPlugin.js\";\nimport { NetworkErrorLinkPlugin } from \"@webiny/app/plugins/NetworkErrorLinkPlugin.js\";\nimport { OmitTypenameLinkPlugin } from \"@webiny/app/plugins/OmitTypenameLinkPlugin.js\";\nimport { Container } from \"@webiny/di\";\nimport { EventPublisher } from \"@webiny/app/features/eventPublisher/index.js\";\n\nexport default (container: Container) => [\n /**\n * This link removes `__typename` from the variables being sent to the API.\n */\n new OmitTypenameLinkPlugin(),\n /**\n * This link checks for presence of `extensions.console` in the response and logs all items to browser console.\n */\n new ConsoleLinkPlugin(),\n /**\n * This plugin creates an ApolloLink that checks for `NetworkError` and shows an ErrorOverlay in the browser.\n */\n new NetworkErrorLinkPlugin(() => container.resolve(EventPublisher))\n];\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,0CAA0C;AAC5E,SAASC,sBAAsB,QAAQ,+CAA+C;AACtF,SAASC,sBAAsB,QAAQ,+CAA+C;AAEtF,SAASC,cAAc,QAAQ,8CAA8C;AAE7E,eAAgBC,SAAoB,IAAK;AACrC;AACJ;AACA;AACI,IAAIF,sBAAsB,CAAC,CAAC;AAC5B;AACJ;AACA;AACI,IAAIF,iBAAiB,CAAC,CAAC;AACvB;AACJ;AACA;AACI,IAAIC,sBAAsB,CAAC,MAAMG,SAAS,CAACC,OAAO,CAACF,cAAc,CAAC,CAAC,CACtE","ignoreList":[]}
|
package/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
export { Admin } from "./Admin";
|
|
2
|
-
export type { AdminProps } from "./Admin";
|
|
3
|
-
export { useApp, useWcp, useTags, Dashboard, DashboardRenderer, Layout, LayoutRenderer, LoginScreen, LoginScreenRenderer,
|
|
1
|
+
export { Admin } from "./Admin.js";
|
|
2
|
+
export type { AdminProps } from "./Admin.js";
|
|
3
|
+
export { useApp, useWcp, useTags, Dashboard, DashboardRenderer, Layout, LayoutRenderer, LoginScreen, LoginScreenRenderer, Brand, BrandRenderer, Provider, Compose, CompositionScope, Plugins, Plugin, AdminConfig, makeComposable, makeDecoratable, createComponentPlugin, createProviderPlugin, createDecorator, createProvider, Navigation, NavigationRenderer, Tags, UserMenu, UserMenuHandle, UserMenuHandleRenderer, UserMenuItem, UserMenuItemRenderer, AddGraphQLQuerySelection } from "@webiny/app-admin";
|
|
4
4
|
export type { ComposeProps, HigherOrderComponent, Decorator, ProviderProps, LayoutProps, LoginScreenProps } from "@webiny/app-admin";
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export
|
|
8
|
-
export { IsTenant, IsRootTenant, IsNotRootTenant, useCurrentTenant } from "@webiny/app-tenant-manager";
|
|
9
|
-
export * from "./apolloClientFactory";
|
|
5
|
+
export { useTenantContext } from "@webiny/app-admin";
|
|
6
|
+
export type { Tenant } from "@webiny/app-admin";
|
|
7
|
+
export * from "./apolloClientFactory.js";
|
package/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
export { Admin } from "./Admin";
|
|
2
|
-
export { useApp, useWcp, useTags, Dashboard, DashboardRenderer, Layout, LayoutRenderer, LoginScreen, LoginScreenRenderer,
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export { IsTenant, IsRootTenant, IsNotRootTenant, useCurrentTenant } from "@webiny/app-tenant-manager";
|
|
6
|
-
export * from "./apolloClientFactory";
|
|
1
|
+
export { Admin } from "./Admin.js";
|
|
2
|
+
export { useApp, useWcp, useTags, Dashboard, DashboardRenderer, Layout, LayoutRenderer, LoginScreen, LoginScreenRenderer, Brand, BrandRenderer, Provider, Compose, CompositionScope, Plugins, Plugin, AdminConfig, makeComposable, makeDecoratable, createComponentPlugin, createProviderPlugin, createDecorator, createProvider, Navigation, NavigationRenderer, Tags, UserMenu, UserMenuHandle, UserMenuHandleRenderer, UserMenuItem, UserMenuItemRenderer, AddGraphQLQuerySelection } from "@webiny/app-admin";
|
|
3
|
+
export { useTenantContext } from "@webiny/app-admin";
|
|
4
|
+
export * from "./apolloClientFactory.js";
|
|
7
5
|
|
|
8
6
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Admin","useApp","useWcp","useTags","Dashboard","DashboardRenderer","Layout","LayoutRenderer","LoginScreen","LoginScreenRenderer","
|
|
1
|
+
{"version":3,"names":["Admin","useApp","useWcp","useTags","Dashboard","DashboardRenderer","Layout","LayoutRenderer","LoginScreen","LoginScreenRenderer","Brand","BrandRenderer","Provider","Compose","CompositionScope","Plugins","Plugin","AdminConfig","makeComposable","makeDecoratable","createComponentPlugin","createProviderPlugin","createDecorator","createProvider","Navigation","NavigationRenderer","Tags","UserMenu","UserMenuHandle","UserMenuHandleRenderer","UserMenuItem","UserMenuItemRenderer","AddGraphQLQuerySelection","useTenantContext"],"sources":["index.tsx"],"sourcesContent":["export { Admin } from \"./Admin.js\";\nexport type { AdminProps } from \"./Admin.js\";\nexport {\n useApp,\n useWcp,\n useTags,\n Dashboard,\n DashboardRenderer,\n Layout,\n LayoutRenderer,\n LoginScreen,\n LoginScreenRenderer,\n Brand,\n BrandRenderer,\n Provider,\n Compose,\n CompositionScope,\n Plugins,\n Plugin,\n AdminConfig,\n makeComposable,\n makeDecoratable,\n createComponentPlugin,\n createProviderPlugin,\n createDecorator,\n createProvider,\n Navigation,\n NavigationRenderer,\n Tags,\n UserMenu,\n UserMenuHandle,\n UserMenuHandleRenderer,\n UserMenuItem,\n UserMenuItemRenderer,\n AddGraphQLQuerySelection\n} from \"@webiny/app-admin\";\nexport type {\n ComposeProps,\n HigherOrderComponent,\n Decorator,\n ProviderProps,\n LayoutProps,\n LoginScreenProps\n} from \"@webiny/app-admin\";\n\nexport { useTenantContext } from \"@webiny/app-admin\";\nexport type { Tenant } from \"@webiny/app-admin\";\n\nexport * from \"./apolloClientFactory.js\";\n"],"mappings":"AAAA,SAASA,KAAK;AAEd,SACIC,MAAM,EACNC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,iBAAiB,EACjBC,MAAM,EACNC,cAAc,EACdC,WAAW,EACXC,mBAAmB,EACnBC,KAAK,EACLC,aAAa,EACbC,QAAQ,EACRC,OAAO,EACPC,gBAAgB,EAChBC,OAAO,EACPC,MAAM,EACNC,WAAW,EACXC,cAAc,EACdC,eAAe,EACfC,qBAAqB,EACrBC,oBAAoB,EACpBC,eAAe,EACfC,cAAc,EACdC,UAAU,EACVC,kBAAkB,EAClBC,IAAI,EACJC,QAAQ,EACRC,cAAc,EACdC,sBAAsB,EACtBC,YAAY,EACZC,oBAAoB,EACpBC,wBAAwB,QACrB,mBAAmB;AAU1B,SAASC,gBAAgB,QAAQ,mBAAmB;AAGpD","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-serverless-cms",
|
|
3
|
-
"version": "6.0.0-
|
|
3
|
+
"version": "6.0.0-rc.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"main": "index.js",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
@@ -10,31 +11,29 @@
|
|
|
10
11
|
"license": "MIT",
|
|
11
12
|
"dependencies": {
|
|
12
13
|
"@emotion/react": "11.10.8",
|
|
13
|
-
"@webiny/app": "6.0.0-
|
|
14
|
-
"@webiny/app-aco": "6.0.0-
|
|
15
|
-
"@webiny/app-admin": "6.0.0-
|
|
16
|
-
"@webiny/app-admin-ui": "6.0.0-
|
|
17
|
-
"@webiny/app-
|
|
18
|
-
"@webiny/app-
|
|
19
|
-
"@webiny/app-file-manager": "6.0.0-
|
|
20
|
-
"@webiny/app-
|
|
21
|
-
"@webiny/app-
|
|
22
|
-
"@webiny/app-headless-cms": "6.0.0-
|
|
23
|
-
"@webiny/app-headless-cms-
|
|
24
|
-
"@webiny/app-
|
|
25
|
-
"@webiny/app-
|
|
26
|
-
"@webiny/app-
|
|
27
|
-
"@webiny/app-
|
|
28
|
-
"@webiny/app-
|
|
29
|
-
"@webiny/app-
|
|
30
|
-
"@webiny/app-
|
|
31
|
-
"@webiny/app-
|
|
32
|
-
"@webiny/
|
|
33
|
-
"@webiny/
|
|
34
|
-
"@webiny/
|
|
35
|
-
"@webiny/
|
|
36
|
-
"@webiny/lexical-theme": "6.0.0-alpha.5",
|
|
37
|
-
"@webiny/plugins": "6.0.0-alpha.5",
|
|
14
|
+
"@webiny/app": "6.0.0-rc.0",
|
|
15
|
+
"@webiny/app-aco": "6.0.0-rc.0",
|
|
16
|
+
"@webiny/app-admin": "6.0.0-rc.0",
|
|
17
|
+
"@webiny/app-admin-ui": "6.0.0-rc.0",
|
|
18
|
+
"@webiny/app-audit-logs": "6.0.0-rc.0",
|
|
19
|
+
"@webiny/app-file-manager": "6.0.0-rc.0",
|
|
20
|
+
"@webiny/app-file-manager-s3": "6.0.0-rc.0",
|
|
21
|
+
"@webiny/app-graphql-playground": "6.0.0-rc.0",
|
|
22
|
+
"@webiny/app-headless-cms": "6.0.0-rc.0",
|
|
23
|
+
"@webiny/app-headless-cms-scheduler": "6.0.0-rc.0",
|
|
24
|
+
"@webiny/app-headless-cms-workflows": "6.0.0-rc.0",
|
|
25
|
+
"@webiny/app-mailer": "6.0.0-rc.0",
|
|
26
|
+
"@webiny/app-record-locking": "6.0.0-rc.0",
|
|
27
|
+
"@webiny/app-security-access-management": "6.0.0-rc.0",
|
|
28
|
+
"@webiny/app-trash-bin": "6.0.0-rc.0",
|
|
29
|
+
"@webiny/app-website-builder": "6.0.0-rc.0",
|
|
30
|
+
"@webiny/app-website-builder-workflows": "6.0.0-rc.0",
|
|
31
|
+
"@webiny/app-websockets": "6.0.0-rc.0",
|
|
32
|
+
"@webiny/app-workflows": "6.0.0-rc.0",
|
|
33
|
+
"@webiny/di": "0.2.3",
|
|
34
|
+
"@webiny/lexical-editor-actions": "6.0.0-rc.0",
|
|
35
|
+
"@webiny/lexical-theme": "6.0.0-rc.0",
|
|
36
|
+
"@webiny/plugins": "6.0.0-rc.0",
|
|
38
37
|
"apollo-cache": "1.3.5",
|
|
39
38
|
"apollo-client": "2.6.10",
|
|
40
39
|
"apollo-link": "1.2.14",
|
|
@@ -44,19 +43,15 @@
|
|
|
44
43
|
"react-dom": "18.2.0"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
|
-
"@emotion/babel-plugin": "11.
|
|
48
|
-
"@webiny/
|
|
49
|
-
"rimraf": "6.
|
|
50
|
-
"typescript": "5.
|
|
46
|
+
"@emotion/babel-plugin": "11.13.5",
|
|
47
|
+
"@webiny/build-tools": "6.0.0-rc.0",
|
|
48
|
+
"rimraf": "6.1.3",
|
|
49
|
+
"typescript": "5.9.3"
|
|
51
50
|
},
|
|
52
51
|
"publishConfig": {
|
|
53
52
|
"access": "public",
|
|
54
53
|
"directory": "dist"
|
|
55
54
|
},
|
|
56
|
-
"scripts": {
|
|
57
|
-
"build": "node ../cli/bin.js run build",
|
|
58
|
-
"watch": "node ../cli/bin.js run watch"
|
|
59
|
-
},
|
|
60
55
|
"svgo": {
|
|
61
56
|
"plugins": {
|
|
62
57
|
"removeViewBox": false
|
|
@@ -69,5 +64,5 @@
|
|
|
69
64
|
]
|
|
70
65
|
}
|
|
71
66
|
},
|
|
72
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "0f2aa699f4642e550ab62c96fcd050e8d02345c9"
|
|
73
68
|
}
|
package/styles.scss
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
// Import `app-admin-ui` styles
|
|
2
|
-
@
|
|
2
|
+
@use "~@webiny/app-admin-ui/styles.scss" as *;
|
|
3
3
|
|
|
4
4
|
// Import `ui` styles
|
|
5
5
|
// ⚠️ DEPRECATED but needed for backward compatibility ⚠️
|
|
6
|
-
@
|
|
7
|
-
|
|
8
|
-
// Import `RichTextEditor` styles
|
|
9
|
-
@import "~@webiny/app-admin/components/RichTextEditor/styles.scss";
|
|
10
|
-
@import "~@webiny/app-admin/components/RichTextEditor/tools/header/styles.scss";
|
|
11
|
-
@import "~@webiny/app-admin/components/RichTextEditor/tools/paragraph/styles.scss";
|
|
12
|
-
@import "~@webiny/app-admin/components/RichTextEditor/tools/textColor/styles.scss";
|
|
13
|
-
@import "~@webiny/app-admin/components/RichTextEditor/tools/image/styles.scss";
|
|
6
|
+
@use "~@webiny/ui/styles.scss" as *;
|
|
14
7
|
|
|
15
8
|
// Import Lexical theme styles
|
|
16
|
-
@import "
|
|
9
|
+
@import "@webiny/lexical-theme/theme.css";
|