@webiny/app-headless-cms 6.0.0 → 6.1.0-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/admin/components/ContentEntries/SidebarFooter/SidebarFooter.js +1 -3
- package/admin/components/ContentEntries/SidebarFooter/SidebarFooter.js.map +1 -1
- package/admin/components/ContentEntryForm/ContentEntryForm.d.ts +1 -1
- package/admin/components/ContentEntryForm/ContentEntryForm.js.map +1 -1
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js +8 -2
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js.map +1 -1
- package/admin/components/ContentEntryForm/ContentEntryFormProvider.d.ts +2 -2
- package/admin/components/ContentEntryForm/ContentEntryFormProvider.js +31 -7
- package/admin/components/ContentEntryForm/ContentEntryFormProvider.js.map +1 -1
- package/admin/components/ContentEntryForm/Header/SaveContent/SaveContent.js +7 -4
- package/admin/components/ContentEntryForm/Header/SaveContent/SaveContent.js.map +1 -1
- package/admin/components/ContentEntryForm/ParentValue.js +1 -1
- package/admin/components/ContentEntryForm/ParentValue.js.map +1 -1
- package/admin/components/ContentModelEditor/ContentModelEditor.js +22 -5
- package/admin/components/ContentModelEditor/ContentModelEditor.js.map +1 -1
- package/admin/components/ContentModelEditor/FieldsSidebar.js +6 -2
- package/admin/components/ContentModelEditor/FieldsSidebar.js.map +1 -1
- package/admin/components/DragPreview.js +4 -2
- package/admin/components/DragPreview.js.map +1 -1
- package/admin/components/DropZone/Center.js +4 -2
- package/admin/components/DropZone/Center.js.map +1 -1
- package/admin/components/DropZone/Horizontal.js +3 -1
- package/admin/components/DropZone/Horizontal.js.map +1 -1
- package/admin/components/DropZone/Vertical.js +3 -1
- package/admin/components/DropZone/Vertical.js.map +1 -1
- package/admin/components/FieldEditor/FieldEditor.js +9 -3
- package/admin/components/FieldEditor/FieldEditor.js.map +1 -1
- package/admin/components/IsModelPublishable.js +3 -6
- package/admin/components/IsModelPublishable.js.map +1 -1
- package/admin/hooks/useIsModelPublishable.d.ts +1 -0
- package/admin/hooks/useIsModelPublishable.js +10 -0
- package/admin/hooks/useIsModelPublishable.js.map +1 -0
- package/admin/menus/HasContentEntryPermissions.d.ts +2 -2
- package/admin/menus/HasContentEntryPermissions.js.map +1 -1
- package/admin/plugins/editor/defaultBar/Name/Name.js +1 -5
- package/admin/plugins/editor/defaultBar/Name/Name.js.map +1 -1
- package/admin/plugins/fieldRenderers/DynamicSection.d.ts +1 -1
- package/admin/plugins/fieldRenderers/DynamicSection.js +1 -1
- package/admin/plugins/fieldRenderers/DynamicSection.js.map +1 -1
- package/admin/plugins/fieldRenderers/dynamicZone/MultiValueDynamicZone.d.ts +2 -2
- package/admin/plugins/fieldRenderers/dynamicZone/MultiValueDynamicZone.js.map +1 -1
- package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.d.ts +2 -2
- package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.js +1 -1
- package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.js.map +1 -1
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateIcon.d.ts +1 -1
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateIcon.js.map +1 -1
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.d.ts +1 -1
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.js +1 -1
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.js.map +1 -1
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/elements/ButtonLink.js +2 -2
- package/admin/plugins/fieldRenderers/ref/advanced/components/entry/elements/ButtonLink.js.map +1 -1
- package/admin/plugins/fieldRenderers/ref/components/NewReferencedEntryDialog.js +8 -2
- package/admin/plugins/fieldRenderers/ref/components/NewReferencedEntryDialog.js.map +1 -1
- package/admin/plugins/icons.js +13 -12
- package/admin/plugins/icons.js.map +1 -1
- package/admin/views/contentEntries/ContentEntriesModule.js +1 -5
- package/admin/views/contentEntries/ContentEntriesModule.js.map +1 -1
- package/admin/views/contentEntries/ContentEntry/FullScreenContentEntry/FullScreenContentEntry.js +2 -9
- package/admin/views/contentEntries/ContentEntry/FullScreenContentEntry/FullScreenContentEntry.js.map +1 -1
- package/admin/views/contentEntries/ContentEntry/FullScreenContentEntry/RevisionListDrawer/RevisionListDrawer.js +1 -2
- package/admin/views/contentEntries/ContentEntry/FullScreenContentEntry/RevisionListDrawer/RevisionListDrawer.js.map +1 -1
- package/admin/views/contentModels/ContentModelsDataList.js +4 -5
- package/admin/views/contentModels/ContentModelsDataList.js.map +1 -1
- package/admin/views/contentModels/fullDelete/FullyDeleteModelDialog.d.ts +1 -1
- package/admin/views/contentModels/fullDelete/FullyDeleteModelDialog.js +2 -2
- package/admin/views/contentModels/fullDelete/FullyDeleteModelDialog.js.map +1 -1
- package/admin/views/contentModels/fullDelete/dialog/state.d.ts +3 -3
- package/admin/views/contentModels/fullDelete/dialog/state.js +13 -9
- package/admin/views/contentModels/fullDelete/dialog/state.js.map +1 -1
- package/admin/views/contentModels/fullDelete/types.d.ts +1 -1
- package/admin/views/contentModels/fullDelete/types.js.map +1 -1
- package/admin/views/contentModels/importing/components/Model/DataListModelItem.js +10 -10
- package/admin/views/contentModels/importing/components/Model/DataListModelItem.js.map +1 -1
- package/package.json +38 -40
- package/admin/components/ContentEntries/Scheduler/actions/ScheduleEntryAction.d.ts +0 -2
- package/admin/components/ContentEntries/Scheduler/actions/ScheduleEntryAction.js +0 -82
- package/admin/components/ContentEntries/Scheduler/actions/ScheduleEntryAction.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/actions/hooks/useGetSchedulerItem.d.ts +0 -11
- package/admin/components/ContentEntries/Scheduler/actions/hooks/useGetSchedulerItem.js +0 -35
- package/admin/components/ContentEntries/Scheduler/actions/hooks/useGetSchedulerItem.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerCancelGraphQLGateway.d.ts +0 -7
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerCancelGraphQLGateway.js +0 -46
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerCancelGraphQLGateway.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerGetGraphQLGateway.d.ts +0 -20
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerGetGraphQLGateway.js +0 -69
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerGetGraphQLGateway.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerListGraphQLGateway.d.ts +0 -7
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerListGraphQLGateway.js +0 -86
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerListGraphQLGateway.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerPublishGraphQLGateway.d.ts +0 -7
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerPublishGraphQLGateway.js +0 -65
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerPublishGraphQLGateway.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerUnpublishGraphQLGateway.d.ts +0 -23
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerUnpublishGraphQLGateway.js +0 -67
- package/admin/components/ContentEntries/Scheduler/adapters/SchedulerUnpublishGraphQLGateway.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/adapters/graphql/fields.d.ts +0 -1
- package/admin/components/ContentEntries/Scheduler/adapters/graphql/fields.js +0 -20
- package/admin/components/ContentEntries/Scheduler/adapters/graphql/fields.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/adapters/index.d.ts +0 -5
- package/admin/components/ContentEntries/Scheduler/adapters/index.js +0 -7
- package/admin/components/ContentEntries/Scheduler/adapters/index.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/adapters/schema/schedulerEntry.d.ts +0 -61
- package/admin/components/ContentEntries/Scheduler/adapters/schema/schedulerEntry.js +0 -26
- package/admin/components/ContentEntries/Scheduler/adapters/schema/schedulerEntry.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/components/ScheduleSidebarButton.d.ts +0 -5
- package/admin/components/ContentEntries/Scheduler/components/ScheduleSidebarButton.js +0 -17
- package/admin/components/ContentEntries/Scheduler/components/ScheduleSidebarButton.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/components/Scheduler.d.ts +0 -2
- package/admin/components/ContentEntries/Scheduler/components/Scheduler.js +0 -54
- package/admin/components/ContentEntries/Scheduler/components/Scheduler.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/components/index.d.ts +0 -1
- package/admin/components/ContentEntries/Scheduler/components/index.js +0 -3
- package/admin/components/ContentEntries/Scheduler/components/index.js.map +0 -1
- package/admin/components/ContentEntries/Scheduler/index.d.ts +0 -1
- package/admin/components/ContentEntries/Scheduler/index.js +0 -3
- package/admin/components/ContentEntries/Scheduler/index.js.map +0 -1
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export const createSchedulerEntryFields = () => {
|
|
2
|
-
return `
|
|
3
|
-
id
|
|
4
|
-
targetId
|
|
5
|
-
model {
|
|
6
|
-
modelId
|
|
7
|
-
}
|
|
8
|
-
scheduledBy {
|
|
9
|
-
id
|
|
10
|
-
displayName
|
|
11
|
-
type
|
|
12
|
-
}
|
|
13
|
-
publishOn
|
|
14
|
-
unpublishOn
|
|
15
|
-
type
|
|
16
|
-
title
|
|
17
|
-
`;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=fields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createSchedulerEntryFields"],"sources":["fields.ts"],"sourcesContent":["export const createSchedulerEntryFields = (): string => {\n return `\n id\n targetId\n model {\n modelId\n }\n scheduledBy {\n id\n displayName\n type\n }\n publishOn\n unpublishOn\n type\n title\n `;\n};\n"],"mappings":"AAAA,OAAO,MAAMA,0BAA0B,GAAGA,CAAA,KAAc;EACpD,OAAO;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from "./SchedulerCancelGraphQLGateway.js";
|
|
2
|
-
export * from "./SchedulerGetGraphQLGateway.js";
|
|
3
|
-
export * from "./SchedulerListGraphQLGateway.js";
|
|
4
|
-
export * from "./SchedulerPublishGraphQLGateway.js";
|
|
5
|
-
export * from "./SchedulerUnpublishGraphQLGateway.js";
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SchedulerCancelGraphQLGateway.js\";\nexport * from \"./SchedulerGetGraphQLGateway.js\";\nexport * from \"./SchedulerListGraphQLGateway.js\";\nexport * from \"./SchedulerPublishGraphQLGateway.js\";\nexport * from \"./SchedulerUnpublishGraphQLGateway.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { CmsModel } from "@webiny/app-headless-cms-common/types/model.js";
|
|
2
|
-
import zod from "zod";
|
|
3
|
-
import { ScheduleType } from "@webiny/app-headless-cms-scheduler/types.js";
|
|
4
|
-
export declare const schedulerEntrySchema: zod.ZodObject<{
|
|
5
|
-
id: zod.ZodString;
|
|
6
|
-
targetId: zod.ZodString;
|
|
7
|
-
model: zod.ZodEffects<zod.ZodObject<{
|
|
8
|
-
modelId: zod.ZodString;
|
|
9
|
-
}, "strip", zod.ZodTypeAny, {
|
|
10
|
-
modelId: string;
|
|
11
|
-
}, {
|
|
12
|
-
modelId: string;
|
|
13
|
-
}>, Pick<CmsModel, "modelId">, {
|
|
14
|
-
modelId: string;
|
|
15
|
-
}>;
|
|
16
|
-
scheduledBy: zod.ZodObject<{
|
|
17
|
-
id: zod.ZodString;
|
|
18
|
-
displayName: zod.ZodString;
|
|
19
|
-
type: zod.ZodString;
|
|
20
|
-
}, "strip", zod.ZodTypeAny, {
|
|
21
|
-
id: string;
|
|
22
|
-
displayName: string;
|
|
23
|
-
type: string;
|
|
24
|
-
}, {
|
|
25
|
-
id: string;
|
|
26
|
-
displayName: string;
|
|
27
|
-
type: string;
|
|
28
|
-
}>;
|
|
29
|
-
publishOn: zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodString>>, Date | undefined, string | null | undefined>;
|
|
30
|
-
unpublishOn: zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodString>>, Date | undefined, string | null | undefined>;
|
|
31
|
-
type: zod.ZodNativeEnum<typeof ScheduleType>;
|
|
32
|
-
title: zod.ZodString;
|
|
33
|
-
}, "strip", zod.ZodTypeAny, {
|
|
34
|
-
model: Pick<CmsModel, "modelId">;
|
|
35
|
-
id: string;
|
|
36
|
-
title: string;
|
|
37
|
-
type: ScheduleType;
|
|
38
|
-
targetId: string;
|
|
39
|
-
scheduledBy: {
|
|
40
|
-
id: string;
|
|
41
|
-
displayName: string;
|
|
42
|
-
type: string;
|
|
43
|
-
};
|
|
44
|
-
publishOn?: Date | undefined;
|
|
45
|
-
unpublishOn?: Date | undefined;
|
|
46
|
-
}, {
|
|
47
|
-
model: {
|
|
48
|
-
modelId: string;
|
|
49
|
-
};
|
|
50
|
-
id: string;
|
|
51
|
-
title: string;
|
|
52
|
-
type: ScheduleType;
|
|
53
|
-
targetId: string;
|
|
54
|
-
scheduledBy: {
|
|
55
|
-
id: string;
|
|
56
|
-
displayName: string;
|
|
57
|
-
type: string;
|
|
58
|
-
};
|
|
59
|
-
publishOn?: string | null | undefined;
|
|
60
|
-
unpublishOn?: string | null | undefined;
|
|
61
|
-
}>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import zod from "zod";
|
|
2
|
-
import { ScheduleType } from "@webiny/app-headless-cms-scheduler/types.js";
|
|
3
|
-
export const schedulerEntrySchema = zod.object({
|
|
4
|
-
id: zod.string(),
|
|
5
|
-
targetId: zod.string(),
|
|
6
|
-
model: zod.object({
|
|
7
|
-
modelId: zod.string()
|
|
8
|
-
}).transform(value => {
|
|
9
|
-
return value;
|
|
10
|
-
}),
|
|
11
|
-
scheduledBy: zod.object({
|
|
12
|
-
id: zod.string(),
|
|
13
|
-
displayName: zod.string(),
|
|
14
|
-
type: zod.string()
|
|
15
|
-
}),
|
|
16
|
-
publishOn: zod.string().nullable().optional().transform(value => {
|
|
17
|
-
return !!value ? new Date(value) : undefined;
|
|
18
|
-
}),
|
|
19
|
-
unpublishOn: zod.string().nullable().optional().transform(value => {
|
|
20
|
-
return !!value ? new Date(value) : undefined;
|
|
21
|
-
}),
|
|
22
|
-
type: zod.nativeEnum(ScheduleType),
|
|
23
|
-
title: zod.string()
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=schedulerEntry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["zod","ScheduleType","schedulerEntrySchema","object","id","string","targetId","model","modelId","transform","value","scheduledBy","displayName","type","publishOn","nullable","optional","Date","undefined","unpublishOn","nativeEnum","title"],"sources":["schedulerEntry.ts"],"sourcesContent":["import type { CmsModel } from \"@webiny/app-headless-cms-common/types/model.js\";\nimport zod from \"zod\";\nimport { ScheduleType } from \"@webiny/app-headless-cms-scheduler/types.js\";\n\nexport const schedulerEntrySchema = zod.object({\n id: zod.string(),\n targetId: zod.string(),\n model: zod\n .object({\n modelId: zod.string()\n })\n .transform(value => {\n return value as unknown as Pick<CmsModel, \"modelId\">;\n }),\n scheduledBy: zod.object({\n id: zod.string(),\n displayName: zod.string(),\n type: zod.string()\n }),\n publishOn: zod\n .string()\n .nullable()\n .optional()\n .transform(value => {\n return !!value ? new Date(value) : undefined;\n }),\n unpublishOn: zod\n .string()\n .nullable()\n .optional()\n .transform(value => {\n return !!value ? new Date(value) : undefined;\n }),\n type: zod.nativeEnum(ScheduleType),\n title: zod.string()\n});\n"],"mappings":"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|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Sidebar } from "@webiny/admin-ui";
|
|
3
|
-
import { ReactComponent as ScheduleIcon } from "@webiny/icons/cell_tower.svg";
|
|
4
|
-
export const SchedulerButton = props => {
|
|
5
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
-
className: "list-none"
|
|
7
|
-
}, /*#__PURE__*/React.createElement(Sidebar.Item, {
|
|
8
|
-
onClick: props.onClick,
|
|
9
|
-
text: "Schedule",
|
|
10
|
-
icon: /*#__PURE__*/React.createElement(Sidebar.Item.Icon, {
|
|
11
|
-
element: /*#__PURE__*/React.createElement(ScheduleIcon, null),
|
|
12
|
-
label: "Schedule"
|
|
13
|
-
})
|
|
14
|
-
}));
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=ScheduleSidebarButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Sidebar","ReactComponent","ScheduleIcon","SchedulerButton","props","createElement","className","Item","onClick","text","icon","Icon","element","label"],"sources":["ScheduleSidebarButton.tsx"],"sourcesContent":["import React from \"react\";\nimport { Sidebar } from \"@webiny/admin-ui\";\nimport { ReactComponent as ScheduleIcon } from \"@webiny/icons/cell_tower.svg\";\n\nexport interface ScheduleButtonProps {\n onClick: () => void;\n}\n\nexport const SchedulerButton = (props: ScheduleButtonProps) => {\n return (\n <div className={\"list-none\"}>\n <Sidebar.Item\n onClick={props.onClick}\n text={\"Schedule\"}\n icon={<Sidebar.Item.Icon element={<ScheduleIcon />} label={\"Schedule\"} />}\n />\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,cAAc,IAAIC,YAAY,QAAQ,8BAA8B;AAM7E,OAAO,MAAMC,eAAe,GAAIC,KAA0B,IAAK;EAC3D,oBACIL,KAAA,CAAAM,aAAA;IAAKC,SAAS,EAAE;EAAY,gBACxBP,KAAA,CAAAM,aAAA,CAACL,OAAO,CAACO,IAAI;IACTC,OAAO,EAAEJ,KAAK,CAACI,OAAQ;IACvBC,IAAI,EAAE,UAAW;IACjBC,IAAI,eAAEX,KAAA,CAAAM,aAAA,CAACL,OAAO,CAACO,IAAI,CAACI,IAAI;MAACC,OAAO,eAAEb,KAAA,CAAAM,aAAA,CAACH,YAAY,MAAE,CAAE;MAACW,KAAK,EAAE;IAAW,CAAE;EAAE,CAC7E,CACA,CAAC;AAEd,CAAC","ignoreList":[]}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from "react";
|
|
2
|
-
import { SchedulerGetGraphQLGateway } from "../adapters/SchedulerGetGraphQLGateway.js";
|
|
3
|
-
import { SchedulerListGraphQLGateway } from "../adapters/SchedulerListGraphQLGateway.js";
|
|
4
|
-
import { SchedulerCancelGraphQLGateway } from "../adapters/SchedulerCancelGraphQLGateway.js";
|
|
5
|
-
import { SchedulerPublishGraphQLGateway } from "../adapters/SchedulerPublishGraphQLGateway.js";
|
|
6
|
-
import { SchedulerUnpublishGraphQLGateway } from "../adapters/SchedulerUnpublishGraphQLGateway.js";
|
|
7
|
-
import { useApolloClient, useModel, usePermission } from "../../../../hooks/index.js";
|
|
8
|
-
import { SchedulerButton } from "./ScheduleSidebarButton.js";
|
|
9
|
-
import { Scheduler as BaseScheduler } from "@webiny/app-headless-cms-scheduler";
|
|
10
|
-
export const Scheduler = () => {
|
|
11
|
-
const client = useApolloClient();
|
|
12
|
-
const {
|
|
13
|
-
canPublish,
|
|
14
|
-
canUnpublish
|
|
15
|
-
} = usePermission();
|
|
16
|
-
const {
|
|
17
|
-
model
|
|
18
|
-
} = useModel();
|
|
19
|
-
const getGateway = useMemo(() => {
|
|
20
|
-
return new SchedulerGetGraphQLGateway(client);
|
|
21
|
-
}, [client]);
|
|
22
|
-
const listGateway = useMemo(() => {
|
|
23
|
-
return new SchedulerListGraphQLGateway(client);
|
|
24
|
-
}, [client]);
|
|
25
|
-
const cancelGateway = useMemo(() => {
|
|
26
|
-
return new SchedulerCancelGraphQLGateway(client);
|
|
27
|
-
}, [client]);
|
|
28
|
-
const publishGateway = useMemo(() => {
|
|
29
|
-
return new SchedulerPublishGraphQLGateway(client);
|
|
30
|
-
}, [client]);
|
|
31
|
-
const unpublishGateway = useMemo(() => {
|
|
32
|
-
return new SchedulerUnpublishGraphQLGateway(client);
|
|
33
|
-
}, [client]);
|
|
34
|
-
if (!canPublish("cms.contentEntry") && !canUnpublish("cms.contentEntry")) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
return /*#__PURE__*/React.createElement(BaseScheduler, {
|
|
38
|
-
model: model,
|
|
39
|
-
render: ({
|
|
40
|
-
showScheduler
|
|
41
|
-
}) => {
|
|
42
|
-
return /*#__PURE__*/React.createElement(SchedulerButton, {
|
|
43
|
-
onClick: showScheduler
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
getGateway: getGateway,
|
|
47
|
-
listGateway: listGateway,
|
|
48
|
-
cancelGateway: cancelGateway,
|
|
49
|
-
publishGateway: publishGateway,
|
|
50
|
-
unpublishGateway: unpublishGateway
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
//# sourceMappingURL=Scheduler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","SchedulerGetGraphQLGateway","SchedulerListGraphQLGateway","SchedulerCancelGraphQLGateway","SchedulerPublishGraphQLGateway","SchedulerUnpublishGraphQLGateway","useApolloClient","useModel","usePermission","SchedulerButton","Scheduler","BaseScheduler","client","canPublish","canUnpublish","model","getGateway","listGateway","cancelGateway","publishGateway","unpublishGateway","createElement","render","showScheduler","onClick"],"sources":["Scheduler.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { SchedulerGetGraphQLGateway } from \"../adapters/SchedulerGetGraphQLGateway.js\";\nimport { SchedulerListGraphQLGateway } from \"../adapters/SchedulerListGraphQLGateway.js\";\nimport { SchedulerCancelGraphQLGateway } from \"../adapters/SchedulerCancelGraphQLGateway.js\";\nimport { SchedulerPublishGraphQLGateway } from \"../adapters/SchedulerPublishGraphQLGateway.js\";\nimport { SchedulerUnpublishGraphQLGateway } from \"../adapters/SchedulerUnpublishGraphQLGateway.js\";\nimport { useApolloClient, useModel, usePermission } from \"~/admin/hooks/index.js\";\nimport { SchedulerButton } from \"./ScheduleSidebarButton.js\";\nimport { Scheduler as BaseScheduler } from \"@webiny/app-headless-cms-scheduler\";\n\nexport const Scheduler = () => {\n const client = useApolloClient();\n const { canPublish, canUnpublish } = usePermission();\n const { model } = useModel();\n\n const getGateway = useMemo(() => {\n return new SchedulerGetGraphQLGateway(client);\n }, [client]);\n\n const listGateway = useMemo(() => {\n return new SchedulerListGraphQLGateway(client);\n }, [client]);\n\n const cancelGateway = useMemo(() => {\n return new SchedulerCancelGraphQLGateway(client);\n }, [client]);\n\n const publishGateway = useMemo(() => {\n return new SchedulerPublishGraphQLGateway(client);\n }, [client]);\n\n const unpublishGateway = useMemo(() => {\n return new SchedulerUnpublishGraphQLGateway(client);\n }, [client]);\n\n if (!canPublish(\"cms.contentEntry\") && !canUnpublish(\"cms.contentEntry\")) {\n return null;\n }\n\n return (\n <BaseScheduler\n model={model}\n render={({ showScheduler }) => {\n return <SchedulerButton onClick={showScheduler} />;\n }}\n getGateway={getGateway}\n listGateway={listGateway}\n cancelGateway={cancelGateway}\n publishGateway={publishGateway}\n unpublishGateway={unpublishGateway}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,0BAA0B;AACnC,SAASC,2BAA2B;AACpC,SAASC,6BAA6B;AACtC,SAASC,8BAA8B;AACvC,SAASC,gCAAgC;AACzC,SAASC,eAAe,EAAEC,QAAQ,EAAEC,aAAa;AACjD,SAASC,eAAe;AACxB,SAASC,SAAS,IAAIC,aAAa,QAAQ,oCAAoC;AAE/E,OAAO,MAAMD,SAAS,GAAGA,C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W,EAAEA,WAAY;IACzBC,aAAa,EAAEA,aAAc;IAC7BC,cAAc,EAAEA,cAAe;IAC/BC,gBAAgB,EAAEA;EAAiB,CACtC,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Scheduler.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./Scheduler.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./components/index.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./components/index.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|