@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,48 @@
|
|
|
1
|
+
import react, { useMemo } from "react";
|
|
2
|
+
import { observer } from "mobx-react-lite";
|
|
3
|
+
import { Table, createRecordsData } from "@webiny/app-aco";
|
|
4
|
+
import { useSchedulerListConfig } from "../../configs/index.js";
|
|
5
|
+
const SchedulerTable = observer(({ presenter })=>{
|
|
6
|
+
const { vm } = presenter.list;
|
|
7
|
+
const { browser } = useSchedulerListConfig();
|
|
8
|
+
const data = useMemo(()=>createRecordsData(vm.rows), [
|
|
9
|
+
vm.rows
|
|
10
|
+
]);
|
|
11
|
+
const selected = useMemo(()=>{
|
|
12
|
+
const selectedIds = vm.selection.selectedIds;
|
|
13
|
+
return data.filter((row)=>selectedIds.has(row.id));
|
|
14
|
+
}, [
|
|
15
|
+
data,
|
|
16
|
+
vm.selection.selectedIds
|
|
17
|
+
]);
|
|
18
|
+
const sorting = useMemo(()=>{
|
|
19
|
+
if (!vm.sort) return [];
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
id: vm.sort.field,
|
|
23
|
+
desc: "DESC" === vm.sort.direction
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
}, [
|
|
27
|
+
vm.sort
|
|
28
|
+
]);
|
|
29
|
+
return /*#__PURE__*/ react.createElement(Table, {
|
|
30
|
+
columns: browser.table.columns,
|
|
31
|
+
data: data,
|
|
32
|
+
loading: vm.pagination.loading,
|
|
33
|
+
onSelectRow: (entries)=>presenter.list.actions.selection.selectRows(entries.map((entry)=>entry.id)),
|
|
34
|
+
sorting: sorting,
|
|
35
|
+
onSortingChange: (sort)=>{
|
|
36
|
+
if ("function" == typeof sort) {
|
|
37
|
+
const newSort = sort(sorting);
|
|
38
|
+
if (newSort.length > 0) presenter.list.actions.sort.set(newSort[0].id, newSort[0].desc ? "DESC" : "ASC");
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
selected: selected,
|
|
42
|
+
nameColumnId: "title",
|
|
43
|
+
namespace: "scheduler/list"
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
export { SchedulerTable };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=SchedulerTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/schedulerList/components/SchedulerTable.js","sources":["../../../../src/presentation/schedulerList/components/SchedulerTable.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { createRecordsData, Table as AcoTable } from \"@webiny/app-aco\";\nimport { useSchedulerListConfig } from \"~/presentation/configs/index.js\";\nimport type { SchedulerEntryTableRow } from \"~/types.js\";\nimport type { ISchedulerListPresenter } from \"../abstractions.js\";\n\ninterface SchedulerTableProps {\n presenter: ISchedulerListPresenter;\n}\n\nexport const SchedulerTable = observer(({ presenter }: SchedulerTableProps) => {\n const { vm } = presenter.list;\n const { browser } = useSchedulerListConfig();\n\n const data = useMemo<SchedulerEntryTableRow[]>(() => {\n return createRecordsData(vm.rows);\n }, [vm.rows]);\n\n const selected = useMemo<SchedulerEntryTableRow[]>(() => {\n const selectedIds = vm.selection.selectedIds;\n return data.filter(row => selectedIds.has(row.id));\n }, [data, vm.selection.selectedIds]);\n\n const sorting = useMemo(() => {\n if (!vm.sort) {\n return [];\n }\n return [{ id: vm.sort.field, desc: vm.sort.direction === \"DESC\" }];\n }, [vm.sort]);\n\n return (\n <AcoTable<SchedulerEntryTableRow>\n columns={browser.table.columns}\n data={data}\n loading={vm.pagination.loading}\n onSelectRow={entries =>\n presenter.list.actions.selection.selectRows(entries.map(entry => entry.id))\n }\n sorting={sorting}\n onSortingChange={sort => {\n if (typeof sort === \"function\") {\n const newSort = sort(sorting);\n if (newSort.length > 0) {\n presenter.list.actions.sort.set(\n newSort[0].id,\n newSort[0].desc ? \"DESC\" : \"ASC\"\n );\n }\n }\n }}\n selected={selected}\n nameColumnId={\"title\"}\n namespace={\"scheduler/list\"}\n />\n );\n});\n"],"names":["SchedulerTable","observer","presenter","vm","browser","useSchedulerListConfig","data","useMemo","createRecordsData","selected","selectedIds","row","sorting","AcoTable","entries","entry","sort","newSort"],"mappings":";;;;AAWO,MAAMA,iBAAiBC,SAAS,CAAC,EAAEC,SAAS,EAAuB;IACtE,MAAM,EAAEC,EAAE,EAAE,GAAGD,UAAU,IAAI;IAC7B,MAAM,EAAEE,OAAO,EAAE,GAAGC;IAEpB,MAAMC,OAAOC,QAAkC,IACpCC,kBAAkBL,GAAG,IAAI,GACjC;QAACA,GAAG,IAAI;KAAC;IAEZ,MAAMM,WAAWF,QAAkC;QAC/C,MAAMG,cAAcP,GAAG,SAAS,CAAC,WAAW;QAC5C,OAAOG,KAAK,MAAM,CAACK,CAAAA,MAAOD,YAAY,GAAG,CAACC,IAAI,EAAE;IACpD,GAAG;QAACL;QAAMH,GAAG,SAAS,CAAC,WAAW;KAAC;IAEnC,MAAMS,UAAUL,QAAQ;QACpB,IAAI,CAACJ,GAAG,IAAI,EACR,OAAO,EAAE;QAEb,OAAO;YAAC;gBAAE,IAAIA,GAAG,IAAI,CAAC,KAAK;gBAAE,MAAMA,AAAsB,WAAtBA,GAAG,IAAI,CAAC,SAAS;YAAY;SAAE;IACtE,GAAG;QAACA,GAAG,IAAI;KAAC;IAEZ,OAAO,WAAP,GACI,oBAACU,OAAQA;QACL,SAAST,QAAQ,KAAK,CAAC,OAAO;QAC9B,MAAME;QACN,SAASH,GAAG,UAAU,CAAC,OAAO;QAC9B,aAAaW,CAAAA,UACTZ,UAAU,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAACY,QAAQ,GAAG,CAACC,CAAAA,QAASA,MAAM,EAAE;QAE7E,SAASH;QACT,iBAAiBI,CAAAA;YACb,IAAI,AAAgB,cAAhB,OAAOA,MAAqB;gBAC5B,MAAMC,UAAUD,KAAKJ;gBACrB,IAAIK,QAAQ,MAAM,GAAG,GACjBf,UAAU,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAC3Be,OAAO,CAAC,EAAE,CAAC,EAAE,EACbA,OAAO,CAAC,EAAE,CAAC,IAAI,GAAG,SAAS;YAGvC;QACJ;QACA,UAAUR;QACV,cAAc;QACd,WAAW;;AAGvB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ISchedulerListPresenter } from "../abstractions.js";
|
|
3
|
+
interface SearchInputProps {
|
|
4
|
+
presenter: ISchedulerListPresenter;
|
|
5
|
+
}
|
|
6
|
+
export declare const SearchInput: (({ presenter }: SearchInputProps) => React.JSX.Element) & React.NamedExoticComponent<SearchInputProps> & {
|
|
7
|
+
readonly type: ({ presenter }: SearchInputProps) => React.JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { observer } from "mobx-react-lite";
|
|
3
|
+
import { ReactComponent } from "@webiny/icons/search.svg";
|
|
4
|
+
import { DelayedOnChange, Icon, Input } from "@webiny/admin-ui";
|
|
5
|
+
const SearchInput = observer(({ presenter })=>{
|
|
6
|
+
const { vm } = presenter.list;
|
|
7
|
+
return /*#__PURE__*/ react.createElement(DelayedOnChange, {
|
|
8
|
+
value: vm.search,
|
|
9
|
+
onChange: (value)=>{
|
|
10
|
+
if (value === vm.search) return;
|
|
11
|
+
presenter.list.actions.search.set(value);
|
|
12
|
+
}
|
|
13
|
+
}, ({ value, onChange })=>/*#__PURE__*/ react.createElement(Input, {
|
|
14
|
+
id: "scheduler__search-input",
|
|
15
|
+
value: value,
|
|
16
|
+
onChange: (e)=>onChange(e.target.value),
|
|
17
|
+
forwardEventOnChange: true,
|
|
18
|
+
placeholder: "Search all items",
|
|
19
|
+
"data-testid": "scheduler.search-input",
|
|
20
|
+
startIcon: /*#__PURE__*/ react.createElement(Icon, {
|
|
21
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
22
|
+
label: "Search"
|
|
23
|
+
}),
|
|
24
|
+
size: "md",
|
|
25
|
+
variant: "ghost"
|
|
26
|
+
}));
|
|
27
|
+
});
|
|
28
|
+
export { SearchInput };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=SearchInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/schedulerList/components/SearchInput.js","sources":["../../../../src/presentation/schedulerList/components/SearchInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { ReactComponent as SearchIcon } from \"@webiny/icons/search.svg\";\nimport { DelayedOnChange, Icon, Input } from \"@webiny/admin-ui\";\nimport type { ISchedulerListPresenter } from \"../abstractions.js\";\n\ninterface SearchInputProps {\n presenter: ISchedulerListPresenter;\n}\n\nexport const SearchInput = observer(({ presenter }: SearchInputProps) => {\n const { vm } = presenter.list;\n\n return (\n <DelayedOnChange\n value={vm.search}\n onChange={value => {\n if (value === vm.search) {\n return;\n }\n presenter.list.actions.search.set(value);\n }}\n >\n {({ value, onChange }) => (\n <Input\n id={\"scheduler__search-input\"}\n value={value}\n onChange={e => onChange(e.target.value)}\n forwardEventOnChange={true}\n placeholder={\"Search all items\"}\n data-testid={\"scheduler.search-input\"}\n startIcon={<Icon icon={<SearchIcon />} label=\"Search\" />}\n size={\"md\"}\n variant={\"ghost\"}\n />\n )}\n </DelayedOnChange>\n );\n});\n"],"names":["SearchInput","observer","presenter","vm","DelayedOnChange","value","onChange","Input","e","Icon","SearchIcon"],"mappings":";;;;AAUO,MAAMA,cAAcC,SAAS,CAAC,EAAEC,SAAS,EAAoB;IAChE,MAAM,EAAEC,EAAE,EAAE,GAAGD,UAAU,IAAI;IAE7B,OAAO,WAAP,GACI,oBAACE,iBAAeA;QACZ,OAAOD,GAAG,MAAM;QAChB,UAAUE,CAAAA;YACN,IAAIA,UAAUF,GAAG,MAAM,EACnB;YAEJD,UAAU,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAACG;QACtC;OAEC,CAAC,EAAEA,KAAK,EAAEC,QAAQ,EAAE,iBACjB,oBAACC,OAAKA;YACF,IAAI;YACJ,OAAOF;YACP,UAAUG,CAAAA,IAAKF,SAASE,EAAE,MAAM,CAAC,KAAK;YACtC,sBAAsB;YACtB,aAAa;YACb,eAAa;YACb,yBAAW,oBAACC,MAAIA;gBAAC,oBAAM,oBAACC,gBAAUA;gBAAK,OAAM;;YAC7C,MAAM;YACN,SAAS;;AAK7B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { SchedulerListPresenter } from "./abstractions.js";
|
|
3
|
+
import { SchedulerListPresenter as external_SchedulerListPresenter_js_SchedulerListPresenter } from "./SchedulerListPresenter.js";
|
|
4
|
+
const SchedulerListPresenterFeature = createFeature({
|
|
5
|
+
name: "Scheduler/ListPresenter",
|
|
6
|
+
register (container) {
|
|
7
|
+
container.register(external_SchedulerListPresenter_js_SchedulerListPresenter).inSingletonScope();
|
|
8
|
+
},
|
|
9
|
+
resolve (container) {
|
|
10
|
+
return {
|
|
11
|
+
presenter: container.resolve(SchedulerListPresenter)
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export { SchedulerListPresenterFeature };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/schedulerList/feature.js","sources":["../../../src/presentation/schedulerList/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { SchedulerListPresenter as PresenterAbstraction } from \"./abstractions.js\";\nimport { SchedulerListPresenter } from \"./SchedulerListPresenter.js\";\n\nexport const SchedulerListPresenterFeature = createFeature({\n name: \"Scheduler/ListPresenter\",\n register(container) {\n container.register(SchedulerListPresenter).inSingletonScope();\n },\n resolve(container) {\n return { presenter: container.resolve(PresenterAbstraction) };\n }\n});\n"],"names":["SchedulerListPresenterFeature","createFeature","container","SchedulerListPresenter","PresenterAbstraction"],"mappings":";;;AAIO,MAAMA,gCAAgCC,cAAc;IACvD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC,2DAAwB,gBAAgB;IAC/D;IACA,SAAQD,SAAS;QACb,OAAO;YAAE,WAAWA,UAAU,OAAO,CAACE;QAAsB;IAChE;AACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useSchedulerListPresenter: () => import("./abstractions.js").ISchedulerListPresenter;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { useFeature } from "@webiny/app";
|
|
2
|
+
import { SchedulerListPresenterFeature } from "./feature.js";
|
|
3
|
+
const useSchedulerListPresenter = ()=>useFeature(SchedulerListPresenterFeature).presenter;
|
|
4
|
+
export { useSchedulerListPresenter };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=useSchedulerListPresenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/schedulerList/useSchedulerListPresenter.js","sources":["../../../src/presentation/schedulerList/useSchedulerListPresenter.ts"],"sourcesContent":["import { useFeature } from \"@webiny/app\";\nimport { SchedulerListPresenterFeature } from \"./feature.js\";\n\nexport const useSchedulerListPresenter = () => {\n return useFeature(SchedulerListPresenterFeature).presenter;\n};\n"],"names":["useSchedulerListPresenter","useFeature","SchedulerListPresenterFeature"],"mappings":";;AAGO,MAAMA,4BAA4B,IAC9BC,WAAWC,+BAA+B,SAAS"}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CmsIdentity } from "@webiny/app-headless-cms-common/types/index.js";
|
|
2
|
+
import type { TableRow } from "@webiny/app-aco";
|
|
3
|
+
type SchedulerIdentity = Pick<CmsIdentity, "id" | "displayName" | "type">;
|
|
4
|
+
export type { SchedulerIdentity };
|
|
5
|
+
export declare enum ScheduleActionType {
|
|
6
|
+
publish = "publish",
|
|
7
|
+
unpublish = "unpublish"
|
|
8
|
+
}
|
|
9
|
+
export interface SchedulerErrorResponse {
|
|
10
|
+
code: string;
|
|
11
|
+
message: string;
|
|
12
|
+
data?: Record<string, any>;
|
|
13
|
+
stack?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SchedulerMetaResponse {
|
|
16
|
+
totalCount: number;
|
|
17
|
+
cursor: string | null;
|
|
18
|
+
hasMoreItems: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface SchedulerEntry {
|
|
21
|
+
id: string;
|
|
22
|
+
targetId: string;
|
|
23
|
+
namespace: string;
|
|
24
|
+
scheduledBy: SchedulerIdentity;
|
|
25
|
+
publishOn?: Date;
|
|
26
|
+
unpublishOn?: Date;
|
|
27
|
+
actionType: ScheduleActionType;
|
|
28
|
+
title: string;
|
|
29
|
+
}
|
|
30
|
+
export type SchedulerEntryTableRow = TableRow<SchedulerEntry>;
|
package/types.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var types_ScheduleActionType = /*#__PURE__*/ function(ScheduleActionType) {
|
|
2
|
+
ScheduleActionType["publish"] = "publish";
|
|
3
|
+
ScheduleActionType["unpublish"] = "unpublish";
|
|
4
|
+
return ScheduleActionType;
|
|
5
|
+
}({});
|
|
6
|
+
export { types_ScheduleActionType as ScheduleActionType };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type { CmsIdentity } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport type { TableRow } from \"@webiny/app-aco\";\n\ntype SchedulerIdentity = Pick<CmsIdentity, \"id\" | \"displayName\" | \"type\">;\n\nexport type { SchedulerIdentity };\n\nexport enum ScheduleActionType {\n publish = \"publish\",\n unpublish = \"unpublish\"\n}\n\nexport interface SchedulerErrorResponse {\n code: string;\n message: string;\n data?: Record<string, any>;\n stack?: string;\n}\n\nexport interface SchedulerMetaResponse {\n totalCount: number;\n cursor: string | null;\n hasMoreItems: boolean;\n}\n\nexport interface SchedulerEntry {\n id: string;\n targetId: string;\n namespace: string;\n scheduledBy: SchedulerIdentity;\n publishOn?: Date;\n unpublishOn?: Date;\n actionType: ScheduleActionType;\n title: string;\n}\n\nexport type SchedulerEntryTableRow = TableRow<SchedulerEntry>;\n"],"names":["ScheduleActionType"],"mappings":"AAOO,IAAKA,2BAAkBA,WAAAA,GAAAA,SAAlBA,kBAAkB;;;WAAlBA"}
|