Skip to content

Commit 809f486

Browse files
committed
fix: after next merge
1 parent 291c99f commit 809f486

File tree

9 files changed

+30
-9
lines changed

9 files changed

+30
-9
lines changed

packages/app-website-builder-workflows/src/Components/PageEditor/PageEditor.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { PageFormWorkflowStateTooltip } from "./PageFormWorkflowStateTooltip.js"
33
import { useSelectFromDocument } from "@webiny/app-website-builder/BaseEditor/hooks/useSelectFromDocument.js";
44
import { useApolloClient } from "@apollo/react-hooks";
55
import { useSecurity } from "@webiny/app-security";
6-
import { WorkflowStateProvider } from "@webiny/app-workflows";
6+
import { Components } from "@webiny/app-workflows";
77
import { WB_PAGE_APP } from "~/constants.js";
88
import { PageFormWorkflowState } from "./PageFormWorkflowState.js";
99
import { PageEditorConfig } from "@webiny/app-website-builder";
@@ -12,6 +12,10 @@ import { PageEditorAutoSave } from "./PageEditorAutoSave.js";
1212

1313
const { Ui } = PageEditorConfig;
1414

15+
const {
16+
ContentReview: { WorkflowStateProvider }
17+
} = Components;
18+
1519
export const PageEditor = Ui.TopBar.Layout.createDecorator(Original => {
1620
return function PageEditorTopBarWorkflowsState() {
1721
const page = useSelectFromDocument(doc => {

packages/app-website-builder-workflows/src/Components/PageEditor/PageFormWorkflowState.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import React from "react";
2-
import { WorkflowStateBar } from "@webiny/app-workflows";
2+
import { Components } from "@webiny/app-workflows";
33
import { Alert, Grid } from "@webiny/admin-ui";
44
import type { IWorkflowState } from "@webiny/app-workflows/types.js";
55

6+
const {
7+
ContentReview: { WorkflowStateBar }
8+
} = Components;
9+
610
interface IStoreAlertProps {
711
state: IWorkflowState | undefined | null;
812
}

packages/app-website-builder-workflows/src/Components/PageEditor/PageFormWorkflowStateTooltip.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import React from "react";
2-
import { WorkflowStateTooltip } from "@webiny/app-workflows";
2+
import { Components } from "@webiny/app-workflows";
33
import { PageEditorConfig } from "@webiny/app-website-builder";
44

5+
const {
6+
ContentReview: { WorkflowStateTooltip }
7+
} = Components;
8+
59
const { Ui } = PageEditorConfig;
610

711
const TooltipButton = () => {

packages/app-website-builder-workflows/src/Components/PageWorkflows/PageWorkflowsEditorView.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ import React, { useCallback, useMemo } from "react";
22
import { AdminConfig, useRoute, useRouter } from "@webiny/app-admin";
33
import { Routes } from "~/routes.js";
44
import type { IWorkflowApplication } from "@webiny/app-workflows";
5-
import { WorkflowsAdmin } from "@webiny/app-workflows";
5+
import { Components } from "@webiny/app-workflows";
66
import { Icon } from "@webiny/admin-ui";
77
import { ReactComponent as WorkflowsIcon } from "@webiny/icons/workspaces.svg";
88
import { WB_PAGE_APP } from "~/constants.js";
99

10+
const {
11+
Admin: { WorkflowsEditor }
12+
} = Components;
13+
1014
const { Menu } = AdminConfig;
1115

1216
export const PageWorkflowsEditorMenu = () => {
@@ -49,5 +53,5 @@ export const PageWorkflowsEditorView = () => {
4953
return apps.find(a => a.id === route.params.app) || apps[0];
5054
}, [route.params.app, apps]);
5155

52-
return <WorkflowsAdmin apps={apps} onAppClick={onAppClick} app={app.id} />;
56+
return <WorkflowsEditor apps={apps} onAppClick={onAppClick} app={app.id} />;
5357
};

packages/app-website-builder-workflows/src/Components/PagesList/PagesListContentReviews.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import React from "react";
22
import { Sidebar } from "@webiny/admin-ui";
33
import { PageListConfig } from "@webiny/app-website-builder";
4-
import { WorkflowStateListAppOverlay } from "@webiny/app-workflows";
4+
import { Components } from "@webiny/app-workflows";
55
import { useApolloClient } from "@apollo/react-hooks";
66
import { WB_PAGE_APP } from "~/constants.js";
77
import { ReactComponent as WorkflowStateListIcon } from "@webiny/icons/work.svg";
88

9+
const {
10+
Overlay: { WorkflowStateListAppOverlay }
11+
} = Components;
12+
913
const { Browser } = PageListConfig;
1014

1115
const PageListContentReviewsButton = () => {

packages/app-workflows/src/Components/WorkflowState/Bar/WorkflowStateBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface IWorkflowStateBarPropsChildren {
2424
params: IWorkflowStateBarPropsChildrenParams
2525
): React.ReactElement | React.ReactElement[] | null;
2626
}
27-
interface IWorkflowStateBarProps {
27+
export interface IWorkflowStateBarProps {
2828
/**
2929
* To have access to a state and workflow, render function is meant to be used.
3030
* It will rerender on every state change, and it will provide the latest state and workflow.

packages/app-workflows/src/Components/WorkflowState/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export * from "./useWorkflowState.js";
12
export * from "./WorkflowStateProvider.js";
23
export * from "./Bar/WorkflowStateBar.js";
34
export * from "./Overlay/WorkflowStateOverlay.js";

packages/app-workflows/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { WorkflowsEditor } from "./Components/WorkflowsEditor/index.js";
1616
import { HasWorkflowsEditorPermission } from "./Components/WorkflowsPermissions/index.js";
1717

1818
export { useCanUseWorkflows } from "./hooks/canUseWorkflows.js";
19-
export { useWorkflowState } from "./Components/WorkflowState/useWorkflowState.js";
19+
export { useWorkflowState } from "./Components/WorkflowState/index.js";
2020
export type { IWorkflowApplication, IWorkflowState } from "~/types.js";
2121
export { WorkflowStateValue } from "~/types.js";
2222
export { useWorkflowsPermission } from "./Components/WorkflowsPermissions/index.js";

packages/cli/files/references.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)