@webiny/app-website-builder-workflows 6.0.0-rc.0 → 6.0.0-rc.1
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { useSelectFromDocument } from "@webiny/app-website-builder/BaseEditor/hooks/useSelectFromDocument.js";
|
|
3
3
|
import { useApolloClient } from "@apollo/react-hooks";
|
|
4
|
-
import {
|
|
4
|
+
import { useAuthentication } from "@webiny/app-admin";
|
|
5
5
|
import { Components } from "@webiny/app-workflows";
|
|
6
6
|
import { WB_PAGE_APP } from "../../constants.js";
|
|
7
7
|
import { PageFormWorkflowState } from "./PageFormWorkflowState.js";
|
|
@@ -25,7 +25,7 @@ export const PageEditorLayout = Ui.TopBar.Layout.createDecorator(Original => {
|
|
|
25
25
|
const client = useApolloClient();
|
|
26
26
|
const {
|
|
27
27
|
identity
|
|
28
|
-
} =
|
|
28
|
+
} = useAuthentication();
|
|
29
29
|
return /*#__PURE__*/React.createElement(WorkflowStateProvider, {
|
|
30
30
|
app: WB_PAGE_APP,
|
|
31
31
|
id: page.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useSelectFromDocument","useApolloClient","
|
|
1
|
+
{"version":3,"names":["React","useSelectFromDocument","useApolloClient","useAuthentication","Components","WB_PAGE_APP","PageFormWorkflowState","PageEditorConfig","Ui","ContentReview","WorkflowStateProvider","PageEditorLayout","TopBar","Layout","createDecorator","Original","PageEditorTopBarWorkflowsState","page","doc","id","title","properties","client","identity","createElement","app"],"sources":["PageEditorLayout.tsx"],"sourcesContent":["import React from \"react\";\nimport { useSelectFromDocument } from \"@webiny/app-website-builder/BaseEditor/hooks/useSelectFromDocument.js\";\nimport { useApolloClient } from \"@apollo/react-hooks\";\nimport { useAuthentication } from \"@webiny/app-admin\";\nimport { Components } from \"@webiny/app-workflows\";\nimport { WB_PAGE_APP } from \"~/constants.js\";\nimport { PageFormWorkflowState } from \"./PageFormWorkflowState.js\";\nimport { PageEditorConfig } from \"@webiny/app-website-builder\";\n\nconst { Ui } = PageEditorConfig;\n\nconst {\n ContentReview: { WorkflowStateProvider }\n} = Components;\n\nexport const PageEditorLayout = Ui.TopBar.Layout.createDecorator(Original => {\n return function PageEditorTopBarWorkflowsState() {\n const page = useSelectFromDocument(doc => {\n return {\n id: doc.id,\n title: doc.properties.title || \"unknown page\"\n };\n });\n\n const client = useApolloClient();\n const { identity } = useAuthentication();\n\n return (\n <WorkflowStateProvider\n app={WB_PAGE_APP}\n id={page.id}\n identity={identity}\n client={client}\n title={`Website Builder: ${page.title}`}\n >\n {/* Original top bar*/}\n <Original />\n {/* Should render workflow state bar and the alert for storing changes */}\n <PageFormWorkflowState />\n </WorkflowStateProvider>\n );\n };\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,qBAAqB,QAAQ,uEAAuE;AAC7G,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,iBAAiB,QAAQ,mBAAmB;AACrD,SAASC,UAAU,QAAQ,uBAAuB;AAClD,SAASC,WAAW;AACpB,SAASC,qBAAqB;AAC9B,SAASC,gBAAgB,QAAQ,6BAA6B;AAE9D,MAAM;EAAEC;AAAG,CAAC,GAAGD,gBAAgB;AAE/B,MAAM;EACFE,aAAa,EAAE;IAAEC;EAAsB;AAC3C,CAAC,GAAGN,UAAU;AAEd,OAAO,MAAMO,gBAAgB,GAAGH,EAAE,CAACI,MAAM,CAACC,MAAM,CAACC,eAAe,CAACC,QAAQ,IAAI;EACzE,OAAO,SAASC,8BAA8BA,CAAA,EAAG;IAC7C,MAAMC,IAAI,GAAGhB,qBAAqB,CAACiB,GAAG,IAAI;MACtC,OAAO;QACHC,EAAE,EAAED,GAAG,CAACC,EAAE;QACVC,KAAK,EAAEF,GAAG,CAACG,UAAU,CAACD,KAAK,IAAI;MACnC,CAAC;IACL,CAAC,CAAC;IAEF,MAAME,MAAM,GAAGpB,eAAe,CAAC,CAAC;IAChC,MAAM;MAAEqB;IAAS,CAAC,GAAGpB,iBAAiB,CAAC,CAAC;IAExC,oBACIH,KAAA,CAAAwB,aAAA,CAACd,qBAAqB;MAClBe,GAAG,EAAEpB,WAAY;MACjBc,EAAE,EAAEF,IAAI,CAACE,EAAG;MACZI,QAAQ,EAAEA,QAAS;MACnBD,MAAM,EAAEA,MAAO;MACfF,KAAK,EAAE,oBAAoBH,IAAI,CAACG,KAAK;IAAG,gBAGxCpB,KAAA,CAAAwB,aAAA,CAACT,QAAQ,MAAE,CAAC,eAEZf,KAAA,CAAAwB,aAAA,CAAClB,qBAAqB,MAAE,CACL,CAAC;EAEhC,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,35 +1,22 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Components } from "@webiny/app-workflows";
|
|
3
|
-
import { Alert
|
|
3
|
+
import { Alert } from "@webiny/admin-ui";
|
|
4
4
|
const {
|
|
5
5
|
ContentReview: {
|
|
6
6
|
WorkflowStateBar
|
|
7
7
|
}
|
|
8
8
|
} = Components;
|
|
9
|
-
const StoreAlert = ({
|
|
10
|
-
state
|
|
11
|
-
}) => {
|
|
12
|
-
if (!state) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
-
className: "max-w-screen bg-white p-sm"
|
|
17
|
-
}, /*#__PURE__*/React.createElement(Grid, {
|
|
18
|
-
className: "w-full"
|
|
19
|
-
}, /*#__PURE__*/React.createElement(Grid.Column, {
|
|
20
|
-
span: 12
|
|
21
|
-
}, /*#__PURE__*/React.createElement(Alert, {
|
|
22
|
-
className: "mb-md mt-md",
|
|
23
|
-
type: "danger"
|
|
24
|
-
}, "Any changes you do on the page will not be stored!"))));
|
|
25
|
-
};
|
|
26
9
|
export const PageFormWorkflowState = () => {
|
|
27
10
|
return /*#__PURE__*/React.createElement(WorkflowStateBar, null, ({
|
|
28
|
-
state
|
|
11
|
+
state,
|
|
12
|
+
stateBar
|
|
29
13
|
}) => {
|
|
30
|
-
return /*#__PURE__*/React.createElement(
|
|
31
|
-
|
|
32
|
-
}
|
|
14
|
+
return state ? /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: "max-w-screen bg-white p-sm"
|
|
16
|
+
}, stateBar, /*#__PURE__*/React.createElement(Alert, {
|
|
17
|
+
className: "mb-md mt-md",
|
|
18
|
+
type: "danger"
|
|
19
|
+
}, "Any changes you do on the page will not be stored!")) : null;
|
|
33
20
|
});
|
|
34
21
|
};
|
|
35
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Components","Alert","
|
|
1
|
+
{"version":3,"names":["React","Components","Alert","ContentReview","WorkflowStateBar","PageFormWorkflowState","createElement","state","stateBar","className","type"],"sources":["PageFormWorkflowState.tsx"],"sourcesContent":["import React from \"react\";\nimport { Components } from \"@webiny/app-workflows\";\nimport { Alert } from \"@webiny/admin-ui\";\n\nconst {\n ContentReview: { WorkflowStateBar }\n} = Components;\n\nexport const PageFormWorkflowState = () => {\n return (\n <WorkflowStateBar>\n {({ state, stateBar }) => {\n return state ? (\n <div className={\"max-w-screen bg-white p-sm\"}>\n {stateBar}\n <Alert className={\"mb-md mt-md\"} type=\"danger\">\n Any changes you do on the page will not be stored!\n </Alert>\n </div>\n ) : null;\n }}\n </WorkflowStateBar>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,uBAAuB;AAClD,SAASC,KAAK,QAAQ,kBAAkB;AAExC,MAAM;EACFC,aAAa,EAAE;IAAEC;EAAiB;AACtC,CAAC,GAAGH,UAAU;AAEd,OAAO,MAAMI,qBAAqB,GAAGA,CAAA,KAAM;EACvC,oBACIL,KAAA,CAAAM,aAAA,CAACF,gBAAgB,QACZ,CAAC;IAAEG,KAAK;IAAEC;EAAS,CAAC,KAAK;IACtB,OAAOD,KAAK,gBACRP,KAAA,CAAAM,aAAA;MAAKG,SAAS,EAAE;IAA6B,GACxCD,QAAQ,eACTR,KAAA,CAAAM,aAAA,CAACJ,KAAK;MAACO,SAAS,EAAE,aAAc;MAACC,IAAI,EAAC;IAAQ,GAAC,oDAExC,CACN,CAAC,GACN,IAAI;EACZ,CACc,CAAC;AAE3B,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-website-builder-workflows",
|
|
3
|
-
"version": "6.0.0-rc.
|
|
3
|
+
"version": "6.0.0-rc.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@apollo/react-hooks": "3.1.5",
|
|
14
|
-
"@webiny/admin-ui": "6.0.0-rc.
|
|
15
|
-
"@webiny/app": "6.0.0-rc.
|
|
16
|
-
"@webiny/app-admin": "6.0.0-rc.
|
|
17
|
-
"@webiny/app-website-builder": "6.0.0-rc.
|
|
18
|
-
"@webiny/app-workflows": "6.0.0-rc.
|
|
19
|
-
"@webiny/feature": "6.0.0-rc.
|
|
20
|
-
"@webiny/icons": "6.0.0-rc.
|
|
14
|
+
"@webiny/admin-ui": "6.0.0-rc.1",
|
|
15
|
+
"@webiny/app": "6.0.0-rc.1",
|
|
16
|
+
"@webiny/app-admin": "6.0.0-rc.1",
|
|
17
|
+
"@webiny/app-website-builder": "6.0.0-rc.1",
|
|
18
|
+
"@webiny/app-workflows": "6.0.0-rc.1",
|
|
19
|
+
"@webiny/feature": "6.0.0-rc.1",
|
|
20
|
+
"@webiny/icons": "6.0.0-rc.1",
|
|
21
21
|
"mobx": "6.15.0",
|
|
22
22
|
"mobx-react-lite": "3.4.3",
|
|
23
23
|
"react": "18.2.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/react": "18.2.79",
|
|
29
|
-
"@webiny/build-tools": "6.0.0-rc.
|
|
29
|
+
"@webiny/build-tools": "6.0.0-rc.1",
|
|
30
30
|
"rimraf": "6.1.3",
|
|
31
31
|
"typescript": "5.9.3"
|
|
32
32
|
},
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"removeViewBox": false
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "36d702721ff9ed39fb21d6f5fe7922a2a8716e63"
|
|
43
43
|
}
|