@webiny/app-website-builder-workflows 0.0.0-unstable.6f45466a1d → 0.0.0-unstable.7be00a75a9
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/OptionItem/OpenInNewWindow.js +26 -33
- package/Components/OptionItem/OpenInNewWindow.js.map +1 -1
- package/Components/OptionItem/index.js +0 -2
- package/Components/PageEditor/PageEditorAutoSave.js +16 -27
- package/Components/PageEditor/PageEditorAutoSave.js.map +1 -1
- package/Components/PageEditor/PageEditorConfig.js +5 -10
- package/Components/PageEditor/PageEditorConfig.js.map +1 -1
- package/Components/PageEditor/PageEditorLayout.js +36 -32
- package/Components/PageEditor/PageEditorLayout.js.map +1 -1
- package/Components/PageEditor/PageEditorTopBar.d.ts +2 -0
- package/Components/PageEditor/PageEditorTopBar.js +31 -0
- package/Components/PageEditor/PageEditorTopBar.js.map +1 -0
- package/Components/PageEditor/PageFormWorkflowState.js +7 -33
- package/Components/PageEditor/PageFormWorkflowState.js.map +1 -1
- package/Components/PageEditor/PageFormWorkflowStatePublishButton.js +17 -28
- package/Components/PageEditor/PageFormWorkflowStatePublishButton.js.map +1 -1
- package/Components/PageEditor/PageFormWorkflowStateTooltip.js +10 -19
- package/Components/PageEditor/PageFormWorkflowStateTooltip.js.map +1 -1
- package/Components/PageEditor/ToggleEditorMode.d.ts +3 -0
- package/Components/PageEditor/ToggleEditorMode.js +21 -0
- package/Components/PageEditor/ToggleEditorMode.js.map +1 -0
- package/Components/PageWorkflows/PageWorkflowsEditorView.js +44 -50
- package/Components/PageWorkflows/PageWorkflowsEditorView.js.map +1 -1
- package/Components/PageWorkflows/index.js +0 -2
- package/Components/PagesList/PageListChangeStatus.js +17 -25
- package/Components/PagesList/PageListChangeStatus.js.map +1 -1
- package/Components/PagesList/PagesList.js +3 -4
- package/Components/PagesList/PagesList.js.map +1 -1
- package/Components/PagesList/PagesListContentReviews.js +23 -34
- package/Components/PagesList/PagesListContentReviews.js.map +1 -1
- package/Components/PagesList/index.js +0 -2
- package/Components/index.js +0 -2
- package/Routes/WebsiteBuilderWorkflowsMenu.js +17 -26
- package/Routes/WebsiteBuilderWorkflowsMenu.js.map +1 -1
- package/Routes/index.js +0 -2
- package/constants.js +2 -1
- package/constants.js.map +1 -1
- package/hooks/usePage.js +15 -17
- package/hooks/usePage.js.map +1 -1
- package/index.js +7 -8
- package/index.js.map +1 -1
- package/package.json +25 -20
- package/presentation/page/PageGet/WorkflowStatesGetPageGraphQLFieldSelection.js +11 -8
- package/presentation/page/PageGet/WorkflowStatesGetPageGraphQLFieldSelection.js.map +1 -1
- package/presentation/page/PageGet/feature.js +6 -5
- package/presentation/page/PageGet/feature.js.map +1 -1
- package/presentation/page/PageList/PageListPresenterDecorator.js +31 -35
- package/presentation/page/PageList/PageListPresenterDecorator.js.map +1 -1
- package/presentation/page/PageList/WorkflowStateListPagesFieldSelection.js +11 -8
- package/presentation/page/PageList/WorkflowStateListPagesFieldSelection.js.map +1 -1
- package/presentation/page/PageList/feature.js +7 -6
- package/presentation/page/PageList/feature.js.map +1 -1
- package/routes.js +15 -16
- package/routes.js.map +1 -1
- package/types.d.ts +10 -0
- package/types.js +0 -3
- package/Components/OptionItem/index.js.map +0 -1
- package/Components/PageEditor/PageEditorSettings.d.ts +0 -2
- package/Components/PageEditor/PageEditorSettings.js +0 -30
- package/Components/PageEditor/PageEditorSettings.js.map +0 -1
- package/Components/PageEditor/PageEditorSidebar.d.ts +0 -2
- package/Components/PageEditor/PageEditorSidebar.js +0 -17
- package/Components/PageEditor/PageEditorSidebar.js.map +0 -1
- package/Components/PageEditor/PageEditorToolbar.d.ts +0 -2
- package/Components/PageEditor/PageEditorToolbar.js +0 -17
- package/Components/PageEditor/PageEditorToolbar.js.map +0 -1
- package/Components/PageWorkflows/index.js.map +0 -1
- package/Components/PagesList/index.js.map +0 -1
- package/Components/index.js.map +0 -1
- package/Routes/index.js.map +0 -1
- package/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"presentation/page/PageGet/WorkflowStatesGetPageGraphQLFieldSelection.js","sources":["../../../../src/presentation/page/PageGet/WorkflowStatesGetPageGraphQLFieldSelection.ts"],"sourcesContent":["import { GetPageGraphQLFieldSelection } from \"@webiny/app-website-builder/features/pages/getPage/abstractions.js\";\n\nclass WorkflowStatesGetPageGraphQLFieldSelection implements GetPageGraphQLFieldSelection.Interface {\n getSelection(): string[] {\n return [\n `system {\n workflow {\n workflowId\n stepId\n stepName\n state\n }\n }`\n ];\n }\n}\n\nexport const WorkflowStateGetPageFieldSelection = GetPageGraphQLFieldSelection.createImplementation(\n {\n dependencies: [],\n implementation: WorkflowStatesGetPageGraphQLFieldSelection\n }\n);\n"],"names":["WorkflowStatesGetPageGraphQLFieldSelection","WorkflowStateGetPageFieldSelection","GetPageGraphQLFieldSelection"],"mappings":";AAEA,MAAMA;IACF,eAAyB;QACrB,OAAO;YACH,CAAC;;;;;;;aAOA,CAAC;SACL;IACL;AACJ;AAEO,MAAMC,qCAAqCC,6BAA6B,oBAAoB,CAC/F;IACI,cAAc,EAAE;IAChB,gBAAgBF;AACpB"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createFeature } from "@webiny/feature/admin";
|
|
2
2
|
import { WorkflowStateGetPageFieldSelection } from "./WorkflowStatesGetPageGraphQLFieldSelection.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
const PageGetWorkflowsFeature = createFeature({
|
|
4
|
+
name: "PageGetWorkflows",
|
|
5
|
+
register (container) {
|
|
6
|
+
container.register(WorkflowStateGetPageFieldSelection);
|
|
7
|
+
}
|
|
8
8
|
});
|
|
9
|
+
export { PageGetWorkflowsFeature };
|
|
9
10
|
|
|
10
11
|
//# sourceMappingURL=feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"presentation/page/PageGet/feature.js","sources":["../../../../src/presentation/page/PageGet/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { WorkflowStateGetPageFieldSelection } from \"./WorkflowStatesGetPageGraphQLFieldSelection.js\";\n\nexport const PageGetWorkflowsFeature = createFeature({\n name: \"PageGetWorkflows\",\n register(container) {\n container.register(WorkflowStateGetPageFieldSelection);\n }\n});\n"],"names":["PageGetWorkflowsFeature","createFeature","container","WorkflowStateGetPageFieldSelection"],"mappings":";;AAGO,MAAMA,0BAA0BC,cAAc;IACjD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;IACvB;AACJ"}
|
|
@@ -1,42 +1,38 @@
|
|
|
1
1
|
import { makeAutoObservable } from "mobx";
|
|
2
2
|
import { PageListPresenter } from "@webiny/app-website-builder/presentation/pages/PageList/index.js";
|
|
3
3
|
class PageListPresenterWithWorkflows {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
// @ts-expect-error
|
|
33
|
-
$selectable: !page.workflows?.state
|
|
34
|
-
};
|
|
35
|
-
}
|
|
4
|
+
constructor(decoratee){
|
|
5
|
+
this.decoratee = decoratee;
|
|
6
|
+
makeAutoObservable(this);
|
|
7
|
+
}
|
|
8
|
+
get vm() {
|
|
9
|
+
const vm = this.decoratee.vm;
|
|
10
|
+
return {
|
|
11
|
+
...vm,
|
|
12
|
+
data: vm.data.map((page)=>this.decoratePage(page))
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
init(params) {
|
|
16
|
+
this.decoratee.init(params);
|
|
17
|
+
}
|
|
18
|
+
showFilters(show) {
|
|
19
|
+
this.decoratee.showFilters(show);
|
|
20
|
+
}
|
|
21
|
+
decoratePage(page) {
|
|
22
|
+
return {
|
|
23
|
+
...page,
|
|
24
|
+
system: {
|
|
25
|
+
...page.system,
|
|
26
|
+
workflow: page.system?.workflow || null
|
|
27
|
+
},
|
|
28
|
+
$selectable: !page.system?.workflow?.state
|
|
29
|
+
};
|
|
30
|
+
}
|
|
36
31
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
const PageListPresenterDecorator = PageListPresenter.createDecorator({
|
|
33
|
+
decorator: PageListPresenterWithWorkflows,
|
|
34
|
+
dependencies: []
|
|
40
35
|
});
|
|
36
|
+
export { PageListPresenterDecorator };
|
|
41
37
|
|
|
42
38
|
//# sourceMappingURL=PageListPresenterDecorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"presentation/page/PageList/PageListPresenterDecorator.js","sources":["../../../../src/presentation/page/PageList/PageListPresenterDecorator.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport {\n IDocumentListPresenterInit,\n IDocumentListVm,\n PageListPresenter\n} from \"@webiny/app-website-builder/presentation/pages/PageList/index.js\";\nimport type { PageDto } from \"@webiny/app-website-builder/domain/Page/index.js\";\n\nclass PageListPresenterWithWorkflows implements PageListPresenter.Interface {\n private readonly decoratee;\n\n public constructor(decoratee: PageListPresenter.Interface) {\n this.decoratee = decoratee;\n makeAutoObservable(this);\n }\n\n public get vm(): IDocumentListVm {\n const vm = this.decoratee.vm;\n return {\n ...vm,\n data: vm.data.map(page => {\n return this.decoratePage(page);\n })\n };\n }\n\n public init(params: IDocumentListPresenterInit): void {\n this.decoratee.init(params);\n }\n\n public showFilters(show: boolean): void {\n this.decoratee.showFilters(show);\n }\n\n private decoratePage(page: PageDto): PageDto {\n return {\n ...page,\n system: {\n ...page.system,\n workflow: page.system?.workflow || null\n },\n $selectable: !page.system?.workflow?.state\n };\n }\n}\n\nexport const PageListPresenterDecorator = PageListPresenter.createDecorator({\n decorator: PageListPresenterWithWorkflows,\n dependencies: []\n});\n"],"names":["PageListPresenterWithWorkflows","decoratee","makeAutoObservable","vm","page","params","show","PageListPresenterDecorator","PageListPresenter"],"mappings":";;AAQA,MAAMA;IAGF,YAAmBC,SAAsC,CAAE;QACvD,IAAI,CAAC,SAAS,GAAGA;QACjBC,mBAAmB,IAAI;IAC3B;IAEA,IAAW,KAAsB;QAC7B,MAAMC,KAAK,IAAI,CAAC,SAAS,CAAC,EAAE;QAC5B,OAAO;YACH,GAAGA,EAAE;YACL,MAAMA,GAAG,IAAI,CAAC,GAAG,CAACC,CAAAA,OACP,IAAI,CAAC,YAAY,CAACA;QAEjC;IACJ;IAEO,KAAKC,MAAkC,EAAQ;QAClD,IAAI,CAAC,SAAS,CAAC,IAAI,CAACA;IACxB;IAEO,YAAYC,IAAa,EAAQ;QACpC,IAAI,CAAC,SAAS,CAAC,WAAW,CAACA;IAC/B;IAEQ,aAAaF,IAAa,EAAW;QACzC,OAAO;YACH,GAAGA,IAAI;YACP,QAAQ;gBACJ,GAAGA,KAAK,MAAM;gBACd,UAAUA,KAAK,MAAM,EAAE,YAAY;YACvC;YACA,aAAa,CAACA,KAAK,MAAM,EAAE,UAAU;QACzC;IACJ;AACJ;AAEO,MAAMG,6BAA6BC,kBAAkB,eAAe,CAAC;IACxE,WAAWR;IACX,cAAc,EAAE;AACpB"}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { ListPagesGraphQLFieldSelection } from "@webiny/app-website-builder/features/pages/loadPages/abstractions.js";
|
|
2
2
|
class WorkflowStatesListPagesGraphQLFieldSelection {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
getSelection() {
|
|
4
|
+
return [
|
|
5
|
+
`system {
|
|
6
|
+
workflow {
|
|
6
7
|
workflowId
|
|
7
8
|
stepId
|
|
8
9
|
stepName
|
|
9
10
|
state
|
|
10
11
|
}
|
|
11
|
-
}`
|
|
12
|
-
|
|
12
|
+
}`
|
|
13
|
+
];
|
|
14
|
+
}
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const WorkflowStateListPagesFieldSelection = ListPagesGraphQLFieldSelection.createImplementation({
|
|
17
|
+
dependencies: [],
|
|
18
|
+
implementation: WorkflowStatesListPagesGraphQLFieldSelection
|
|
17
19
|
});
|
|
20
|
+
export { WorkflowStateListPagesFieldSelection };
|
|
18
21
|
|
|
19
22
|
//# sourceMappingURL=WorkflowStateListPagesFieldSelection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"presentation/page/PageList/WorkflowStateListPagesFieldSelection.js","sources":["../../../../src/presentation/page/PageList/WorkflowStateListPagesFieldSelection.ts"],"sourcesContent":["import { ListPagesGraphQLFieldSelection } from \"@webiny/app-website-builder/features/pages/loadPages/abstractions.js\";\n\nclass WorkflowStatesListPagesGraphQLFieldSelection\n implements ListPagesGraphQLFieldSelection.Interface\n{\n getSelection(): string[] {\n return [\n `system {\n workflow {\n workflowId\n stepId\n stepName\n state\n }\n }`\n ];\n }\n}\n\nexport const WorkflowStateListPagesFieldSelection =\n ListPagesGraphQLFieldSelection.createImplementation({\n dependencies: [],\n implementation: WorkflowStatesListPagesGraphQLFieldSelection\n });\n"],"names":["WorkflowStatesListPagesGraphQLFieldSelection","WorkflowStateListPagesFieldSelection","ListPagesGraphQLFieldSelection"],"mappings":";AAEA,MAAMA;IAGF,eAAyB;QACrB,OAAO;YACH,CAAC;;;;;;;aAOA,CAAC;SACL;IACL;AACJ;AAEO,MAAMC,uCACTC,+BAA+B,oBAAoB,CAAC;IAChD,cAAc,EAAE;IAChB,gBAAgBF;AACpB"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { createFeature } from "@webiny/feature/admin";
|
|
2
2
|
import { PageListPresenterDecorator } from "./PageListPresenterDecorator.js";
|
|
3
3
|
import { WorkflowStateListPagesFieldSelection } from "./WorkflowStateListPagesFieldSelection.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
const PageListWorkflowsFeature = createFeature({
|
|
5
|
+
name: "PageListWorkflows",
|
|
6
|
+
register (container) {
|
|
7
|
+
container.registerDecorator(PageListPresenterDecorator);
|
|
8
|
+
container.register(WorkflowStateListPagesFieldSelection);
|
|
9
|
+
}
|
|
10
10
|
});
|
|
11
|
+
export { PageListWorkflowsFeature };
|
|
11
12
|
|
|
12
13
|
//# sourceMappingURL=feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"presentation/page/PageList/feature.js","sources":["../../../../src/presentation/page/PageList/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { PageListPresenterDecorator } from \"./PageListPresenterDecorator.js\";\nimport { WorkflowStateListPagesFieldSelection } from \"./WorkflowStateListPagesFieldSelection.js\";\n\nexport const PageListWorkflowsFeature = createFeature({\n name: \"PageListWorkflows\",\n register(container) {\n container.registerDecorator(PageListPresenterDecorator);\n container.register(WorkflowStateListPagesFieldSelection);\n }\n});\n"],"names":["PageListWorkflowsFeature","createFeature","container","PageListPresenterDecorator","WorkflowStateListPagesFieldSelection"],"mappings":";;;AAIO,MAAMA,2BAA2BC,cAAc;IAClD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,iBAAiB,CAACC;QAC5BD,UAAU,QAAQ,CAACE;IACvB;AACJ"}
|
package/routes.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { Route } from "@webiny/app-admin";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
17
|
-
}
|
|
2
|
+
const Routes = {
|
|
3
|
+
Pages: {
|
|
4
|
+
Workflows: new Route({
|
|
5
|
+
name: "WebsiteBuilder/PageWorkflow",
|
|
6
|
+
path: "/website-builder/workflows",
|
|
7
|
+
params: (zod)=>({
|
|
8
|
+
app: zod.string().optional()
|
|
9
|
+
})
|
|
10
|
+
}),
|
|
11
|
+
WorkflowStateList: new Route({
|
|
12
|
+
name: "WebsiteBuilder/Pages/WorkflowStateList",
|
|
13
|
+
path: "/website-builder/pages/content-reviews"
|
|
14
|
+
})
|
|
15
|
+
}
|
|
18
16
|
};
|
|
17
|
+
export { Routes };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=routes.js.map
|
package/routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"routes.js","sources":["../src/routes.ts"],"sourcesContent":["import { Route } from \"@webiny/app-admin\";\n\nexport const Routes = {\n Pages: {\n Workflows: new Route({\n name: \"WebsiteBuilder/PageWorkflow\",\n path: \"/website-builder/workflows\",\n params: zod => {\n return {\n app: zod.string().optional()\n };\n }\n }),\n WorkflowStateList: new Route({\n name: \"WebsiteBuilder/Pages/WorkflowStateList\",\n path: \"/website-builder/pages/content-reviews\"\n })\n }\n};\n"],"names":["Routes","Route","zod"],"mappings":";AAEO,MAAMA,SAAS;IAClB,OAAO;QACH,WAAW,IAAIC,MAAM;YACjB,MAAM;YACN,MAAM;YACN,QAAQC,CAAAA,MACG;oBACH,KAAKA,IAAI,MAAM,GAAG,QAAQ;gBAC9B;QAER;QACA,mBAAmB,IAAID,MAAM;YACzB,MAAM;YACN,MAAM;QACV;IACJ;AACJ"}
|
package/types.d.ts
CHANGED
|
@@ -17,3 +17,13 @@ export type WithWorkflows<T> = T & {
|
|
|
17
17
|
workflows: IRecordWorkflow | null;
|
|
18
18
|
$selectable: boolean;
|
|
19
19
|
};
|
|
20
|
+
declare module "@webiny/app-website-builder/types.js" {
|
|
21
|
+
interface WbSystem {
|
|
22
|
+
workflow: IRecordWorkflow | null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
declare module "@webiny/app-website-builder/domain/Page/PageDto.js" {
|
|
26
|
+
interface PageDto {
|
|
27
|
+
$selectable: boolean;
|
|
28
|
+
}
|
|
29
|
+
}
|
package/types.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ListOpenInNewWindow"],"sources":["index.ts"],"sourcesContent":["export { ListOpenInNewWindow } from \"./OpenInNewWindow.js\";\n"],"mappings":"AAAA,SAASA,mBAAmB","ignoreList":[]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { PageEditorConfig } from "@webiny/app-website-builder";
|
|
3
|
-
import { useWorkflowState } from "@webiny/app-workflows";
|
|
4
|
-
import { observer } from "mobx-react-lite";
|
|
5
|
-
const {
|
|
6
|
-
Ui
|
|
7
|
-
} = PageEditorConfig;
|
|
8
|
-
const WrappedSettings = observer(props => {
|
|
9
|
-
const {
|
|
10
|
-
presenter
|
|
11
|
-
} = useWorkflowState();
|
|
12
|
-
if (!presenter.vm.state?.state) {
|
|
13
|
-
return props.element;
|
|
14
|
-
}
|
|
15
|
-
return null;
|
|
16
|
-
});
|
|
17
|
-
export const PageEditorSettings = Ui.TopBar.Action.createDecorator(Original => {
|
|
18
|
-
return function PageEditorSettingsDecorated(props) {
|
|
19
|
-
if (props.name === "buttonSettings") {
|
|
20
|
-
return /*#__PURE__*/React.createElement(Original, Object.assign({}, props, {
|
|
21
|
-
element: /*#__PURE__*/React.createElement(WrappedSettings, {
|
|
22
|
-
element: props.element
|
|
23
|
-
})
|
|
24
|
-
}));
|
|
25
|
-
}
|
|
26
|
-
return /*#__PURE__*/React.createElement(Original, props);
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=PageEditorSettings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","PageEditorConfig","useWorkflowState","observer","Ui","WrappedSettings","props","presenter","vm","state","element","PageEditorSettings","TopBar","Action","createDecorator","Original","PageEditorSettingsDecorated","name","createElement","Object","assign"],"sources":["PageEditorSettings.tsx"],"sourcesContent":["import React from \"react\";\nimport { PageEditorConfig } from \"@webiny/app-website-builder\";\nimport { useWorkflowState } from \"@webiny/app-workflows\";\nimport { observer } from \"mobx-react-lite\";\n\nconst { Ui } = PageEditorConfig;\n\ninterface IWrappedSettings {\n element?: React.ReactElement | null;\n}\n\nconst WrappedSettings = observer((props: IWrappedSettings) => {\n const { presenter } = useWorkflowState();\n if (!presenter.vm.state?.state) {\n return props.element;\n }\n\n return null;\n});\n\nexport const PageEditorSettings = Ui.TopBar.Action.createDecorator(Original => {\n return function PageEditorSettingsDecorated(props) {\n if (props.name === \"buttonSettings\") {\n return <Original {...props} element={<WrappedSettings element={props.element} />} />;\n }\n return <Original {...props} />;\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,MAAM;EAAEC;AAAG,CAAC,GAAGH,gBAAgB;AAM/B,MAAMI,eAAe,GAAGF,QAAQ,CAAEG,KAAuB,IAAK;EAC1D,MAAM;IAAEC;EAAU,CAAC,GAAGL,gBAAgB,CAAC,CAAC;EACxC,IAAI,CAACK,SAAS,CAACC,EAAE,CAACC,KAAK,EAAEA,KAAK,EAAE;IAC5B,OAAOH,KAAK,CAACI,OAAO;EACxB;EAEA,OAAO,IAAI;AACf,CAAC,CAAC;AAEF,OAAO,MAAMC,kBAAkB,GAAGP,EAAE,CAACQ,MAAM,CAACC,MAAM,CAACC,eAAe,CAACC,QAAQ,IAAI;EAC3E,OAAO,SAASC,2BAA2BA,CAACV,KAAK,EAAE;IAC/C,IAAIA,KAAK,CAACW,IAAI,KAAK,gBAAgB,EAAE;MACjC,oBAAOjB,KAAA,CAAAkB,aAAA,CAACH,QAAQ,EAAAI,MAAA,CAAAC,MAAA,KAAKd,KAAK;QAAEI,OAAO,eAAEV,KAAA,CAAAkB,aAAA,CAACb,eAAe;UAACK,OAAO,EAAEJ,KAAK,CAACI;QAAQ,CAAE;MAAE,EAAE,CAAC;IACxF;IACA,oBAAOV,KAAA,CAAAkB,aAAA,CAACH,QAAQ,EAAKT,KAAQ,CAAC;EAClC,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { EditorConfig } from "@webiny/app-website-builder/BaseEditor/index.js";
|
|
3
|
-
import { useSelectFromDocument } from "@webiny/app-website-builder/BaseEditor/hooks/useSelectFromDocument.js";
|
|
4
|
-
export const PageEditorSidebar = EditorConfig.Ui.Sidebar.createDecorator(Original => {
|
|
5
|
-
return function PageEditorSidebarDecorated() {
|
|
6
|
-
const stepId = useSelectFromDocument(document => {
|
|
7
|
-
// @ts-expect-error
|
|
8
|
-
return document.workflows?.state?.stepId;
|
|
9
|
-
});
|
|
10
|
-
if (stepId) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
return /*#__PURE__*/React.createElement(Original, null);
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=PageEditorSidebar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","EditorConfig","useSelectFromDocument","PageEditorSidebar","Ui","Sidebar","createDecorator","Original","PageEditorSidebarDecorated","stepId","document","workflows","state","createElement"],"sources":["PageEditorSidebar.tsx"],"sourcesContent":["import React from \"react\";\nimport { EditorConfig } from \"@webiny/app-website-builder/BaseEditor/index.js\";\nimport { useSelectFromDocument } from \"@webiny/app-website-builder/BaseEditor/hooks/useSelectFromDocument.js\";\n\nexport const PageEditorSidebar = EditorConfig.Ui.Sidebar.createDecorator(Original => {\n return function PageEditorSidebarDecorated() {\n const stepId = useSelectFromDocument((document): string | undefined => {\n // @ts-expect-error\n return document.workflows?.state?.stepId;\n });\n if (stepId) {\n return null;\n }\n return <Original />;\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,iDAAiD;AAC9E,SAASC,qBAAqB,QAAQ,uEAAuE;AAE7G,OAAO,MAAMC,iBAAiB,GAAGF,YAAY,CAACG,EAAE,CAACC,OAAO,CAACC,eAAe,CAACC,QAAQ,IAAI;EACjF,OAAO,SAASC,0BAA0BA,CAAA,EAAG;IACzC,MAAMC,MAAM,GAAGP,qBAAqB,CAAEQ,QAAQ,IAAyB;MACnE;MACA,OAAOA,QAAQ,CAACC,SAAS,EAAEC,KAAK,EAAEH,MAAM;IAC5C,CAAC,CAAC;IACF,IAAIA,MAAM,EAAE;MACR,OAAO,IAAI;IACf;IACA,oBAAOT,KAAA,CAAAa,aAAA,CAACN,QAAQ,MAAE,CAAC;EACvB,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { EditorConfig } from "@webiny/app-website-builder/BaseEditor/index.js";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { useSelectFromDocument } from "@webiny/app-website-builder/BaseEditor/hooks/useSelectFromDocument.js";
|
|
4
|
-
export const PageEditorToolbar = EditorConfig.Ui.Toolbar.createDecorator(Original => {
|
|
5
|
-
return function PageEditorToolbarDecorated() {
|
|
6
|
-
const stepId = useSelectFromDocument(document => {
|
|
7
|
-
// @ts-expect-error
|
|
8
|
-
return document.workflows?.state?.stepId;
|
|
9
|
-
});
|
|
10
|
-
if (stepId) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
return /*#__PURE__*/React.createElement(Original, null);
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=PageEditorToolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["EditorConfig","React","useSelectFromDocument","PageEditorToolbar","Ui","Toolbar","createDecorator","Original","PageEditorToolbarDecorated","stepId","document","workflows","state","createElement"],"sources":["PageEditorToolbar.tsx"],"sourcesContent":["import { EditorConfig } from \"@webiny/app-website-builder/BaseEditor/index.js\";\nimport React from \"react\";\nimport { useSelectFromDocument } from \"@webiny/app-website-builder/BaseEditor/hooks/useSelectFromDocument.js\";\n\nexport const PageEditorToolbar = EditorConfig.Ui.Toolbar.createDecorator(Original => {\n return function PageEditorToolbarDecorated() {\n const stepId = useSelectFromDocument((document): string | undefined => {\n // @ts-expect-error\n return document.workflows?.state?.stepId;\n });\n if (stepId) {\n return null;\n }\n return <Original />;\n };\n});\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,iDAAiD;AAC9E,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,qBAAqB,QAAQ,uEAAuE;AAE7G,OAAO,MAAMC,iBAAiB,GAAGH,YAAY,CAACI,EAAE,CAACC,OAAO,CAACC,eAAe,CAACC,QAAQ,IAAI;EACjF,OAAO,SAASC,0BAA0BA,CAAA,EAAG;IACzC,MAAMC,MAAM,GAAGP,qBAAqB,CAAEQ,QAAQ,IAAyB;MACnE;MACA,OAAOA,QAAQ,CAACC,SAAS,EAAEC,KAAK,EAAEH,MAAM;IAC5C,CAAC,CAAC;IACF,IAAIA,MAAM,EAAE;MACR,OAAO,IAAI;IACf;IACA,oBAAOR,KAAA,CAAAY,aAAA,CAACN,QAAQ,MAAE,CAAC;EACvB,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./PageWorkflowsEditorView.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["PagesList"],"sources":["index.ts"],"sourcesContent":["export { PagesList } from \"./PagesList.js\";\n"],"mappings":"AAAA,SAASA,SAAS","ignoreList":[]}
|
package/Components/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./OptionItem/index.js\";\nexport * from \"./PageEditor/PageEditorConfig.js\";\nexport * from \"./PagesList/index.js\";\nexport * from \"./PageWorkflows/index.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA","ignoreList":[]}
|
package/Routes/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["WebsiteBuilderWorkflowsMenu"],"sources":["index.ts"],"sourcesContent":["export { WebsiteBuilderWorkflowsMenu } from \"./WebsiteBuilderWorkflowsMenu.js\";\n"],"mappings":"AAAA,SAASA,2BAA2B","ignoreList":[]}
|
package/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { WorkflowStateValue } from \"@webiny/app-workflows/types.js\";\n\nexport interface IRecordWorkflowStateIdentity {\n id: string;\n displayName: string;\n type: string;\n}\n\nexport interface IRecordWorkflowState {\n workflowId: string;\n stepId: string;\n state: WorkflowStateValue;\n savedBy?: IRecordWorkflowStateIdentity | null;\n}\n\nexport interface IRecordWorkflow {\n state?: IRecordWorkflowState | null;\n}\n\nexport type WithWorkflows<T> = T & {\n workflows: IRecordWorkflow | null;\n $selectable: boolean;\n};\n"],"mappings":"","ignoreList":[]}
|