@webiny/app-headless-cms-scheduler 6.5.0-beta.4 → 6.5.0-beta.5
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/components/Browser/CellLive.d.ts +2 -2
- package/components/Browser/MenuItem.d.ts +2 -2
- package/components/Dialogs/ScheduleNoticeAlert.d.ts +2 -2
- package/components/Editor/MenuItem.d.ts +2 -2
- package/package.json +12 -12
- package/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.js +2 -2
- package/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.js.map +1 -1
|
@@ -6,6 +6,6 @@ import React from "react";
|
|
|
6
6
|
* keeps loaded for the current model. An entry can be live AND have a scheduled action (e.g. a new
|
|
7
7
|
* revision scheduled to publish), so both are shown when both apply.
|
|
8
8
|
*/
|
|
9
|
-
export declare const CellLive: (() => React.JSX.Element) & {
|
|
10
|
-
|
|
9
|
+
export declare const CellLive: (() => React.JSX.Element) & React.NamedExoticComponent<unknown> & {
|
|
10
|
+
readonly type: () => React.JSX.Element;
|
|
11
11
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const MenuItem: (() => React.JSX.Element | null) & {
|
|
3
|
-
|
|
2
|
+
export declare const MenuItem: (() => React.JSX.Element | null) & React.NamedExoticComponent<unknown> & {
|
|
3
|
+
readonly type: () => React.JSX.Element | null;
|
|
4
4
|
};
|
|
@@ -8,7 +8,7 @@ interface ScheduleNoticeAlertProps {
|
|
|
8
8
|
* entry (the API cancels it). Reads from ScheduledActionsPresenter, already populated by the list
|
|
9
9
|
* (or the entry form). Renders nothing when there is no scheduled action.
|
|
10
10
|
*/
|
|
11
|
-
export declare const ScheduleNoticeAlert: (({ targetId, verb }: ScheduleNoticeAlertProps) => React.JSX.Element | null) & {
|
|
12
|
-
|
|
11
|
+
export declare const ScheduleNoticeAlert: (({ targetId, verb }: ScheduleNoticeAlertProps) => React.JSX.Element | null) & React.NamedExoticComponent<ScheduleNoticeAlertProps> & {
|
|
12
|
+
readonly type: ({ targetId, verb }: ScheduleNoticeAlertProps) => React.JSX.Element | null;
|
|
13
13
|
};
|
|
14
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const MenuItem: (() => React.JSX.Element | null) & {
|
|
3
|
-
|
|
2
|
+
export declare const MenuItem: (() => React.JSX.Element | null) & React.NamedExoticComponent<unknown> & {
|
|
3
|
+
readonly type: () => React.JSX.Element | null;
|
|
4
4
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-headless-cms-scheduler",
|
|
3
|
-
"version": "6.5.0-beta.
|
|
3
|
+
"version": "6.5.0-beta.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -13,22 +13,22 @@
|
|
|
13
13
|
"author": "Webiny Ltd",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@webiny/admin-ui": "6.5.0-beta.
|
|
17
|
-
"@webiny/app": "6.5.0-beta.
|
|
18
|
-
"@webiny/app-admin": "6.5.0-beta.
|
|
19
|
-
"@webiny/app-headless-cms": "6.5.0-beta.
|
|
20
|
-
"@webiny/app-headless-cms-common": "6.5.0-beta.
|
|
21
|
-
"@webiny/app-scheduler": "6.5.0-beta.
|
|
22
|
-
"@webiny/feature": "6.5.0-beta.
|
|
23
|
-
"@webiny/icons": "6.5.0-beta.
|
|
24
|
-
"mobx": "
|
|
25
|
-
"mobx-react-lite": "
|
|
16
|
+
"@webiny/admin-ui": "6.5.0-beta.5",
|
|
17
|
+
"@webiny/app": "6.5.0-beta.5",
|
|
18
|
+
"@webiny/app-admin": "6.5.0-beta.5",
|
|
19
|
+
"@webiny/app-headless-cms": "6.5.0-beta.5",
|
|
20
|
+
"@webiny/app-headless-cms-common": "6.5.0-beta.5",
|
|
21
|
+
"@webiny/app-scheduler": "6.5.0-beta.5",
|
|
22
|
+
"@webiny/feature": "6.5.0-beta.5",
|
|
23
|
+
"@webiny/icons": "6.5.0-beta.5",
|
|
24
|
+
"mobx": "7.0.5",
|
|
25
|
+
"mobx-react-lite": "5.1.0",
|
|
26
26
|
"react": "18.3.1",
|
|
27
27
|
"react-dom": "18.3.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/react": "18.3.31",
|
|
31
|
-
"@webiny/build-tools": "6.5.0-beta.
|
|
31
|
+
"@webiny/build-tools": "6.5.0-beta.5",
|
|
32
32
|
"rimraf": "6.1.3",
|
|
33
33
|
"typescript": "7.0.2"
|
|
34
34
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compareStructural, reaction } from "mobx";
|
|
2
2
|
import { ContentEntriesPresenter } from "@webiny/app-headless-cms/presentation/contentEntries/list/abstractions.js";
|
|
3
3
|
import { ScheduledActionsPresenter } from "./abstractions.js";
|
|
4
4
|
class ContentEntriesPresenterWithScheduling {
|
|
@@ -23,7 +23,7 @@ class ContentEntriesPresenterWithScheduling {
|
|
|
23
23
|
this.scheduledActions.loadForModel(this.original.vm.model.modelId);
|
|
24
24
|
}, {
|
|
25
25
|
fireImmediately: true,
|
|
26
|
-
equals:
|
|
26
|
+
equals: compareStructural
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
dispose() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.js","sources":["../../../src/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.js","sources":["../../../src/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.ts"],"sourcesContent":["import { compareStructural, reaction } from \"mobx\";\nimport type { IReactionDisposer } from \"mobx\";\nimport {\n ContentEntriesPresenter,\n type IContentEntriesPresenter,\n type IContentEntriesInitConfig\n} from \"@webiny/app-headless-cms/presentation/contentEntries/list/abstractions.js\";\nimport { ScheduledActionsPresenter } from \"./abstractions.js\";\n\n/**\n * Decorates the content-entries list presenter so the scheduled actions for the current model are\n * (re)loaded whenever the visible rows change. The reaction key includes each row's status/live,\n * so a direct publish/unpublish (which changes those, and lets the API cancel a schedule) triggers\n * a refresh without any extra signalling.\n */\nclass ContentEntriesPresenterWithScheduling implements IContentEntriesPresenter {\n private _disposeReaction: IReactionDisposer | null = null;\n\n constructor(\n private scheduledActions: ScheduledActionsPresenter.Interface,\n private original: IContentEntriesPresenter\n ) {}\n\n get vm() {\n return this.original.vm;\n }\n\n get list() {\n return this.original.list;\n }\n\n get folders() {\n return this.original.folders;\n }\n\n init(config?: IContentEntriesInitConfig): void {\n this.original.init(config);\n\n this._disposeReaction = reaction(\n () =>\n this.original.list.vm.rows.map(\n row => `${row.id}:${row.meta?.status ?? \"\"}:${row.live?.version ?? \"\"}`\n ),\n keys => {\n if (keys.length === 0) {\n return;\n }\n this.scheduledActions.loadForModel(this.original.vm.model.modelId);\n },\n { fireImmediately: true, equals: compareStructural }\n );\n }\n\n dispose(): void {\n if (this._disposeReaction) {\n this._disposeReaction();\n this._disposeReaction = null;\n }\n this.scheduledActions.dispose();\n this.original.dispose();\n }\n\n selectEntry(id: string) {\n this.original.selectEntry(id);\n }\n\n deselectEntry() {\n this.original.deselectEntry();\n }\n\n createEntry() {\n this.original.createEntry();\n }\n\n deleteEntry(id: string) {\n return this.original.deleteEntry(id);\n }\n\n publishEntry(id: string) {\n return this.original.publishEntry(id);\n }\n\n unpublishEntry(id: string) {\n return this.original.unpublishEntry(id);\n }\n\n moveEntry(id: string, folderId: string) {\n return this.original.moveEntry(id, folderId);\n }\n\n duplicateEntry(entry: Parameters<IContentEntriesPresenter[\"duplicateEntry\"]>[0]) {\n return this.original.duplicateEntry(entry);\n }\n}\n\nexport const ContentEntriesPresenterSchedulingDecorator = ContentEntriesPresenter.createDecorator({\n decorator: ContentEntriesPresenterWithScheduling,\n dependencies: [ScheduledActionsPresenter]\n});\n"],"names":["ContentEntriesPresenterWithScheduling","scheduledActions","original","config","reaction","row","keys","compareStructural","id","folderId","entry","ContentEntriesPresenterSchedulingDecorator","ContentEntriesPresenter","ScheduledActionsPresenter"],"mappings":";;;AAeA,MAAMA;IAGF,YACYC,gBAAqD,EACrDC,QAAkC,CAC5C;aAFUD,gBAAgB,GAAhBA;aACAC,QAAQ,GAARA;aAJJ,gBAAgB,GAA6B;IAKlD;IAEH,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE;IAC3B;IAEA,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI;IAC7B;IAEA,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO;IAChC;IAEA,KAAKC,MAAkC,EAAQ;QAC3C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAACA;QAEnB,IAAI,CAAC,gBAAgB,GAAGC,SACpB,IACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAC1BC,CAAAA,MAAO,GAAGA,IAAI,EAAE,CAAC,CAAC,EAAEA,IAAI,IAAI,EAAE,UAAU,GAAG,CAAC,EAAEA,IAAI,IAAI,EAAE,WAAW,IAAI,GAE/EC,CAAAA;YACI,IAAIA,AAAgB,MAAhBA,KAAK,MAAM,EACX;YAEJ,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO;QACrE,GACA;YAAE,iBAAiB;YAAM,QAAQC;QAAkB;IAE3D;IAEA,UAAgB;QACZ,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACvB,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,gBAAgB,GAAG;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