@webiny/app-scheduler 0.0.0-unstable.0d717d18dd
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/LICENSE +21 -0
- package/README.md +11 -0
- package/domain/schedulerEntry.d.ts +16 -0
- package/domain/schedulerEntry.js +19 -0
- package/domain/schedulerEntry.js.map +1 -0
- package/features/cancelScheduledAction/CancelScheduledActionGateway.d.ts +11 -0
- package/features/cancelScheduledAction/CancelScheduledActionGateway.js +41 -0
- package/features/cancelScheduledAction/CancelScheduledActionGateway.js.map +1 -0
- package/features/cancelScheduledAction/abstractions.d.ts +11 -0
- package/features/cancelScheduledAction/abstractions.js +5 -0
- package/features/cancelScheduledAction/abstractions.js.map +1 -0
- package/features/cancelScheduledAction/feature.d.ts +1 -0
- package/features/cancelScheduledAction/feature.js +11 -0
- package/features/cancelScheduledAction/feature.js.map +1 -0
- package/features/feature.d.ts +1 -0
- package/features/feature.js +19 -0
- package/features/feature.js.map +1 -0
- package/features/getScheduledAction/GetScheduledActionGateway.d.ts +11 -0
- package/features/getScheduledAction/GetScheduledActionGateway.js +57 -0
- package/features/getScheduledAction/GetScheduledActionGateway.js.map +1 -0
- package/features/getScheduledAction/abstractions.d.ts +13 -0
- package/features/getScheduledAction/abstractions.js +5 -0
- package/features/getScheduledAction/abstractions.js.map +1 -0
- package/features/getScheduledAction/feature.d.ts +1 -0
- package/features/getScheduledAction/feature.js +11 -0
- package/features/getScheduledAction/feature.js.map +1 -0
- package/features/graphqlFields.d.ts +2 -0
- package/features/graphqlFields.js +23 -0
- package/features/graphqlFields.js.map +1 -0
- package/features/listScheduledActions/ListScheduledActionsGateway.d.ts +11 -0
- package/features/listScheduledActions/ListScheduledActionsGateway.js +84 -0
- package/features/listScheduledActions/ListScheduledActionsGateway.js.map +1 -0
- package/features/listScheduledActions/abstractions.d.ts +30 -0
- package/features/listScheduledActions/abstractions.js +5 -0
- package/features/listScheduledActions/abstractions.js.map +1 -0
- package/features/listScheduledActions/feature.d.ts +1 -0
- package/features/listScheduledActions/feature.js +11 -0
- package/features/listScheduledActions/feature.js.map +1 -0
- package/features/schedulePublishAction/SchedulePublishActionGateway.d.ts +11 -0
- package/features/schedulePublishAction/SchedulePublishActionGateway.js +67 -0
- package/features/schedulePublishAction/SchedulePublishActionGateway.js.map +1 -0
- package/features/schedulePublishAction/abstractions.d.ts +16 -0
- package/features/schedulePublishAction/abstractions.js +5 -0
- package/features/schedulePublishAction/abstractions.js.map +1 -0
- package/features/schedulePublishAction/feature.d.ts +1 -0
- package/features/schedulePublishAction/feature.js +11 -0
- package/features/schedulePublishAction/feature.js.map +1 -0
- package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.d.ts +11 -0
- package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.js +71 -0
- package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.js.map +1 -0
- package/features/scheduleUnpublishAction/abstractions.d.ts +16 -0
- package/features/scheduleUnpublishAction/abstractions.js +5 -0
- package/features/scheduleUnpublishAction/abstractions.js.map +1 -0
- package/features/scheduleUnpublishAction/feature.d.ts +1 -0
- package/features/scheduleUnpublishAction/feature.js +11 -0
- package/features/scheduleUnpublishAction/feature.js.map +1 -0
- package/index.d.ts +9 -0
- package/index.js +17 -0
- package/index.js.map +1 -0
- package/package.json +56 -0
- package/presentation/SchedulerConfigs/SchedulerConfigs.d.ts +2 -0
- package/presentation/SchedulerConfigs/SchedulerConfigs.js +52 -0
- package/presentation/SchedulerConfigs/SchedulerConfigs.js.map +1 -0
- package/presentation/SchedulerConfigs/index.d.ts +1 -0
- package/presentation/SchedulerConfigs/index.js +1 -0
- package/presentation/components/Actions/CancelItem/CancelItem.d.ts +2 -0
- package/presentation/components/Actions/CancelItem/CancelItem.js +18 -0
- package/presentation/components/Actions/CancelItem/CancelItem.js.map +1 -0
- package/presentation/components/Actions/CancelItem/index.d.ts +1 -0
- package/presentation/components/Actions/CancelItem/index.js +1 -0
- package/presentation/components/Actions/index.d.ts +1 -0
- package/presentation/components/Actions/index.js +1 -0
- package/presentation/components/BottomInfoBar/BottomInfoBar.styled.d.ts +20 -0
- package/presentation/components/BottomInfoBar/BottomInfoBar.styled.js +43 -0
- package/presentation/components/BottomInfoBar/BottomInfoBar.styled.js.map +1 -0
- package/presentation/components/BottomInfoBar/ListMeta.d.ts +7 -0
- package/presentation/components/BottomInfoBar/ListMeta.js +9 -0
- package/presentation/components/BottomInfoBar/ListMeta.js.map +1 -0
- package/presentation/components/BottomInfoBar/ListStatus.d.ts +5 -0
- package/presentation/components/BottomInfoBar/ListStatus.js +12 -0
- package/presentation/components/BottomInfoBar/ListStatus.js.map +1 -0
- package/presentation/components/Cells/CellActions/CellActions.d.ts +2 -0
- package/presentation/components/Cells/CellActions/CellActions.js +18 -0
- package/presentation/components/Cells/CellActions/CellActions.js.map +1 -0
- package/presentation/components/Cells/CellActions/index.d.ts +1 -0
- package/presentation/components/Cells/CellActions/index.js +1 -0
- package/presentation/components/Cells/CellRevision/CellRevision.d.ts +2 -0
- package/presentation/components/Cells/CellRevision/CellRevision.js +15 -0
- package/presentation/components/Cells/CellRevision/CellRevision.js.map +1 -0
- package/presentation/components/Cells/CellRevision/CellRevision.styled.d.ts +11 -0
- package/presentation/components/Cells/CellRevision/CellRevision.styled.js +18 -0
- package/presentation/components/Cells/CellRevision/CellRevision.styled.js.map +1 -0
- package/presentation/components/Cells/CellRevision/index.d.ts +1 -0
- package/presentation/components/Cells/CellRevision/index.js +1 -0
- package/presentation/components/Cells/CellScheduledBy/CellScheduledBy.d.ts +2 -0
- package/presentation/components/Cells/CellScheduledBy/CellScheduledBy.js +10 -0
- package/presentation/components/Cells/CellScheduledBy/CellScheduledBy.js.map +1 -0
- package/presentation/components/Cells/CellScheduledBy/index.d.ts +1 -0
- package/presentation/components/Cells/CellScheduledBy/index.js +1 -0
- package/presentation/components/Cells/CellScheduledOn/CellScheduledOn.d.ts +24 -0
- package/presentation/components/Cells/CellScheduledOn/CellScheduledOn.js +19 -0
- package/presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +1 -0
- package/presentation/components/Cells/CellScheduledOn/index.d.ts +1 -0
- package/presentation/components/Cells/CellScheduledOn/index.js +1 -0
- package/presentation/components/Cells/CellTitle/CellTitle.d.ts +2 -0
- package/presentation/components/Cells/CellTitle/CellTitle.js +14 -0
- package/presentation/components/Cells/CellTitle/CellTitle.js.map +1 -0
- package/presentation/components/Cells/CellTitle/CellTitle.styled.d.ts +11 -0
- package/presentation/components/Cells/CellTitle/CellTitle.styled.js +18 -0
- package/presentation/components/Cells/CellTitle/CellTitle.styled.js.map +1 -0
- package/presentation/components/Cells/CellTitle/index.d.ts +1 -0
- package/presentation/components/Cells/CellTitle/index.js +1 -0
- package/presentation/components/Cells/CellType/CellActionType.d.ts +2 -0
- package/presentation/components/Cells/CellType/CellActionType.js +15 -0
- package/presentation/components/Cells/CellType/CellActionType.js.map +1 -0
- package/presentation/components/Cells/CellType/CellActionType.styled.d.ts +11 -0
- package/presentation/components/Cells/CellType/CellActionType.styled.js +18 -0
- package/presentation/components/Cells/CellType/CellActionType.styled.js.map +1 -0
- package/presentation/components/Cells/CellType/index.d.ts +1 -0
- package/presentation/components/Cells/CellType/index.js +1 -0
- package/presentation/components/Cells/index.d.ts +6 -0
- package/presentation/components/Cells/index.js +6 -0
- package/presentation/components/Empty/Empty.styled.d.ts +8 -0
- package/presentation/components/Empty/Empty.styled.js +16 -0
- package/presentation/components/Empty/Empty.styled.js.map +1 -0
- package/presentation/components/Title/Title.d.ts +5 -0
- package/presentation/components/Title/Title.js +10 -0
- package/presentation/components/Title/Title.js.map +1 -0
- package/presentation/components/Title/Title.styled.d.ts +3 -0
- package/presentation/components/Title/Title.styled.js +13 -0
- package/presentation/components/Title/Title.styled.js.map +1 -0
- package/presentation/components/Title/index.d.ts +1 -0
- package/presentation/components/Title/index.js +1 -0
- package/presentation/configs/index.d.ts +1 -0
- package/presentation/configs/index.js +1 -0
- package/presentation/configs/list/Browser/EntryAction.d.ts +8 -0
- package/presentation/configs/list/Browser/EntryAction.js +13 -0
- package/presentation/configs/list/Browser/EntryAction.js.map +1 -0
- package/presentation/configs/list/Browser/Table/Column.d.ts +15 -0
- package/presentation/configs/list/Browser/Table/Column.js +11 -0
- package/presentation/configs/list/Browser/Table/Column.js.map +1 -0
- package/presentation/configs/list/Browser/Table/Sorting.d.ts +5 -0
- package/presentation/configs/list/Browser/Table/Sorting.js +7 -0
- package/presentation/configs/list/Browser/Table/Sorting.js.map +1 -0
- package/presentation/configs/list/Browser/Table/index.d.ts +19 -0
- package/presentation/configs/list/Browser/Table/index.js +9 -0
- package/presentation/configs/list/Browser/Table/index.js.map +1 -0
- package/presentation/configs/list/Browser/index.d.ts +23 -0
- package/presentation/configs/list/Browser/index.js +9 -0
- package/presentation/configs/list/Browser/index.js.map +1 -0
- package/presentation/configs/list/SchedulerListConfig.d.ts +35 -0
- package/presentation/configs/list/SchedulerListConfig.js +30 -0
- package/presentation/configs/list/SchedulerListConfig.js.map +1 -0
- package/presentation/configs/list/index.d.ts +1 -0
- package/presentation/configs/list/index.js +1 -0
- package/presentation/hooks/index.d.ts +2 -0
- package/presentation/hooks/index.js +2 -0
- package/presentation/hooks/useCancelSchedulerItem.d.ts +8 -0
- package/presentation/hooks/useCancelSchedulerItem.js +32 -0
- package/presentation/hooks/useCancelSchedulerItem.js.map +1 -0
- package/presentation/hooks/useSchedulerItem.d.ts +11 -0
- package/presentation/hooks/useSchedulerItem.js +7 -0
- package/presentation/hooks/useSchedulerItem.js.map +1 -0
- package/presentation/scheduleDialog/ScheduleDialogPresenter.d.ts +26 -0
- package/presentation/scheduleDialog/ScheduleDialogPresenter.js +115 -0
- package/presentation/scheduleDialog/ScheduleDialogPresenter.js.map +1 -0
- package/presentation/scheduleDialog/abstractions.d.ts +35 -0
- package/presentation/scheduleDialog/abstractions.js +5 -0
- package/presentation/scheduleDialog/abstractions.js.map +1 -0
- package/presentation/scheduleDialog/components/CancelButtonComponent.d.ts +10 -0
- package/presentation/scheduleDialog/components/CancelButtonComponent.js +20 -0
- package/presentation/scheduleDialog/components/CancelButtonComponent.js.map +1 -0
- package/presentation/scheduleDialog/components/FormComponent.d.ts +9 -0
- package/presentation/scheduleDialog/components/FormComponent.js +32 -0
- package/presentation/scheduleDialog/components/FormComponent.js.map +1 -0
- package/presentation/scheduleDialog/components/ReschedulingAlert.d.ts +7 -0
- package/presentation/scheduleDialog/components/ReschedulingAlert.js +14 -0
- package/presentation/scheduleDialog/components/ReschedulingAlert.js.map +1 -0
- package/presentation/scheduleDialog/components/SchedulerDialogFormComponentDateTimeInput.d.ts +24 -0
- package/presentation/scheduleDialog/components/SchedulerDialogFormComponentDateTimeInput.js +15 -0
- package/presentation/scheduleDialog/components/SchedulerDialogFormComponentDateTimeInput.js.map +1 -0
- package/presentation/scheduleDialog/createMinDateValidator.d.ts +7 -0
- package/presentation/scheduleDialog/createMinDateValidator.js +14 -0
- package/presentation/scheduleDialog/createMinDateValidator.js.map +1 -0
- package/presentation/scheduleDialog/feature.d.ts +3 -0
- package/presentation/scheduleDialog/feature.js +17 -0
- package/presentation/scheduleDialog/feature.js.map +1 -0
- package/presentation/scheduleDialog/useScheduleDialog.d.ts +20 -0
- package/presentation/scheduleDialog/useScheduleDialog.js +128 -0
- package/presentation/scheduleDialog/useScheduleDialog.js.map +1 -0
- package/presentation/schedulerList/Scheduler.d.ts +18 -0
- package/presentation/schedulerList/Scheduler.js +28 -0
- package/presentation/schedulerList/Scheduler.js.map +1 -0
- package/presentation/schedulerList/SchedulerListDataSource.d.ts +15 -0
- package/presentation/schedulerList/SchedulerListDataSource.js +41 -0
- package/presentation/schedulerList/SchedulerListDataSource.js.map +1 -0
- package/presentation/schedulerList/SchedulerListPresenter.d.ts +21 -0
- package/presentation/schedulerList/SchedulerListPresenter.js +47 -0
- package/presentation/schedulerList/SchedulerListPresenter.js.map +1 -0
- package/presentation/schedulerList/abstractions.d.ts +13 -0
- package/presentation/schedulerList/abstractions.js +5 -0
- package/presentation/schedulerList/abstractions.js.map +1 -0
- package/presentation/schedulerList/components/BottomInfoBar.d.ts +9 -0
- package/presentation/schedulerList/components/BottomInfoBar.js +18 -0
- package/presentation/schedulerList/components/BottomInfoBar.js.map +1 -0
- package/presentation/schedulerList/components/Empty.d.ts +9 -0
- package/presentation/schedulerList/components/Empty.js +21 -0
- package/presentation/schedulerList/components/Empty.js.map +1 -0
- package/presentation/schedulerList/components/SchedulerListView.d.ts +8 -0
- package/presentation/schedulerList/components/SchedulerListView.js +40 -0
- package/presentation/schedulerList/components/SchedulerListView.js.map +1 -0
- package/presentation/schedulerList/components/SchedulerOverlay.d.ts +11 -0
- package/presentation/schedulerList/components/SchedulerOverlay.js +38 -0
- package/presentation/schedulerList/components/SchedulerOverlay.js.map +1 -0
- package/presentation/schedulerList/components/SchedulerTable.d.ts +9 -0
- package/presentation/schedulerList/components/SchedulerTable.js +48 -0
- package/presentation/schedulerList/components/SchedulerTable.js.map +1 -0
- package/presentation/schedulerList/components/SearchInput.d.ts +9 -0
- package/presentation/schedulerList/components/SearchInput.js +30 -0
- package/presentation/schedulerList/components/SearchInput.js.map +1 -0
- package/presentation/schedulerList/feature.d.ts +3 -0
- package/presentation/schedulerList/feature.js +17 -0
- package/presentation/schedulerList/feature.js.map +1 -0
- package/presentation/schedulerList/useSchedulerListPresenter.d.ts +1 -0
- package/presentation/schedulerList/useSchedulerListPresenter.js +6 -0
- package/presentation/schedulerList/useSchedulerListPresenter.js.map +1 -0
- package/types.d.ts +30 -0
- package/types.js +8 -0
- package/types.js.map +1 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/abstractions.js";
|
|
2
|
+
import zod from "zod";
|
|
3
|
+
import { createZodError } from "@webiny/utils/createZodError.js";
|
|
4
|
+
import { schedulerEntrySchema } from "../../domain/schedulerEntry.js";
|
|
5
|
+
import { ERROR_FIELDS, SCHEDULER_ENTRY_FIELDS } from "../graphqlFields.js";
|
|
6
|
+
import { SchedulePublishActionGateway } from "./abstractions.js";
|
|
7
|
+
import { ScheduleActionType } from "../../types.js";
|
|
8
|
+
const SCHEDULE_PUBLISH_ACTION_MUTATION = `
|
|
9
|
+
mutation CreateSchedulePublishAction(
|
|
10
|
+
$namespace: String!
|
|
11
|
+
$targetId: ID!
|
|
12
|
+
$scheduleFor: DateTime
|
|
13
|
+
$actionType: ScheduleRecordType!
|
|
14
|
+
) {
|
|
15
|
+
scheduler {
|
|
16
|
+
scheduleAction(
|
|
17
|
+
namespace: $namespace
|
|
18
|
+
targetId: $targetId
|
|
19
|
+
scheduleFor: $scheduleFor
|
|
20
|
+
actionType: $actionType
|
|
21
|
+
) {
|
|
22
|
+
data {
|
|
23
|
+
${SCHEDULER_ENTRY_FIELDS}
|
|
24
|
+
}
|
|
25
|
+
error {
|
|
26
|
+
${ERROR_FIELDS}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
const schema = zod.object({
|
|
33
|
+
data: schedulerEntrySchema
|
|
34
|
+
});
|
|
35
|
+
class SchedulePublishActionGatewayImpl {
|
|
36
|
+
constructor(client){
|
|
37
|
+
this.client = client;
|
|
38
|
+
}
|
|
39
|
+
async execute(params) {
|
|
40
|
+
const response = await this.client.execute({
|
|
41
|
+
query: SCHEDULE_PUBLISH_ACTION_MUTATION,
|
|
42
|
+
variables: {
|
|
43
|
+
namespace: params.namespace,
|
|
44
|
+
targetId: params.targetId,
|
|
45
|
+
scheduleFor: params.scheduleOn,
|
|
46
|
+
actionType: ScheduleActionType.publish
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const result = response?.scheduler?.scheduleAction;
|
|
50
|
+
if (!result) throw new Error("Network error while scheduling an action.");
|
|
51
|
+
if (!result.data) throw new Error(result.error?.message || "Could execute schedule publish action.");
|
|
52
|
+
const validated = await schema.safeParseAsync(result);
|
|
53
|
+
if (!validated.success) throw createZodError(validated.error);
|
|
54
|
+
return {
|
|
55
|
+
item: validated.data.data
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const SchedulePublishActionGateway_SchedulePublishActionGateway = SchedulePublishActionGateway.createImplementation({
|
|
60
|
+
implementation: SchedulePublishActionGatewayImpl,
|
|
61
|
+
dependencies: [
|
|
62
|
+
MainGraphQLClient
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
export { SchedulePublishActionGateway_SchedulePublishActionGateway as SchedulePublishActionGateway };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=SchedulePublishActionGateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/schedulePublishAction/SchedulePublishActionGateway.js","sources":["../../../src/features/schedulePublishAction/SchedulePublishActionGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/abstractions.js\";\nimport zod from \"zod\";\nimport { createZodError } from \"@webiny/utils/createZodError.js\";\nimport { schedulerEntrySchema } from \"~/domain/schedulerEntry.js\";\nimport { SCHEDULER_ENTRY_FIELDS, ERROR_FIELDS } from \"~/features/graphqlFields.js\";\nimport {\n SchedulePublishActionGateway as GatewayAbstraction,\n type ISchedulePublishActionGatewayExecuteParams,\n type ISchedulePublishActionGatewayExecuteResponse\n} from \"./abstractions.js\";\nimport { type SchedulerEntry, type SchedulerErrorResponse, ScheduleActionType } from \"~/types.js\";\n\nconst SCHEDULE_PUBLISH_ACTION_MUTATION = /* GraphQL */ `\n mutation CreateSchedulePublishAction(\n $namespace: String!\n $targetId: ID!\n $scheduleFor: DateTime\n $actionType: ScheduleRecordType!\n ) {\n scheduler {\n scheduleAction(\n namespace: $namespace\n targetId: $targetId\n scheduleFor: $scheduleFor\n actionType: $actionType\n ) {\n data {\n ${SCHEDULER_ENTRY_FIELDS}\n }\n error {\n ${ERROR_FIELDS}\n }\n }\n }\n }\n`;\n\ninterface SchedulePublishActionResponse {\n scheduler: {\n scheduleAction: {\n data: SchedulerEntry | null;\n error: SchedulerErrorResponse | null;\n };\n };\n}\n\nconst schema = zod.object({\n data: schedulerEntrySchema\n});\n\nclass SchedulePublishActionGatewayImpl implements GatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async execute(\n params: ISchedulePublishActionGatewayExecuteParams\n ): Promise<ISchedulePublishActionGatewayExecuteResponse> {\n const response = await this.client.execute<SchedulePublishActionResponse>({\n query: SCHEDULE_PUBLISH_ACTION_MUTATION,\n variables: {\n namespace: params.namespace,\n targetId: params.targetId,\n scheduleFor: params.scheduleOn,\n actionType: ScheduleActionType.publish\n }\n });\n\n const result = response?.scheduler?.scheduleAction;\n if (!result) {\n throw new Error(\"Network error while scheduling an action.\");\n }\n\n if (!result.data) {\n throw new Error(result.error?.message || \"Could execute schedule publish action.\");\n }\n\n const validated = await schema.safeParseAsync(result);\n if (!validated.success) {\n throw createZodError(validated.error);\n }\n\n return {\n item: validated.data.data\n };\n }\n}\n\nexport const SchedulePublishActionGateway = GatewayAbstraction.createImplementation({\n implementation: SchedulePublishActionGatewayImpl,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["SCHEDULE_PUBLISH_ACTION_MUTATION","SCHEDULER_ENTRY_FIELDS","ERROR_FIELDS","schema","zod","schedulerEntrySchema","SchedulePublishActionGatewayImpl","client","params","response","ScheduleActionType","result","Error","validated","createZodError","SchedulePublishActionGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;;;;;;AAYA,MAAMA,mCAAiD,CAAC;;;;;;;;;;;;;;;oBAepC,EAAEC,uBAAuB;;;oBAGzB,EAAEC,aAAa;;;;;AAKnC,CAAC;AAWD,MAAMC,SAASC,IAAI,MAAM,CAAC;IACtB,MAAMC;AACV;AAEA,MAAMC;IACF,YAAoBC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAE1D,MAAM,QACFC,MAAkD,EACG;QACrD,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAgC;YACtE,OAAOT;YACP,WAAW;gBACP,WAAWQ,OAAO,SAAS;gBAC3B,UAAUA,OAAO,QAAQ;gBACzB,aAAaA,OAAO,UAAU;gBAC9B,YAAYE,mBAAmB,OAAO;YAC1C;QACJ;QAEA,MAAMC,SAASF,UAAU,WAAW;QACpC,IAAI,CAACE,QACD,MAAM,IAAIC,MAAM;QAGpB,IAAI,CAACD,OAAO,IAAI,EACZ,MAAM,IAAIC,MAAMD,OAAO,KAAK,EAAE,WAAW;QAG7C,MAAME,YAAY,MAAMV,OAAO,cAAc,CAACQ;QAC9C,IAAI,CAACE,UAAU,OAAO,EAClB,MAAMC,eAAeD,UAAU,KAAK;QAGxC,OAAO;YACH,MAAMA,UAAU,IAAI,CAAC,IAAI;QAC7B;IACJ;AACJ;AAEO,MAAME,4DAA+BC,6BAAAA,oBAAuC,CAAC;IAChF,gBAAgBV;IAChB,cAAc;QAACW;KAAkB;AACrC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SchedulerEntry } from "../../types.js";
|
|
2
|
+
export interface ISchedulePublishActionGatewayExecuteParams {
|
|
3
|
+
namespace: string;
|
|
4
|
+
targetId: string;
|
|
5
|
+
scheduleOn: Date;
|
|
6
|
+
}
|
|
7
|
+
export interface ISchedulePublishActionGatewayExecuteResponse {
|
|
8
|
+
item: SchedulerEntry;
|
|
9
|
+
}
|
|
10
|
+
export interface ISchedulePublishActionGateway {
|
|
11
|
+
execute(params: ISchedulePublishActionGatewayExecuteParams): Promise<ISchedulePublishActionGatewayExecuteResponse>;
|
|
12
|
+
}
|
|
13
|
+
export declare const SchedulePublishActionGateway: import("@webiny/di").Abstraction<ISchedulePublishActionGateway>;
|
|
14
|
+
export declare namespace SchedulePublishActionGateway {
|
|
15
|
+
type Interface = ISchedulePublishActionGateway;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/schedulePublishAction/abstractions.js","sources":["../../../src/features/schedulePublishAction/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { SchedulerEntry } from \"~/types.js\";\n\nexport interface ISchedulePublishActionGatewayExecuteParams {\n namespace: string;\n targetId: string;\n scheduleOn: Date;\n}\n\nexport interface ISchedulePublishActionGatewayExecuteResponse {\n item: SchedulerEntry;\n}\n\nexport interface ISchedulePublishActionGateway {\n execute(\n params: ISchedulePublishActionGatewayExecuteParams\n ): Promise<ISchedulePublishActionGatewayExecuteResponse>;\n}\n\nexport const SchedulePublishActionGateway = createAbstraction<ISchedulePublishActionGateway>(\n \"Scheduler/SchedulePublishActionGateway\"\n);\n\nexport namespace SchedulePublishActionGateway {\n export type Interface = ISchedulePublishActionGateway;\n}\n"],"names":["SchedulePublishActionGateway","createAbstraction"],"mappings":";AAmBO,MAAMA,+BAA+BC,kBACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SchedulePublishActionFeature: import("@webiny/feature/admin").FeatureDefinition<any, []>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { SchedulePublishActionGateway } from "./SchedulePublishActionGateway.js";
|
|
3
|
+
const SchedulePublishActionFeature = createFeature({
|
|
4
|
+
name: "Scheduler/SchedulePublishAction",
|
|
5
|
+
register (container) {
|
|
6
|
+
container.register(SchedulePublishActionGateway).inSingletonScope();
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export { SchedulePublishActionFeature };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/schedulePublishAction/feature.js","sources":["../../../src/features/schedulePublishAction/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { SchedulePublishActionGateway } from \"./SchedulePublishActionGateway.js\";\n\nexport const SchedulePublishActionFeature = createFeature({\n name: \"Scheduler/SchedulePublishAction\",\n register(container) {\n container.register(SchedulePublishActionGateway).inSingletonScope();\n }\n});\n"],"names":["SchedulePublishActionFeature","createFeature","container","SchedulePublishActionGateway"],"mappings":";;AAGO,MAAMA,+BAA+BC,cAAc;IACtD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC,8BAA8B,gBAAgB;IACrE;AACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/abstractions.js";
|
|
2
|
+
import { ScheduleUnpublishActionGateway as GatewayAbstraction, type IScheduleUnpublishActionGatewayExecuteParams, type IScheduleUnpublishActionGatewayExecuteResponse } from "./abstractions.js";
|
|
3
|
+
declare class ScheduleUnpublishActionGatewayImpl implements GatewayAbstraction.Interface {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: MainGraphQLClient.Interface);
|
|
6
|
+
execute(params: IScheduleUnpublishActionGatewayExecuteParams): Promise<IScheduleUnpublishActionGatewayExecuteResponse>;
|
|
7
|
+
}
|
|
8
|
+
export declare const ScheduleUnpublishActionGateway: typeof ScheduleUnpublishActionGatewayImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IScheduleUnpublishActionGateway>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/abstractions.js";
|
|
2
|
+
import zod from "zod";
|
|
3
|
+
import { createZodError } from "@webiny/utils/createZodError.js";
|
|
4
|
+
import { schedulerEntrySchema } from "../../domain/schedulerEntry.js";
|
|
5
|
+
import { ERROR_FIELDS, SCHEDULER_ENTRY_FIELDS } from "../graphqlFields.js";
|
|
6
|
+
import { ScheduleUnpublishActionGateway } from "./abstractions.js";
|
|
7
|
+
import { ScheduleActionType } from "../../types.js";
|
|
8
|
+
const SCHEDULE_UNPUBLISH_ACTION_MUTATION = `
|
|
9
|
+
mutation ScheduleUnpublishAction(
|
|
10
|
+
$namespace: String!
|
|
11
|
+
$targetId: ID!
|
|
12
|
+
$scheduleFor: DateTime
|
|
13
|
+
$actionType: ScheduleRecordType!
|
|
14
|
+
) {
|
|
15
|
+
scheduler {
|
|
16
|
+
scheduleAction(
|
|
17
|
+
namespace: $namespace
|
|
18
|
+
targetId: $targetId
|
|
19
|
+
scheduleFor: $scheduleFor
|
|
20
|
+
actionType: $actionType
|
|
21
|
+
) {
|
|
22
|
+
data {
|
|
23
|
+
${SCHEDULER_ENTRY_FIELDS}
|
|
24
|
+
}
|
|
25
|
+
error {
|
|
26
|
+
${ERROR_FIELDS}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
const schema = zod.object({
|
|
33
|
+
data: schedulerEntrySchema
|
|
34
|
+
});
|
|
35
|
+
class ScheduleUnpublishActionGatewayImpl {
|
|
36
|
+
constructor(client){
|
|
37
|
+
this.client = client;
|
|
38
|
+
}
|
|
39
|
+
async execute(params) {
|
|
40
|
+
const response = await this.client.execute({
|
|
41
|
+
query: SCHEDULE_UNPUBLISH_ACTION_MUTATION,
|
|
42
|
+
variables: {
|
|
43
|
+
namespace: params.namespace,
|
|
44
|
+
targetId: params.targetId,
|
|
45
|
+
scheduleFor: params.scheduleOn,
|
|
46
|
+
actionType: ScheduleActionType.unpublish
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const result = response?.scheduler?.scheduleAction;
|
|
50
|
+
if (!result) throw new Error("Network error while creating a schedule.");
|
|
51
|
+
if (!result.data) throw new Error(result.error?.message || "Could execute schedule unpublish action.");
|
|
52
|
+
const validated = await schema.safeParseAsync(result);
|
|
53
|
+
if (!validated.success) {
|
|
54
|
+
const err = createZodError(validated.error);
|
|
55
|
+
console.error(err);
|
|
56
|
+
throw err;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
item: validated.data.data
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const ScheduleUnpublishActionGateway_ScheduleUnpublishActionGateway = ScheduleUnpublishActionGateway.createImplementation({
|
|
64
|
+
implementation: ScheduleUnpublishActionGatewayImpl,
|
|
65
|
+
dependencies: [
|
|
66
|
+
MainGraphQLClient
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
export { ScheduleUnpublishActionGateway_ScheduleUnpublishActionGateway as ScheduleUnpublishActionGateway };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=ScheduleUnpublishActionGateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.js","sources":["../../../src/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/abstractions.js\";\nimport zod from \"zod\";\nimport { createZodError } from \"@webiny/utils/createZodError.js\";\nimport { schedulerEntrySchema } from \"~/domain/schedulerEntry.js\";\nimport { SCHEDULER_ENTRY_FIELDS, ERROR_FIELDS } from \"~/features/graphqlFields.js\";\nimport {\n ScheduleUnpublishActionGateway as GatewayAbstraction,\n type IScheduleUnpublishActionGatewayExecuteParams,\n type IScheduleUnpublishActionGatewayExecuteResponse\n} from \"./abstractions.js\";\nimport { type SchedulerEntry, type SchedulerErrorResponse, ScheduleActionType } from \"~/types.js\";\n\nconst SCHEDULE_UNPUBLISH_ACTION_MUTATION = /* GraphQL */ `\n mutation ScheduleUnpublishAction(\n $namespace: String!\n $targetId: ID!\n $scheduleFor: DateTime\n $actionType: ScheduleRecordType!\n ) {\n scheduler {\n scheduleAction(\n namespace: $namespace\n targetId: $targetId\n scheduleFor: $scheduleFor\n actionType: $actionType\n ) {\n data {\n ${SCHEDULER_ENTRY_FIELDS}\n }\n error {\n ${ERROR_FIELDS}\n }\n }\n }\n }\n`;\n\ninterface ScheduleUnpublishActionResponse {\n scheduler: {\n scheduleAction: {\n data: SchedulerEntry | null;\n error: SchedulerErrorResponse | null;\n };\n };\n}\n\nconst schema = zod.object({\n data: schedulerEntrySchema\n});\n\nclass ScheduleUnpublishActionGatewayImpl implements GatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async execute(\n params: IScheduleUnpublishActionGatewayExecuteParams\n ): Promise<IScheduleUnpublishActionGatewayExecuteResponse> {\n const response = await this.client.execute<ScheduleUnpublishActionResponse>({\n query: SCHEDULE_UNPUBLISH_ACTION_MUTATION,\n variables: {\n namespace: params.namespace,\n targetId: params.targetId,\n scheduleFor: params.scheduleOn,\n actionType: ScheduleActionType.unpublish\n }\n });\n\n const result = response?.scheduler?.scheduleAction;\n if (!result) {\n throw new Error(\"Network error while creating a schedule.\");\n }\n\n if (!result.data) {\n throw new Error(result.error?.message || \"Could execute schedule unpublish action.\");\n }\n\n const validated = await schema.safeParseAsync(result);\n if (!validated.success) {\n const err = createZodError(validated.error);\n console.error(err);\n throw err;\n }\n\n return {\n item: validated.data.data\n };\n }\n}\n\nexport const ScheduleUnpublishActionGateway = GatewayAbstraction.createImplementation({\n implementation: ScheduleUnpublishActionGatewayImpl,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["SCHEDULE_UNPUBLISH_ACTION_MUTATION","SCHEDULER_ENTRY_FIELDS","ERROR_FIELDS","schema","zod","schedulerEntrySchema","ScheduleUnpublishActionGatewayImpl","client","params","response","ScheduleActionType","result","Error","validated","err","createZodError","console","ScheduleUnpublishActionGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;;;;;;AAYA,MAAMA,qCAAmD,CAAC;;;;;;;;;;;;;;;oBAetC,EAAEC,uBAAuB;;;oBAGzB,EAAEC,aAAa;;;;;AAKnC,CAAC;AAWD,MAAMC,SAASC,IAAI,MAAM,CAAC;IACtB,MAAMC;AACV;AAEA,MAAMC;IACF,YAAoBC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAE1D,MAAM,QACFC,MAAoD,EACG;QACvD,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAkC;YACxE,OAAOT;YACP,WAAW;gBACP,WAAWQ,OAAO,SAAS;gBAC3B,UAAUA,OAAO,QAAQ;gBACzB,aAAaA,OAAO,UAAU;gBAC9B,YAAYE,mBAAmB,SAAS;YAC5C;QACJ;QAEA,MAAMC,SAASF,UAAU,WAAW;QACpC,IAAI,CAACE,QACD,MAAM,IAAIC,MAAM;QAGpB,IAAI,CAACD,OAAO,IAAI,EACZ,MAAM,IAAIC,MAAMD,OAAO,KAAK,EAAE,WAAW;QAG7C,MAAME,YAAY,MAAMV,OAAO,cAAc,CAACQ;QAC9C,IAAI,CAACE,UAAU,OAAO,EAAE;YACpB,MAAMC,MAAMC,eAAeF,UAAU,KAAK;YAC1CG,QAAQ,KAAK,CAACF;YACd,MAAMA;QACV;QAEA,OAAO;YACH,MAAMD,UAAU,IAAI,CAAC,IAAI;QAC7B;IACJ;AACJ;AAEO,MAAMI,gEAAiCC,+BAAAA,oBAAuC,CAAC;IAClF,gBAAgBZ;IAChB,cAAc;QAACa;KAAkB;AACrC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SchedulerEntry } from "../../types.js";
|
|
2
|
+
export interface IScheduleUnpublishActionGatewayExecuteParams {
|
|
3
|
+
namespace: string;
|
|
4
|
+
targetId: string;
|
|
5
|
+
scheduleOn: Date;
|
|
6
|
+
}
|
|
7
|
+
export interface IScheduleUnpublishActionGatewayExecuteResponse {
|
|
8
|
+
item: SchedulerEntry;
|
|
9
|
+
}
|
|
10
|
+
export interface IScheduleUnpublishActionGateway {
|
|
11
|
+
execute(params: IScheduleUnpublishActionGatewayExecuteParams): Promise<IScheduleUnpublishActionGatewayExecuteResponse>;
|
|
12
|
+
}
|
|
13
|
+
export declare const ScheduleUnpublishActionGateway: import("@webiny/di").Abstraction<IScheduleUnpublishActionGateway>;
|
|
14
|
+
export declare namespace ScheduleUnpublishActionGateway {
|
|
15
|
+
type Interface = IScheduleUnpublishActionGateway;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/scheduleUnpublishAction/abstractions.js","sources":["../../../src/features/scheduleUnpublishAction/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { SchedulerEntry } from \"~/types.js\";\n\nexport interface IScheduleUnpublishActionGatewayExecuteParams {\n namespace: string;\n targetId: string;\n scheduleOn: Date;\n}\n\nexport interface IScheduleUnpublishActionGatewayExecuteResponse {\n item: SchedulerEntry;\n}\n\nexport interface IScheduleUnpublishActionGateway {\n execute(\n params: IScheduleUnpublishActionGatewayExecuteParams\n ): Promise<IScheduleUnpublishActionGatewayExecuteResponse>;\n}\n\nexport const ScheduleUnpublishActionGateway = createAbstraction<IScheduleUnpublishActionGateway>(\n \"Scheduler/ScheduleUnpublishActionGateway\"\n);\n\nexport namespace ScheduleUnpublishActionGateway {\n export type Interface = IScheduleUnpublishActionGateway;\n}\n"],"names":["ScheduleUnpublishActionGateway","createAbstraction"],"mappings":";AAmBO,MAAMA,iCAAiCC,kBAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ScheduleUnpublishActionFeature: import("@webiny/feature/admin").FeatureDefinition<any, []>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { ScheduleUnpublishActionGateway } from "./ScheduleUnpublishActionGateway.js";
|
|
3
|
+
const ScheduleUnpublishActionFeature = createFeature({
|
|
4
|
+
name: "Scheduler/ScheduleUnpublishAction",
|
|
5
|
+
register (container) {
|
|
6
|
+
container.register(ScheduleUnpublishActionGateway).inSingletonScope();
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export { ScheduleUnpublishActionFeature };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/scheduleUnpublishAction/feature.js","sources":["../../../src/features/scheduleUnpublishAction/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { ScheduleUnpublishActionGateway } from \"./ScheduleUnpublishActionGateway.js\";\n\nexport const ScheduleUnpublishActionFeature = createFeature({\n name: \"Scheduler/ScheduleUnpublishAction\",\n register(container) {\n container.register(ScheduleUnpublishActionGateway).inSingletonScope();\n }\n});\n"],"names":["ScheduleUnpublishActionFeature","createFeature","container","ScheduleUnpublishActionGateway"],"mappings":";;AAGO,MAAMA,iCAAiCC,cAAc;IACxD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC,gCAAgC,gBAAgB;IACvE;AACJ"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const SchedulerModule: () => React.JSX.Element;
|
|
3
|
+
export { useScheduleDialog } from "./presentation/scheduleDialog/useScheduleDialog.js";
|
|
4
|
+
export type { IUseScheduleDialogProps } from "./presentation/scheduleDialog/useScheduleDialog.js";
|
|
5
|
+
export { Scheduler } from "./presentation/schedulerList/Scheduler.js";
|
|
6
|
+
export type { SchedulerProps } from "./presentation/schedulerList/Scheduler.js";
|
|
7
|
+
export { SchedulerConfigs } from "./presentation/SchedulerConfigs/SchedulerConfigs.js";
|
|
8
|
+
export { SchedulerDialogFormComponentDateTimeInput } from "./presentation/scheduleDialog/components/SchedulerDialogFormComponentDateTimeInput.js";
|
|
9
|
+
export { CellScheduledOn } from "./presentation/components/Cells/CellScheduledOn/index.js";
|
package/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { RegisterFeature } from "@webiny/app-admin";
|
|
3
|
+
import { SchedulerFeature } from "./features/feature.js";
|
|
4
|
+
import { ScheduleDialogPresenterFeature } from "./presentation/scheduleDialog/feature.js";
|
|
5
|
+
import { SchedulerConfigs } from "./presentation/SchedulerConfigs/SchedulerConfigs.js";
|
|
6
|
+
const SchedulerModule = ()=>/*#__PURE__*/ react.createElement(react.Fragment, null, /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
7
|
+
feature: SchedulerFeature
|
|
8
|
+
}), /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
9
|
+
feature: ScheduleDialogPresenterFeature
|
|
10
|
+
}), /*#__PURE__*/ react.createElement(SchedulerConfigs, null));
|
|
11
|
+
export { useScheduleDialog } from "./presentation/scheduleDialog/useScheduleDialog.js";
|
|
12
|
+
export { Scheduler } from "./presentation/schedulerList/Scheduler.js";
|
|
13
|
+
export { SchedulerDialogFormComponentDateTimeInput } from "./presentation/scheduleDialog/components/SchedulerDialogFormComponentDateTimeInput.js";
|
|
14
|
+
export { CellScheduledOn } from "./presentation/components/Cells/CellScheduledOn/index.js";
|
|
15
|
+
export { SchedulerConfigs, SchedulerModule };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { RegisterFeature } from \"@webiny/app-admin\";\nimport { SchedulerFeature } from \"./features/feature.js\";\nimport { ScheduleDialogPresenterFeature } from \"./presentation/scheduleDialog/feature.js\";\nimport { SchedulerConfigs } from \"./presentation/SchedulerConfigs/SchedulerConfigs.js\";\n\nexport const SchedulerModule = () => {\n return (\n <>\n <RegisterFeature feature={SchedulerFeature} />\n <RegisterFeature feature={ScheduleDialogPresenterFeature} />\n <SchedulerConfigs />\n </>\n );\n};\n\nexport { useScheduleDialog } from \"./presentation/scheduleDialog/useScheduleDialog.js\";\nexport type { IUseScheduleDialogProps } from \"./presentation/scheduleDialog/useScheduleDialog.js\";\nexport { Scheduler } from \"./presentation/schedulerList/Scheduler.js\";\nexport type { SchedulerProps } from \"./presentation/schedulerList/Scheduler.js\";\nexport { SchedulerConfigs } from \"./presentation/SchedulerConfigs/SchedulerConfigs.js\";\nexport { SchedulerDialogFormComponentDateTimeInput } from \"./presentation/scheduleDialog/components/SchedulerDialogFormComponentDateTimeInput.js\";\nexport { CellScheduledOn } from \"./presentation/components/Cells/CellScheduledOn/index.js\";\n"],"names":["SchedulerModule","RegisterFeature","SchedulerFeature","ScheduleDialogPresenterFeature","SchedulerConfigs"],"mappings":";;;;;AAMO,MAAMA,kBAAkB,IACpB,WAAP,GACI,wDACI,oBAACC,iBAAeA;QAAC,SAASC;sBAC1B,oBAACD,iBAAeA;QAAC,SAASE;sBAC1B,oBAACC,kBAAgBA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webiny/app-scheduler",
|
|
3
|
+
"version": "0.0.0-unstable.0d717d18dd",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./index.js",
|
|
7
|
+
"./*": "./*"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/webiny/webiny-js.git"
|
|
12
|
+
},
|
|
13
|
+
"author": "Webiny Ltd",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@emotion/react": "11.14.0",
|
|
17
|
+
"@emotion/styled": "11.14.1",
|
|
18
|
+
"@material-design-icons/svg": "0.14.15",
|
|
19
|
+
"@webiny/admin-ui": "0.0.0-unstable.0d717d18dd",
|
|
20
|
+
"@webiny/app": "0.0.0-unstable.0d717d18dd",
|
|
21
|
+
"@webiny/app-aco": "0.0.0-unstable.0d717d18dd",
|
|
22
|
+
"@webiny/app-admin": "0.0.0-unstable.0d717d18dd",
|
|
23
|
+
"@webiny/app-headless-cms-common": "0.0.0-unstable.0d717d18dd",
|
|
24
|
+
"@webiny/feature": "0.0.0-unstable.0d717d18dd",
|
|
25
|
+
"@webiny/form": "0.0.0-unstable.0d717d18dd",
|
|
26
|
+
"@webiny/icons": "0.0.0-unstable.0d717d18dd",
|
|
27
|
+
"@webiny/react-composition": "0.0.0-unstable.0d717d18dd",
|
|
28
|
+
"@webiny/react-properties": "0.0.0-unstable.0d717d18dd",
|
|
29
|
+
"@webiny/utils": "0.0.0-unstable.0d717d18dd",
|
|
30
|
+
"@webiny/validation": "0.0.0-unstable.0d717d18dd",
|
|
31
|
+
"lodash": "4.18.1",
|
|
32
|
+
"mobx": "7.0.0",
|
|
33
|
+
"mobx-react-lite": "5.0.0",
|
|
34
|
+
"react": "18.3.1",
|
|
35
|
+
"react-dom": "18.3.1",
|
|
36
|
+
"zod": "4.4.3"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/react": "18.3.31",
|
|
40
|
+
"@webiny/build-tools": "0.0.0-unstable.0d717d18dd",
|
|
41
|
+
"rimraf": "6.1.3",
|
|
42
|
+
"typescript": "7.0.2"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"svgo": {
|
|
48
|
+
"plugins": {
|
|
49
|
+
"removeViewBox": false
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"gitHead": "b8aec8a1be3f25c3b428b357fe1e352c7cbff9ae",
|
|
53
|
+
"webiny": {
|
|
54
|
+
"publishFrom": "dist"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { SchedulerListConfig } from "../configs/index.js";
|
|
3
|
+
import { CellActionType, CellActions, CellRevision, CellScheduledBy, CellScheduledOn, CellTitle } from "../components/Cells/index.js";
|
|
4
|
+
import { CancelItemAction } from "../components/Actions/index.js";
|
|
5
|
+
const { Browser: Browser } = SchedulerListConfig;
|
|
6
|
+
const SchedulerConfigs = ()=>/*#__PURE__*/ react.createElement(react.Fragment, null, /*#__PURE__*/ react.createElement(SchedulerListConfig, null, /*#__PURE__*/ react.createElement(Browser.Table.Column, {
|
|
7
|
+
name: "title",
|
|
8
|
+
header: "Title",
|
|
9
|
+
cell: /*#__PURE__*/ react.createElement(CellTitle, null),
|
|
10
|
+
sortable: true,
|
|
11
|
+
hideable: false,
|
|
12
|
+
size: 200
|
|
13
|
+
}), /*#__PURE__*/ react.createElement(Browser.Table.Column, {
|
|
14
|
+
name: "revision",
|
|
15
|
+
header: "Revision",
|
|
16
|
+
cell: /*#__PURE__*/ react.createElement(CellRevision, null),
|
|
17
|
+
hideable: false
|
|
18
|
+
}), /*#__PURE__*/ react.createElement(Browser.Table.Column, {
|
|
19
|
+
name: "scheduledBy",
|
|
20
|
+
header: "Author",
|
|
21
|
+
cell: /*#__PURE__*/ react.createElement(CellScheduledBy, null),
|
|
22
|
+
hideable: false
|
|
23
|
+
}), /*#__PURE__*/ react.createElement(Browser.Table.Column, {
|
|
24
|
+
name: "actionType",
|
|
25
|
+
header: "Action Type",
|
|
26
|
+
cell: /*#__PURE__*/ react.createElement(CellActionType, null),
|
|
27
|
+
hideable: false
|
|
28
|
+
}), /*#__PURE__*/ react.createElement(Browser.Table.Column, {
|
|
29
|
+
name: "scheduledFor",
|
|
30
|
+
header: "Action Time",
|
|
31
|
+
cell: /*#__PURE__*/ react.createElement(CellScheduledOn, null),
|
|
32
|
+
sortable: true,
|
|
33
|
+
hideable: false
|
|
34
|
+
}), /*#__PURE__*/ react.createElement(Browser.Table.Column, {
|
|
35
|
+
name: "actions",
|
|
36
|
+
header: " ",
|
|
37
|
+
cell: /*#__PURE__*/ react.createElement(CellActions, null),
|
|
38
|
+
size: 80,
|
|
39
|
+
className: "rmwc-data-table__cell--align-end",
|
|
40
|
+
hideable: false,
|
|
41
|
+
resizable: false
|
|
42
|
+
}), /*#__PURE__*/ react.createElement(Browser.Table.Sorting, {
|
|
43
|
+
name: "scheduledFor",
|
|
44
|
+
field: "scheduledFor",
|
|
45
|
+
order: "desc"
|
|
46
|
+
}), /*#__PURE__*/ react.createElement(Browser.EntryAction, {
|
|
47
|
+
name: "cancel",
|
|
48
|
+
element: /*#__PURE__*/ react.createElement(CancelItemAction, null)
|
|
49
|
+
})));
|
|
50
|
+
export { SchedulerConfigs };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=SchedulerConfigs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/SchedulerConfigs/SchedulerConfigs.js","sources":["../../../src/presentation/SchedulerConfigs/SchedulerConfigs.tsx"],"sourcesContent":["import React from \"react\";\nimport { SchedulerListConfig } from \"~/presentation/configs/index.js\";\nimport {\n CellActions,\n CellScheduledBy,\n CellScheduledOn,\n CellTitle,\n CellActionType,\n CellRevision\n} from \"~/presentation/components/Cells/index.js\";\nimport { CancelItemAction } from \"~/presentation/components/Actions/index.js\";\n\nconst { Browser } = SchedulerListConfig;\n\nexport const SchedulerConfigs = () => {\n return (\n <>\n <SchedulerListConfig>\n <Browser.Table.Column\n name={\"title\"}\n header={\"Title\"}\n cell={<CellTitle />}\n sortable={true}\n hideable={false}\n size={200}\n />\n <Browser.Table.Column\n name={\"revision\"}\n header={\"Revision\"}\n cell={<CellRevision />}\n hideable={false}\n />\n <Browser.Table.Column\n name={\"scheduledBy\"}\n header={\"Author\"}\n cell={<CellScheduledBy />}\n hideable={false}\n />\n <Browser.Table.Column\n name={\"actionType\"}\n header={\"Action Type\"}\n cell={<CellActionType />}\n hideable={false}\n />\n <Browser.Table.Column\n name={\"scheduledFor\"}\n header={\"Action Time\"}\n cell={<CellScheduledOn />}\n sortable={true}\n hideable={false}\n />\n <Browser.Table.Column\n name={\"actions\"}\n header={\" \"}\n cell={<CellActions />}\n size={80}\n className={\"rmwc-data-table__cell--align-end\"}\n hideable={false}\n resizable={false}\n />\n <Browser.Table.Sorting\n name={\"scheduledFor\"}\n field={\"scheduledFor\"}\n order={\"desc\"}\n />\n <Browser.EntryAction name={\"cancel\"} element={<CancelItemAction />} />\n </SchedulerListConfig>\n </>\n );\n};\n"],"names":["Browser","SchedulerListConfig","SchedulerConfigs","CellTitle","CellRevision","CellScheduledBy","CellActionType","CellScheduledOn","CellActions","CancelItemAction"],"mappings":";;;;AAYA,MAAM,EAAEA,SAAAA,OAAO,EAAE,GAAGC;AAEb,MAAMC,mBAAmB,IACrB,WAAP,GACI,wDACI,oBAACD,qBAAmBA,MAAAA,WAAAA,GAChB,oBAACD,QAAQ,KAAK,CAAC,MAAM;QACjB,MAAM;QACN,QAAQ;QACR,oBAAM,oBAACG,WAASA;QAChB,UAAU;QACV,UAAU;QACV,MAAM;sBAEV,oBAACH,QAAQ,KAAK,CAAC,MAAM;QACjB,MAAM;QACN,QAAQ;QACR,oBAAM,oBAACI,cAAYA;QACnB,UAAU;sBAEd,oBAACJ,QAAQ,KAAK,CAAC,MAAM;QACjB,MAAM;QACN,QAAQ;QACR,oBAAM,oBAACK,iBAAeA;QACtB,UAAU;sBAEd,oBAACL,QAAQ,KAAK,CAAC,MAAM;QACjB,MAAM;QACN,QAAQ;QACR,oBAAM,oBAACM,gBAAcA;QACrB,UAAU;sBAEd,oBAACN,QAAQ,KAAK,CAAC,MAAM;QACjB,MAAM;QACN,QAAQ;QACR,oBAAM,oBAACO,iBAAeA;QACtB,UAAU;QACV,UAAU;sBAEd,oBAACP,QAAQ,KAAK,CAAC,MAAM;QACjB,MAAM;QACN,QAAQ;QACR,oBAAM,oBAACQ,aAAWA;QAClB,MAAM;QACN,WAAW;QACX,UAAU;QACV,WAAW;sBAEf,oBAACR,QAAQ,KAAK,CAAC,OAAO;QAClB,MAAM;QACN,OAAO;QACP,OAAO;sBAEX,oBAACA,QAAQ,WAAW;QAAC,MAAM;QAAU,uBAAS,oBAACS,kBAAgBA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SchedulerConfigs.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SchedulerConfigs.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { ReactComponent } from "@webiny/icons/delete.svg";
|
|
3
|
+
import { OptionsMenuItem } from "@webiny/app-admin/exports/admin/ui.js";
|
|
4
|
+
import { useCancelSchedulerItem, useSchedulerItem } from "../../../hooks/index.js";
|
|
5
|
+
const CancelItemAction = ()=>{
|
|
6
|
+
const { item } = useSchedulerItem();
|
|
7
|
+
const { openDialogCancelSchedulerItem } = useCancelSchedulerItem({
|
|
8
|
+
item
|
|
9
|
+
});
|
|
10
|
+
return /*#__PURE__*/ react.createElement(OptionsMenuItem, {
|
|
11
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
12
|
+
label: "Cancel",
|
|
13
|
+
onAction: openDialogCancelSchedulerItem
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
export { CancelItemAction };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=CancelItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/components/Actions/CancelItem/CancelItem.js","sources":["../../../../../src/presentation/components/Actions/CancelItem/CancelItem.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as Cancel } from \"@webiny/icons/delete.svg\";\nimport { OptionsMenuItem } from \"@webiny/app-admin/exports/admin/ui.js\";\nimport { useCancelSchedulerItem, useSchedulerItem } from \"~/presentation/hooks/index.js\";\n\nexport const CancelItemAction = () => {\n const { item } = useSchedulerItem();\n const { openDialogCancelSchedulerItem } = useCancelSchedulerItem({ item });\n\n return (\n <OptionsMenuItem\n icon={<Cancel />}\n label={\"Cancel\"}\n onAction={openDialogCancelSchedulerItem}\n />\n );\n};\n"],"names":["CancelItemAction","item","useSchedulerItem","openDialogCancelSchedulerItem","useCancelSchedulerItem","OptionsMenuItem","Cancel"],"mappings":";;;;AAKO,MAAMA,mBAAmB;IAC5B,MAAM,EAAEC,IAAI,EAAE,GAAGC;IACjB,MAAM,EAAEC,6BAA6B,EAAE,GAAGC,uBAAuB;QAAEH;IAAK;IAExE,OAAO,WAAP,GACI,oBAACI,iBAAeA;QACZ,oBAAM,oBAACC,gBAAMA;QACb,OAAO;QACP,UAAUH;;AAGtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CancelItem.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CancelItem.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CancelItem/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CancelItem/index.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const BottomInfoBarWrapper: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const BottomInfoBarInner: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
9
|
+
export declare const StatusWrapper: import("@emotion/styled").StyledComponent<{
|
|
10
|
+
theme?: import("@emotion/react").Theme;
|
|
11
|
+
as?: React.ElementType;
|
|
12
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
+
export declare const CircularProgressHolder: import("@emotion/styled").StyledComponent<{
|
|
14
|
+
theme?: import("@emotion/react").Theme;
|
|
15
|
+
as?: React.ElementType;
|
|
16
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
|
+
export declare const UploadingLabel: import("@emotion/styled").StyledComponent<{
|
|
18
|
+
theme?: import("@emotion/react").Theme;
|
|
19
|
+
as?: React.ElementType;
|
|
20
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
const BottomInfoBarWrapper = styled("div")`
|
|
3
|
+
font-size: 0.8rem;
|
|
4
|
+
position: sticky;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
height: 30px;
|
|
7
|
+
color: var(--mdc-theme-text-secondary-on-background);
|
|
8
|
+
border-top: 1px solid var(--mdc-theme-on-background);
|
|
9
|
+
background: var(--mdc-theme-surface);
|
|
10
|
+
width: 100%;
|
|
11
|
+
transform: translateZ(0);
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
`;
|
|
17
|
+
const BottomInfoBarInner = styled("div")`
|
|
18
|
+
padding: 0 10px;
|
|
19
|
+
width: 100%;
|
|
20
|
+
`;
|
|
21
|
+
const StatusWrapper = styled("div")`
|
|
22
|
+
color: var(--mdc-theme-primary);
|
|
23
|
+
position: absolute;
|
|
24
|
+
right: 0;
|
|
25
|
+
bottom: 10px;
|
|
26
|
+
margin-right: 10px;
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
> div {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
const CircularProgressHolder = styled("div")`
|
|
34
|
+
position: relative;
|
|
35
|
+
height: 12px;
|
|
36
|
+
width: 12px;
|
|
37
|
+
`;
|
|
38
|
+
const UploadingLabel = styled("div")`
|
|
39
|
+
margin-right: 5px;
|
|
40
|
+
`;
|
|
41
|
+
export { BottomInfoBarInner, BottomInfoBarWrapper, CircularProgressHolder, StatusWrapper, UploadingLabel };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=BottomInfoBar.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/components/BottomInfoBar/BottomInfoBar.styled.js","sources":["../../../../src/presentation/components/BottomInfoBar/BottomInfoBar.styled.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\n\nexport const BottomInfoBarWrapper = styled(\"div\")`\n font-size: 0.8rem;\n position: sticky;\n bottom: 0;\n height: 30px;\n color: var(--mdc-theme-text-secondary-on-background);\n border-top: 1px solid var(--mdc-theme-on-background);\n background: var(--mdc-theme-surface);\n width: 100%;\n transform: translateZ(0);\n overflow: hidden;\n display: flex;\n align-items: center;\n z-index: 1;\n`;\n\nexport const BottomInfoBarInner = styled(\"div\")`\n padding: 0 10px;\n width: 100%;\n`;\n\nexport const StatusWrapper = styled(\"div\")`\n color: var(--mdc-theme-primary);\n position: absolute;\n right: 0;\n bottom: 10px;\n margin-right: 10px;\n display: flex;\n align-items: center;\n > div {\n display: inline-block;\n }\n`;\n\nexport const CircularProgressHolder = styled(\"div\")`\n position: relative;\n height: 12px;\n width: 12px;\n`;\n\nexport const UploadingLabel = styled(\"div\")`\n margin-right: 5px;\n`;\n"],"names":["BottomInfoBarWrapper","styled","BottomInfoBarInner","StatusWrapper","CircularProgressHolder","UploadingLabel"],"mappings":";AAEO,MAAMA,uBAAuBC,OAAO,MAAM,CAAC;;;;;;;;;;;;;;AAclD,CAAC;AAEM,MAAMC,qBAAqBD,OAAO,MAAM,CAAC;;;AAGhD,CAAC;AAEM,MAAME,gBAAgBF,OAAO,MAAM,CAAC;;;;;;;;;;;AAW3C,CAAC;AAEM,MAAMG,yBAAyBH,OAAO,MAAM,CAAC;;;;AAIpD,CAAC;AAEM,MAAMI,iBAAiBJ,OAAO,MAAM,CAAC;;AAE5C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import react, { useCallback } from "react";
|
|
2
|
+
const ListMeta = (props)=>{
|
|
3
|
+
const getLabel = useCallback((count = 0)=>`${count} ${1 === count ? "item" : "items"}`, []);
|
|
4
|
+
if (props.loading) return null;
|
|
5
|
+
return /*#__PURE__*/ react.createElement("span", null, `Showing ${props.currentCount} out of ${getLabel(props.totalCount)}.`);
|
|
6
|
+
};
|
|
7
|
+
export { ListMeta };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=ListMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/components/BottomInfoBar/ListMeta.js","sources":["../../../../src/presentation/components/BottomInfoBar/ListMeta.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\n\nexport interface ListMetaProps {\n loading: boolean;\n currentCount: number;\n totalCount: number;\n}\n\nexport const ListMeta = (props: ListMetaProps) => {\n const getLabel = useCallback((count = 0): string => {\n return `${count} ${count === 1 ? \"item\" : \"items\"}`;\n }, []);\n\n if (props.loading) {\n return null;\n }\n\n return <span>{`Showing ${props.currentCount} out of ${getLabel(props.totalCount)}.`}</span>;\n};\n"],"names":["ListMeta","props","getLabel","useCallback","count"],"mappings":";AAQO,MAAMA,WAAW,CAACC;IACrB,MAAMC,WAAWC,YAAY,CAACC,QAAQ,CAAC,GAC5B,GAAGA,MAAM,CAAC,EAAEA,AAAU,MAAVA,QAAc,SAAS,SAAS,EACpD,EAAE;IAEL,IAAIH,MAAM,OAAO,EACb,OAAO;IAGX,OAAO,WAAP,GAAO,oBAAC,cAAM,CAAC,QAAQ,EAAEA,MAAM,YAAY,CAAC,QAAQ,EAAEC,SAASD,MAAM,UAAU,EAAE,CAAC,CAAC;AACvF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { Loader } from "@webiny/admin-ui";
|
|
3
|
+
import { CircularProgressHolder, StatusWrapper, UploadingLabel } from "./BottomInfoBar.styled.js";
|
|
4
|
+
const ListStatus = ({ loading })=>{
|
|
5
|
+
if (!loading) return null;
|
|
6
|
+
return /*#__PURE__*/ react.createElement(StatusWrapper, null, /*#__PURE__*/ react.createElement(UploadingLabel, null, "Loading more items..."), /*#__PURE__*/ react.createElement(CircularProgressHolder, null, /*#__PURE__*/ react.createElement(Loader, {
|
|
7
|
+
size: "xs"
|
|
8
|
+
})));
|
|
9
|
+
};
|
|
10
|
+
export { ListStatus };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=ListStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/components/BottomInfoBar/ListStatus.js","sources":["../../../../src/presentation/components/BottomInfoBar/ListStatus.tsx"],"sourcesContent":["import React from \"react\";\nimport { Loader } from \"@webiny/admin-ui\";\nimport { CircularProgressHolder, StatusWrapper, UploadingLabel } from \"./BottomInfoBar.styled.js\";\n\nexport interface ListStatusProps {\n loading: boolean;\n}\n\nexport const ListStatus = ({ loading }: ListStatusProps) => {\n if (!loading) {\n return null;\n }\n\n return (\n <StatusWrapper>\n <UploadingLabel>{\"Loading more items...\"}</UploadingLabel>\n <CircularProgressHolder>\n <Loader size={\"xs\"} />\n </CircularProgressHolder>\n </StatusWrapper>\n );\n};\n"],"names":["ListStatus","loading","StatusWrapper","UploadingLabel","CircularProgressHolder","Loader"],"mappings":";;;AAQO,MAAMA,aAAa,CAAC,EAAEC,OAAO,EAAmB;IACnD,IAAI,CAACA,SACD,OAAO;IAGX,OAAO,WAAP,GACI,oBAACC,eAAaA,MAAAA,WAAAA,GACV,oBAACC,gBAAcA,MAAE,wCACjB,oBAACC,wBAAsBA,MAAAA,WAAAA,GACnB,oBAACC,QAAMA;QAAC,MAAM;;AAI9B"}
|