@webiny/app-website-builder-workflows 0.0.0-unstable.3c5210ad37

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.
Files changed (93) hide show
  1. package/Components/OptionItem/OpenInNewWindow.d.ts +2 -0
  2. package/Components/OptionItem/OpenInNewWindow.js +41 -0
  3. package/Components/OptionItem/OpenInNewWindow.js.map +1 -0
  4. package/Components/OptionItem/index.d.ts +1 -0
  5. package/Components/OptionItem/index.js +3 -0
  6. package/Components/OptionItem/index.js.map +1 -0
  7. package/Components/PageEditor/PageEditorAutoSave.d.ts +2 -0
  8. package/Components/PageEditor/PageEditorAutoSave.js +33 -0
  9. package/Components/PageEditor/PageEditorAutoSave.js.map +1 -0
  10. package/Components/PageEditor/PageEditorConfig.d.ts +2 -0
  11. package/Components/PageEditor/PageEditorConfig.js +14 -0
  12. package/Components/PageEditor/PageEditorConfig.js.map +1 -0
  13. package/Components/PageEditor/PageEditorLayout.d.ts +2 -0
  14. package/Components/PageEditor/PageEditorLayout.js +39 -0
  15. package/Components/PageEditor/PageEditorLayout.js.map +1 -0
  16. package/Components/PageEditor/PageEditorSettings.d.ts +2 -0
  17. package/Components/PageEditor/PageEditorSettings.js +30 -0
  18. package/Components/PageEditor/PageEditorSettings.js.map +1 -0
  19. package/Components/PageEditor/PageEditorSidebar.d.ts +2 -0
  20. package/Components/PageEditor/PageEditorSidebar.js +17 -0
  21. package/Components/PageEditor/PageEditorSidebar.js.map +1 -0
  22. package/Components/PageEditor/PageEditorToolbar.d.ts +2 -0
  23. package/Components/PageEditor/PageEditorToolbar.js +17 -0
  24. package/Components/PageEditor/PageEditorToolbar.js.map +1 -0
  25. package/Components/PageEditor/PageFormWorkflowState.d.ts +2 -0
  26. package/Components/PageEditor/PageFormWorkflowState.js +23 -0
  27. package/Components/PageEditor/PageFormWorkflowState.js.map +1 -0
  28. package/Components/PageEditor/PageFormWorkflowStatePublishButton.d.ts +2 -0
  29. package/Components/PageEditor/PageFormWorkflowStatePublishButton.js +33 -0
  30. package/Components/PageEditor/PageFormWorkflowStatePublishButton.js.map +1 -0
  31. package/Components/PageEditor/PageFormWorkflowStateTooltip.d.ts +2 -0
  32. package/Components/PageEditor/PageFormWorkflowStateTooltip.js +23 -0
  33. package/Components/PageEditor/PageFormWorkflowStateTooltip.js.map +1 -0
  34. package/Components/PageWorkflows/PageWorkflowsEditorView.d.ts +3 -0
  35. package/Components/PageWorkflows/PageWorkflowsEditorView.js +60 -0
  36. package/Components/PageWorkflows/PageWorkflowsEditorView.js.map +1 -0
  37. package/Components/PageWorkflows/index.d.ts +1 -0
  38. package/Components/PageWorkflows/index.js +3 -0
  39. package/Components/PageWorkflows/index.js.map +1 -0
  40. package/Components/PagesList/PageListChangeStatus.d.ts +2 -0
  41. package/Components/PagesList/PageListChangeStatus.js +31 -0
  42. package/Components/PagesList/PageListChangeStatus.js.map +1 -0
  43. package/Components/PagesList/PagesList.d.ts +2 -0
  44. package/Components/PagesList/PagesList.js +9 -0
  45. package/Components/PagesList/PagesList.js.map +1 -0
  46. package/Components/PagesList/PagesListContentReviews.d.ts +2 -0
  47. package/Components/PagesList/PagesListContentReviews.js +42 -0
  48. package/Components/PagesList/PagesListContentReviews.js.map +1 -0
  49. package/Components/PagesList/index.d.ts +1 -0
  50. package/Components/PagesList/index.js +3 -0
  51. package/Components/PagesList/index.js.map +1 -0
  52. package/Components/index.d.ts +4 -0
  53. package/Components/index.js +6 -0
  54. package/Components/index.js.map +1 -0
  55. package/LICENSE +21 -0
  56. package/README.md +11 -0
  57. package/Routes/WebsiteBuilderWorkflowsMenu.d.ts +2 -0
  58. package/Routes/WebsiteBuilderWorkflowsMenu.js +35 -0
  59. package/Routes/WebsiteBuilderWorkflowsMenu.js.map +1 -0
  60. package/Routes/index.d.ts +1 -0
  61. package/Routes/index.js +3 -0
  62. package/Routes/index.js.map +1 -0
  63. package/constants.d.ts +1 -0
  64. package/constants.js +3 -0
  65. package/constants.js.map +1 -0
  66. package/hooks/usePage.d.ts +5 -0
  67. package/hooks/usePage.js +20 -0
  68. package/hooks/usePage.js.map +1 -0
  69. package/index.d.ts +2 -0
  70. package/index.js +15 -0
  71. package/index.js.map +1 -0
  72. package/package.json +43 -0
  73. package/presentation/page/PageGet/WorkflowStatesGetPageGraphQLFieldSelection.d.ts +8 -0
  74. package/presentation/page/PageGet/WorkflowStatesGetPageGraphQLFieldSelection.js +19 -0
  75. package/presentation/page/PageGet/WorkflowStatesGetPageGraphQLFieldSelection.js.map +1 -0
  76. package/presentation/page/PageGet/feature.d.ts +1 -0
  77. package/presentation/page/PageGet/feature.js +10 -0
  78. package/presentation/page/PageGet/feature.js.map +1 -0
  79. package/presentation/page/PageList/PageListPresenterDecorator.d.ts +13 -0
  80. package/presentation/page/PageList/PageListPresenterDecorator.js +39 -0
  81. package/presentation/page/PageList/PageListPresenterDecorator.js.map +1 -0
  82. package/presentation/page/PageList/WorkflowStateListPagesFieldSelection.d.ts +8 -0
  83. package/presentation/page/PageList/WorkflowStateListPagesFieldSelection.js +19 -0
  84. package/presentation/page/PageList/WorkflowStateListPagesFieldSelection.js.map +1 -0
  85. package/presentation/page/PageList/feature.d.ts +1 -0
  86. package/presentation/page/PageList/feature.js +12 -0
  87. package/presentation/page/PageList/feature.js.map +1 -0
  88. package/routes.d.ts +9 -0
  89. package/routes.js +20 -0
  90. package/routes.js.map +1 -0
  91. package/types.d.ts +29 -0
  92. package/types.js +3 -0
  93. package/types.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Sidebar","PageListConfig","Components","useApolloClient","WB_PAGE_APP","ReactComponent","WorkflowStateListIcon","Overlay","WorkflowStateListAppOverlay","Browser","PageListContentReviewsButton","client","createElement","app","showOverlay","Item","className","onClick","text","icon","Icon","element","label","PagesListContentReviews","Footer","name"],"sources":["PagesListContentReviews.tsx"],"sourcesContent":["import React from \"react\";\nimport { Sidebar } from \"@webiny/admin-ui\";\nimport { PageListConfig } from \"@webiny/app-website-builder\";\nimport { Components } from \"@webiny/app-workflows\";\nimport { useApolloClient } from \"@apollo/react-hooks\";\nimport { WB_PAGE_APP } from \"~/constants.js\";\nimport { ReactComponent as WorkflowStateListIcon } from \"@webiny/icons/work_outline.svg\";\n\nconst {\n Overlay: { WorkflowStateListAppOverlay }\n} = Components;\n\nconst { Browser } = PageListConfig;\n\nconst PageListContentReviewsButton = () => {\n const client = useApolloClient();\n\n return (\n <WorkflowStateListAppOverlay client={client} app={WB_PAGE_APP}>\n {({ showOverlay }) => {\n return (\n <Sidebar.Item\n className={\"w-full\"}\n onClick={showOverlay}\n text={\"Content Reviews\"}\n icon={\n <Sidebar.Item.Icon\n element={<WorkflowStateListIcon />}\n label={\"Content Reviews\"}\n />\n }\n />\n );\n }}\n </WorkflowStateListAppOverlay>\n );\n};\n\nexport const PagesListContentReviews = () => {\n return (\n <Browser.Sidebar.Footer\n name={\"contentReviews\"}\n element={<PageListContentReviewsButton />}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SAASC,UAAU,QAAQ,uBAAuB;AAClD,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,WAAW;AACpB,SAASC,cAAc,IAAIC,qBAAqB,QAAQ,gCAAgC;AAExF,MAAM;EACFC,OAAO,EAAE;IAAEC;EAA4B;AAC3C,CAAC,GAAGN,UAAU;AAEd,MAAM;EAAEO;AAAQ,CAAC,GAAGR,cAAc;AAElC,MAAMS,4BAA4B,GAAGA,CAAA,KAAM;EACvC,MAAMC,MAAM,GAAGR,eAAe,CAAC,CAAC;EAEhC,oBACIJ,KAAA,CAAAa,aAAA,CAACJ,2BAA2B;IAACG,MAAM,EAAEA,MAAO;IAACE,GAAG,EAAET;EAAY,GACzD,CAAC;IAAEU;EAAY,CAAC,KAAK;IAClB,oBACIf,KAAA,CAAAa,aAAA,CAACZ,OAAO,CAACe,IAAI;MACTC,SAAS,EAAE,QAAS;MACpBC,OAAO,EAAEH,WAAY;MACrBI,IAAI,EAAE,iBAAkB;MACxBC,IAAI,eACApB,KAAA,CAAAa,aAAA,CAACZ,OAAO,CAACe,IAAI,CAACK,IAAI;QACdC,OAAO,eAAEtB,KAAA,CAAAa,aAAA,CAACN,qBAAqB,MAAE,CAAE;QACnCgB,KAAK,EAAE;MAAkB,CAC5B;IACJ,CACJ,CAAC;EAEV,CACyB,CAAC;AAEtC,CAAC;AAED,OAAO,MAAMC,uBAAuB,GAAGA,CAAA,KAAM;EACzC,oBACIxB,KAAA,CAAAa,aAAA,CAACH,OAAO,CAACT,OAAO,CAACwB,MAAM;IACnBC,IAAI,EAAE,gBAAiB;IACvBJ,OAAO,eAAEtB,KAAA,CAAAa,aAAA,CAACF,4BAA4B,MAAE;EAAE,CAC7C,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export { PagesList } from "./PagesList.js";
@@ -0,0 +1,3 @@
1
+ export { PagesList } from "./PagesList.js";
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PagesList"],"sources":["index.ts"],"sourcesContent":["export { PagesList } from \"./PagesList.js\";\n"],"mappings":"AAAA,SAASA,SAAS","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export * from "./OptionItem/index.js";
2
+ export * from "./PageEditor/PageEditorConfig.js";
3
+ export * from "./PagesList/index.js";
4
+ export * from "./PageWorkflows/index.js";
@@ -0,0 +1,6 @@
1
+ export * from "./OptionItem/index.js";
2
+ export * from "./PageEditor/PageEditorConfig.js";
3
+ export * from "./PagesList/index.js";
4
+ export * from "./PageWorkflows/index.js";
5
+
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Webiny
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @webiny/app-website-builder-workflows
2
+
3
+ > [!NOTE]
4
+ > This package is part of the [Webiny](https://www.webiny.com) monorepo.
5
+ > It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
6
+
7
+ 📘 **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
8
+
9
+ ---
10
+
11
+ _This README file is automatically generated during the publish process._
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const WebsiteBuilderWorkflowsMenu: () => React.JSX.Element | null;
@@ -0,0 +1,35 @@
1
+ import React, { Suspense } from "react";
2
+ import { Routes } from "../routes.js";
3
+ import Helmet from "react-helmet";
4
+ import { PageWorkflowsEditorMenu, PageWorkflowsEditorView } from "../Components/PageWorkflows/PageWorkflowsEditorView.js";
5
+ import { i18n } from "@webiny/app/i18n/index.js";
6
+ import { SecureRoute } from "@webiny/app-admin";
7
+ import { OverlayLoader } from "@webiny/admin-ui";
8
+ import { AdminConfig, AdminLayout } from "@webiny/app-admin";
9
+ import { useCanUseWorkflows } from "@webiny/app-workflows";
10
+ const t = i18n.namespace("WebsiteBuilder.Page.Workflows.Editor");
11
+ const Loader = ({
12
+ children,
13
+ ...props
14
+ }) => /*#__PURE__*/React.createElement(Suspense, {
15
+ fallback: /*#__PURE__*/React.createElement(OverlayLoader, null)
16
+ }, /*#__PURE__*/React.cloneElement(children, props));
17
+ const {
18
+ Route
19
+ } = AdminConfig;
20
+ export const WebsiteBuilderWorkflowsMenu = () => {
21
+ const {
22
+ canUseWorkflows
23
+ } = useCanUseWorkflows();
24
+ if (!canUseWorkflows) {
25
+ return null;
26
+ }
27
+ return /*#__PURE__*/React.createElement(AdminConfig, null, /*#__PURE__*/React.createElement(Route, {
28
+ route: Routes.Pages.Workflows,
29
+ element: /*#__PURE__*/React.createElement(SecureRoute, {
30
+ permission: "wb.page"
31
+ }, /*#__PURE__*/React.createElement(AdminLayout, null, /*#__PURE__*/React.createElement(Helmet, null, /*#__PURE__*/React.createElement("title", null, t`Workflows`)), /*#__PURE__*/React.createElement(Loader, null, /*#__PURE__*/React.createElement(PageWorkflowsEditorView, null))))
32
+ }), /*#__PURE__*/React.createElement(PageWorkflowsEditorMenu, null));
33
+ };
34
+
35
+ //# sourceMappingURL=WebsiteBuilderWorkflowsMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Suspense","Routes","Helmet","PageWorkflowsEditorMenu","PageWorkflowsEditorView","i18n","SecureRoute","OverlayLoader","AdminConfig","AdminLayout","useCanUseWorkflows","t","namespace","Loader","children","props","createElement","fallback","cloneElement","Route","WebsiteBuilderWorkflowsMenu","canUseWorkflows","route","Pages","Workflows","element","permission"],"sources":["WebsiteBuilderWorkflowsMenu.tsx"],"sourcesContent":["import React, { Suspense } from \"react\";\nimport { Routes } from \"~/routes.js\";\nimport Helmet from \"react-helmet\";\nimport {\n PageWorkflowsEditorMenu,\n PageWorkflowsEditorView\n} from \"~/Components/PageWorkflows/PageWorkflowsEditorView.js\";\nimport { i18n } from \"@webiny/app/i18n/index.js\";\nimport { SecureRoute } from \"@webiny/app-admin\";\nimport { OverlayLoader } from \"@webiny/admin-ui\";\nimport { AdminConfig, AdminLayout } from \"@webiny/app-admin\";\nimport { useCanUseWorkflows } from \"@webiny/app-workflows\";\n\nconst t = i18n.namespace(\"WebsiteBuilder.Page.Workflows.Editor\");\n\ninterface LoaderProps {\n children: React.ReactNode;\n}\n\nconst Loader = ({ children, ...props }: LoaderProps) => (\n <Suspense fallback={<OverlayLoader />}>\n {React.cloneElement(children as unknown as React.ReactElement, props)}\n </Suspense>\n);\n\nconst { Route } = AdminConfig;\n\nexport const WebsiteBuilderWorkflowsMenu = () => {\n const { canUseWorkflows } = useCanUseWorkflows();\n if (!canUseWorkflows) {\n return null;\n }\n return (\n <AdminConfig>\n <Route\n route={Routes.Pages.Workflows}\n element={\n <SecureRoute permission={\"wb.page\"}>\n <AdminLayout>\n <Helmet>\n <title>{t`Workflows`}</title>\n </Helmet>\n <Loader>\n <PageWorkflowsEditorView />\n </Loader>\n </AdminLayout>\n </SecureRoute>\n }\n />\n <PageWorkflowsEditorMenu />\n </AdminConfig>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,MAAM;AACf,OAAOC,MAAM,MAAM,cAAc;AACjC,SACIC,uBAAuB,EACvBC,uBAAuB;AAE3B,SAASC,IAAI,QAAQ,2BAA2B;AAChD,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,WAAW,EAAEC,WAAW,QAAQ,mBAAmB;AAC5D,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D,MAAMC,CAAC,GAAGN,IAAI,CAACO,SAAS,CAAC,sCAAsC,CAAC;AAMhE,MAAMC,MAAM,GAAGA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAmB,CAAC,kBAC/ChB,KAAA,CAAAiB,aAAA,CAAChB,QAAQ;EAACiB,QAAQ,eAAElB,KAAA,CAAAiB,aAAA,CAACT,aAAa,MAAE;AAAE,gBACjCR,KAAK,CAACmB,YAAY,CAACJ,QAAQ,EAAmCC,KAAK,CAC9D,CACb;AAED,MAAM;EAAEI;AAAM,CAAC,GAAGX,WAAW;AAE7B,OAAO,MAAMY,2BAA2B,GAAGA,CAAA,KAAM;EAC7C,MAAM;IAAEC;EAAgB,CAAC,GAAGX,kBAAkB,CAAC,CAAC;EAChD,IAAI,CAACW,eAAe,EAAE;IAClB,OAAO,IAAI;EACf;EACA,oBACItB,KAAA,CAAAiB,aAAA,CAACR,WAAW,qBACRT,KAAA,CAAAiB,aAAA,CAACG,KAAK;IACFG,KAAK,EAAErB,MAAM,CAACsB,KAAK,CAACC,SAAU;IAC9BC,OAAO,eACH1B,KAAA,CAAAiB,aAAA,CAACV,WAAW;MAACoB,UAAU,EAAE;IAAU,gBAC/B3B,KAAA,CAAAiB,aAAA,CAACP,WAAW,qBACRV,KAAA,CAAAiB,aAAA,CAACd,MAAM,qBACHH,KAAA,CAAAiB,aAAA,gBAAQL,CAAC,WAAmB,CACxB,CAAC,eACTZ,KAAA,CAAAiB,aAAA,CAACH,MAAM,qBACHd,KAAA,CAAAiB,aAAA,CAACZ,uBAAuB,MAAE,CACtB,CACC,CACJ;EAChB,CACJ,CAAC,eACFL,KAAA,CAAAiB,aAAA,CAACb,uBAAuB,MAAE,CACjB,CAAC;AAEtB,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export { WebsiteBuilderWorkflowsMenu } from "./WebsiteBuilderWorkflowsMenu.js";
@@ -0,0 +1,3 @@
1
+ export { WebsiteBuilderWorkflowsMenu } from "./WebsiteBuilderWorkflowsMenu.js";
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["WebsiteBuilderWorkflowsMenu"],"sources":["index.ts"],"sourcesContent":["export { WebsiteBuilderWorkflowsMenu } from \"./WebsiteBuilderWorkflowsMenu.js\";\n"],"mappings":"AAAA,SAASA,2BAA2B","ignoreList":[]}
package/constants.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const WB_PAGE_APP = "wb.page";
package/constants.js ADDED
@@ -0,0 +1,3 @@
1
+ export const WB_PAGE_APP = "wb.page";
2
+
3
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["WB_PAGE_APP"],"sources":["constants.ts"],"sourcesContent":["export const WB_PAGE_APP = \"wb.page\";\n"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG,SAAS","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ import type { PageDto } from "@webiny/app-website-builder/domain/Page/index.js";
2
+ import type { WithWorkflows } from "../types.js";
3
+ export declare const usePage: () => {
4
+ page: WithWorkflows<PageDto>;
5
+ };
@@ -0,0 +1,20 @@
1
+ import { usePage as baseUsePage } from "@webiny/app-website-builder/modules/pages/PagesList/hooks/usePage.js";
2
+ const decoratePage = page => {
3
+ return {
4
+ ...page,
5
+ workflows: {
6
+ // @ts-expect-error
7
+ ...page.workflows
8
+ },
9
+ $selectable: false
10
+ };
11
+ };
12
+ export const usePage = () => {
13
+ const usage = baseUsePage();
14
+ return {
15
+ ...usage,
16
+ page: decoratePage(usage.page)
17
+ };
18
+ };
19
+
20
+ //# sourceMappingURL=usePage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["usePage","baseUsePage","decoratePage","page","workflows","$selectable","usage"],"sources":["usePage.ts"],"sourcesContent":["import { usePage as baseUsePage } from \"@webiny/app-website-builder/modules/pages/PagesList/hooks/usePage.js\";\nimport type { PageDto } from \"@webiny/app-website-builder/domain/Page/index.js\";\nimport type { WithWorkflows } from \"~/types.js\";\n\nconst decoratePage = (page: PageDto): WithWorkflows<PageDto> => {\n return {\n ...page,\n workflows: {\n // @ts-expect-error\n ...page.workflows\n },\n $selectable: false\n };\n};\n\nexport const usePage = () => {\n const usage = baseUsePage();\n\n return {\n ...usage,\n page: decoratePage(usage.page)\n };\n};\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,WAAW,QAAQ,sEAAsE;AAI7G,MAAMC,YAAY,GAAIC,IAAa,IAA6B;EAC5D,OAAO;IACH,GAAGA,IAAI;IACPC,SAAS,EAAE;MACP;MACA,GAAGD,IAAI,CAACC;IACZ,CAAC;IACDC,WAAW,EAAE;EACjB,CAAC;AACL,CAAC;AAED,OAAO,MAAML,OAAO,GAAGA,CAAA,KAAM;EACzB,MAAMM,KAAK,GAAGL,WAAW,CAAC,CAAC;EAE3B,OAAO;IACH,GAAGK,KAAK;IACRH,IAAI,EAAED,YAAY,CAACI,KAAK,CAACH,IAAI;EACjC,CAAC;AACL,CAAC","ignoreList":[]}
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const WebsiteBuilderWorkflows: () => React.JSX.Element;
package/index.js ADDED
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { RegisterFeature, Wcp } from "@webiny/app-admin";
3
+ import { WebsiteBuilderWorkflowsMenu } from "./Routes/index.js";
4
+ import { ListOpenInNewWindow, PageEditorConfig, PagesList } from "./Components/index.js";
5
+ import { PageListWorkflowsFeature } from "./presentation/page/PageList/feature.js";
6
+ import { PageGetWorkflowsFeature } from "./presentation/page/PageGet/feature.js";
7
+ export const WebsiteBuilderWorkflows = () => {
8
+ return /*#__PURE__*/React.createElement(Wcp.CanUseWorkflows, null, /*#__PURE__*/React.createElement(RegisterFeature, {
9
+ feature: PageListWorkflowsFeature
10
+ }), /*#__PURE__*/React.createElement(RegisterFeature, {
11
+ feature: PageGetWorkflowsFeature
12
+ }), /*#__PURE__*/React.createElement(WebsiteBuilderWorkflowsMenu, null), /*#__PURE__*/React.createElement(PageEditorConfig, null), /*#__PURE__*/React.createElement(PagesList, null), /*#__PURE__*/React.createElement(ListOpenInNewWindow, null));
13
+ };
14
+
15
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","RegisterFeature","Wcp","WebsiteBuilderWorkflowsMenu","ListOpenInNewWindow","PageEditorConfig","PagesList","PageListWorkflowsFeature","PageGetWorkflowsFeature","WebsiteBuilderWorkflows","createElement","CanUseWorkflows","feature"],"sources":["index.tsx"],"sourcesContent":["import React from \"react\";\nimport { RegisterFeature, Wcp } from \"@webiny/app-admin\";\nimport { WebsiteBuilderWorkflowsMenu } from \"~/Routes/index.js\";\nimport { ListOpenInNewWindow, PageEditorConfig, PagesList } from \"~/Components/index.js\";\nimport { PageListWorkflowsFeature } from \"~/presentation/page/PageList/feature.js\";\nimport { PageGetWorkflowsFeature } from \"~/presentation/page/PageGet/feature.js\";\n\nexport const WebsiteBuilderWorkflows = () => {\n return (\n <Wcp.CanUseWorkflows>\n <RegisterFeature feature={PageListWorkflowsFeature} />\n <RegisterFeature feature={PageGetWorkflowsFeature} />\n <WebsiteBuilderWorkflowsMenu />\n <PageEditorConfig />\n <PagesList />\n <ListOpenInNewWindow />\n </Wcp.CanUseWorkflows>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,EAAEC,GAAG,QAAQ,mBAAmB;AACxD,SAASC,2BAA2B;AACpC,SAASC,mBAAmB,EAAEC,gBAAgB,EAAEC,SAAS;AACzD,SAASC,wBAAwB;AACjC,SAASC,uBAAuB;AAEhC,OAAO,MAAMC,uBAAuB,GAAGA,CAAA,KAAM;EACzC,oBACIT,KAAA,CAAAU,aAAA,CAACR,GAAG,CAACS,eAAe,qBAChBX,KAAA,CAAAU,aAAA,CAACT,eAAe;IAACW,OAAO,EAAEL;EAAyB,CAAE,CAAC,eACtDP,KAAA,CAAAU,aAAA,CAACT,eAAe;IAACW,OAAO,EAAEJ;EAAwB,CAAE,CAAC,eACrDR,KAAA,CAAAU,aAAA,CAACP,2BAA2B,MAAE,CAAC,eAC/BH,KAAA,CAAAU,aAAA,CAACL,gBAAgB,MAAE,CAAC,eACpBL,KAAA,CAAAU,aAAA,CAACJ,SAAS,MAAE,CAAC,eACbN,KAAA,CAAAU,aAAA,CAACN,mBAAmB,MAAE,CACL,CAAC;AAE9B,CAAC","ignoreList":[]}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@webiny/app-website-builder-workflows",
3
+ "version": "0.0.0-unstable.3c5210ad37",
4
+ "type": "module",
5
+ "main": "index.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/webiny/webiny-js.git"
9
+ },
10
+ "author": "Webiny Ltd",
11
+ "license": "MIT",
12
+ "dependencies": {
13
+ "@apollo/react-hooks": "3.1.5",
14
+ "@webiny/admin-ui": "0.0.0-unstable.3c5210ad37",
15
+ "@webiny/app": "0.0.0-unstable.3c5210ad37",
16
+ "@webiny/app-admin": "0.0.0-unstable.3c5210ad37",
17
+ "@webiny/app-website-builder": "0.0.0-unstable.3c5210ad37",
18
+ "@webiny/app-workflows": "0.0.0-unstable.3c5210ad37",
19
+ "@webiny/feature": "0.0.0-unstable.3c5210ad37",
20
+ "@webiny/icons": "0.0.0-unstable.3c5210ad37",
21
+ "mobx": "6.15.0",
22
+ "mobx-react-lite": "3.4.3",
23
+ "react": "18.2.0",
24
+ "react-dom": "18.2.0",
25
+ "react-helmet": "6.1.0"
26
+ },
27
+ "devDependencies": {
28
+ "@types/react": "18.2.79",
29
+ "@webiny/build-tools": "0.0.0-unstable.3c5210ad37",
30
+ "rimraf": "6.1.3",
31
+ "typescript": "5.9.3"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public",
35
+ "directory": "dist"
36
+ },
37
+ "svgo": {
38
+ "plugins": {
39
+ "removeViewBox": false
40
+ }
41
+ },
42
+ "gitHead": "3c5210ad37c29bfabfeb8a91d3220115352b2ea9"
43
+ }
@@ -0,0 +1,8 @@
1
+ import { GetPageGraphQLFieldSelection } from "@webiny/app-website-builder/features/pages/getPage/abstractions.js";
2
+ declare class WorkflowStatesGetPageGraphQLFieldSelection implements GetPageGraphQLFieldSelection.Interface {
3
+ getSelection(): string[];
4
+ }
5
+ export declare const WorkflowStateGetPageFieldSelection: typeof WorkflowStatesGetPageGraphQLFieldSelection & {
6
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/app-website-builder/features/pages/getPage/abstractions.js").IGetPageGraphQLFieldSelection>;
7
+ };
8
+ export {};
@@ -0,0 +1,19 @@
1
+ import { GetPageGraphQLFieldSelection } from "@webiny/app-website-builder/features/pages/getPage/abstractions.js";
2
+ class WorkflowStatesGetPageGraphQLFieldSelection {
3
+ getSelection() {
4
+ return [`system {
5
+ workflow {
6
+ workflowId
7
+ stepId
8
+ stepName
9
+ state
10
+ }
11
+ }`];
12
+ }
13
+ }
14
+ export const WorkflowStateGetPageFieldSelection = GetPageGraphQLFieldSelection.createImplementation({
15
+ dependencies: [],
16
+ implementation: WorkflowStatesGetPageGraphQLFieldSelection
17
+ });
18
+
19
+ //# sourceMappingURL=WorkflowStatesGetPageGraphQLFieldSelection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GetPageGraphQLFieldSelection","WorkflowStatesGetPageGraphQLFieldSelection","getSelection","WorkflowStateGetPageFieldSelection","createImplementation","dependencies","implementation"],"sources":["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"],"mappings":"AAAA,SAASA,4BAA4B,QAAQ,oEAAoE;AAEjH,MAAMC,0CAA0C,CAAmD;EAC/FC,YAAYA,CAAA,EAAa;IACrB,OAAO,CACH;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,CACL;EACL;AACJ;AAEA,OAAO,MAAMC,kCAAkC,GAAGH,4BAA4B,CAACI,oBAAoB,CAC/F;EACIC,YAAY,EAAE,EAAE;EAChBC,cAAc,EAAEL;AACpB,CACJ,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export declare const PageGetWorkflowsFeature: import("@webiny/feature/admin").FeatureDefinition<any, []>;
@@ -0,0 +1,10 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { WorkflowStateGetPageFieldSelection } from "./WorkflowStatesGetPageGraphQLFieldSelection.js";
3
+ export const PageGetWorkflowsFeature = createFeature({
4
+ name: "PageGetWorkflows",
5
+ register(container) {
6
+ container.register(WorkflowStateGetPageFieldSelection);
7
+ }
8
+ });
9
+
10
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createFeature","WorkflowStateGetPageFieldSelection","PageGetWorkflowsFeature","name","register","container"],"sources":["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"],"mappings":"AAAA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,kCAAkC;AAE3C,OAAO,MAAMC,uBAAuB,GAAGF,aAAa,CAAC;EACjDG,IAAI,EAAE,kBAAkB;EACxBC,QAAQA,CAACC,SAAS,EAAE;IAChBA,SAAS,CAACD,QAAQ,CAACH,kCAAkC,CAAC;EAC1D;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ import { IDocumentListPresenterInit, IDocumentListVm, PageListPresenter } from "@webiny/app-website-builder/presentation/pages/PageList/index.js";
2
+ declare class PageListPresenterWithWorkflows implements PageListPresenter.Interface {
3
+ private readonly decoratee;
4
+ constructor(decoratee: PageListPresenter.Interface);
5
+ get vm(): IDocumentListVm;
6
+ init(params: IDocumentListPresenterInit): void;
7
+ showFilters(show: boolean): void;
8
+ private decoratePage;
9
+ }
10
+ export declare const PageListPresenterDecorator: typeof PageListPresenterWithWorkflows & {
11
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/app-website-builder/presentation/pages/PageList/abstractions").IDocumentListPresenter>;
12
+ };
13
+ export {};
@@ -0,0 +1,39 @@
1
+ import { makeAutoObservable } from "mobx";
2
+ import { PageListPresenter } from "@webiny/app-website-builder/presentation/pages/PageList/index.js";
3
+ class PageListPresenterWithWorkflows {
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 => {
13
+ return this.decoratePage(page);
14
+ })
15
+ };
16
+ }
17
+ init(params) {
18
+ this.decoratee.init(params);
19
+ }
20
+ showFilters(show) {
21
+ this.decoratee.showFilters(show);
22
+ }
23
+ decoratePage(page) {
24
+ return {
25
+ ...page,
26
+ system: {
27
+ ...page.system,
28
+ workflow: page.system?.workflow || null
29
+ },
30
+ $selectable: !page.system?.workflow?.state
31
+ };
32
+ }
33
+ }
34
+ export const PageListPresenterDecorator = PageListPresenter.createDecorator({
35
+ decorator: PageListPresenterWithWorkflows,
36
+ dependencies: []
37
+ });
38
+
39
+ //# sourceMappingURL=PageListPresenterDecorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["makeAutoObservable","PageListPresenter","PageListPresenterWithWorkflows","constructor","decoratee","vm","data","map","page","decoratePage","init","params","showFilters","show","system","workflow","$selectable","state","PageListPresenterDecorator","createDecorator","decorator","dependencies"],"sources":["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"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,MAAM;AACzC,SAGIC,iBAAiB,QACd,kEAAkE;AAGzE,MAAMC,8BAA8B,CAAwC;EAGjEC,WAAWA,CAACC,SAAsC,EAAE;IACvD,IAAI,CAACA,SAAS,GAAGA,SAAS;IAC1BJ,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEA,IAAWK,EAAEA,CAAA,EAAoB;IAC7B,MAAMA,EAAE,GAAG,IAAI,CAACD,SAAS,CAACC,EAAE;IAC5B,OAAO;MACH,GAAGA,EAAE;MACLC,IAAI,EAAED,EAAE,CAACC,IAAI,CAACC,GAAG,CAACC,IAAI,IAAI;QACtB,OAAO,IAAI,CAACC,YAAY,CAACD,IAAI,CAAC;MAClC,CAAC;IACL,CAAC;EACL;EAEOE,IAAIA,CAACC,MAAkC,EAAQ;IAClD,IAAI,CAACP,SAAS,CAACM,IAAI,CAACC,MAAM,CAAC;EAC/B;EAEOC,WAAWA,CAACC,IAAa,EAAQ;IACpC,IAAI,CAACT,SAAS,CAACQ,WAAW,CAACC,IAAI,CAAC;EACpC;EAEQJ,YAAYA,CAACD,IAAa,EAAW;IACzC,OAAO;MACH,GAAGA,IAAI;MACPM,MAAM,EAAE;QACJ,GAAGN,IAAI,CAACM,MAAM;QACdC,QAAQ,EAAEP,IAAI,CAACM,MAAM,EAAEC,QAAQ,IAAI;MACvC,CAAC;MACDC,WAAW,EAAE,CAACR,IAAI,CAACM,MAAM,EAAEC,QAAQ,EAAEE;IACzC,CAAC;EACL;AACJ;AAEA,OAAO,MAAMC,0BAA0B,GAAGjB,iBAAiB,CAACkB,eAAe,CAAC;EACxEC,SAAS,EAAElB,8BAA8B;EACzCmB,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import { ListPagesGraphQLFieldSelection } from "@webiny/app-website-builder/features/pages/loadPages/abstractions.js";
2
+ declare class WorkflowStatesListPagesGraphQLFieldSelection implements ListPagesGraphQLFieldSelection.Interface {
3
+ getSelection(): string[];
4
+ }
5
+ export declare const WorkflowStateListPagesFieldSelection: typeof WorkflowStatesListPagesGraphQLFieldSelection & {
6
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/app-website-builder/features/pages/loadPages/abstractions.js").IListPagesGraphQLFieldSelection>;
7
+ };
8
+ export {};
@@ -0,0 +1,19 @@
1
+ import { ListPagesGraphQLFieldSelection } from "@webiny/app-website-builder/features/pages/loadPages/abstractions.js";
2
+ class WorkflowStatesListPagesGraphQLFieldSelection {
3
+ getSelection() {
4
+ return [`system {
5
+ workflow {
6
+ workflowId
7
+ stepId
8
+ stepName
9
+ state
10
+ }
11
+ }`];
12
+ }
13
+ }
14
+ export const WorkflowStateListPagesFieldSelection = ListPagesGraphQLFieldSelection.createImplementation({
15
+ dependencies: [],
16
+ implementation: WorkflowStatesListPagesGraphQLFieldSelection
17
+ });
18
+
19
+ //# sourceMappingURL=WorkflowStateListPagesFieldSelection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ListPagesGraphQLFieldSelection","WorkflowStatesListPagesGraphQLFieldSelection","getSelection","WorkflowStateListPagesFieldSelection","createImplementation","dependencies","implementation"],"sources":["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"],"mappings":"AAAA,SAASA,8BAA8B,QAAQ,sEAAsE;AAErH,MAAMC,4CAA4C,CAElD;EACIC,YAAYA,CAAA,EAAa;IACrB,OAAO,CACH;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,CACL;EACL;AACJ;AAEA,OAAO,MAAMC,oCAAoC,GAC7CH,8BAA8B,CAACI,oBAAoB,CAAC;EAChDC,YAAY,EAAE,EAAE;EAChBC,cAAc,EAAEL;AACpB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export declare const PageListWorkflowsFeature: import("@webiny/feature/admin").FeatureDefinition<any, []>;
@@ -0,0 +1,12 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { PageListPresenterDecorator } from "./PageListPresenterDecorator.js";
3
+ import { WorkflowStateListPagesFieldSelection } from "./WorkflowStateListPagesFieldSelection.js";
4
+ export const PageListWorkflowsFeature = createFeature({
5
+ name: "PageListWorkflows",
6
+ register(container) {
7
+ container.registerDecorator(PageListPresenterDecorator);
8
+ container.register(WorkflowStateListPagesFieldSelection);
9
+ }
10
+ });
11
+
12
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createFeature","PageListPresenterDecorator","WorkflowStateListPagesFieldSelection","PageListWorkflowsFeature","name","register","container","registerDecorator"],"sources":["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"],"mappings":"AAAA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,0BAA0B;AACnC,SAASC,oCAAoC;AAE7C,OAAO,MAAMC,wBAAwB,GAAGH,aAAa,CAAC;EAClDI,IAAI,EAAE,mBAAmB;EACzBC,QAAQA,CAACC,SAAS,EAAE;IAChBA,SAAS,CAACC,iBAAiB,CAACN,0BAA0B,CAAC;IACvDK,SAAS,CAACD,QAAQ,CAACH,oCAAoC,CAAC;EAC5D;AACJ,CAAC,CAAC","ignoreList":[]}
package/routes.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import { Route } from "@webiny/app-admin";
2
+ export declare const Routes: {
3
+ Pages: {
4
+ Workflows: Route<{
5
+ app: import("zod").ZodOptional<import("zod").ZodString>;
6
+ }>;
7
+ WorkflowStateList: Route<undefined>;
8
+ };
9
+ };
package/routes.js ADDED
@@ -0,0 +1,20 @@
1
+ import { Route } from "@webiny/app-admin";
2
+ export const Routes = {
3
+ Pages: {
4
+ Workflows: new Route({
5
+ name: "WebsiteBuilder/PageWorkflow",
6
+ path: "/website-builder/workflows",
7
+ params: zod => {
8
+ return {
9
+ app: zod.string().optional()
10
+ };
11
+ }
12
+ }),
13
+ WorkflowStateList: new Route({
14
+ name: "WebsiteBuilder/Pages/WorkflowStateList",
15
+ path: "/website-builder/pages/workflow-states"
16
+ })
17
+ }
18
+ };
19
+
20
+ //# sourceMappingURL=routes.js.map
package/routes.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Route","Routes","Pages","Workflows","name","path","params","zod","app","string","optional","WorkflowStateList"],"sources":["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/workflow-states\"\n })\n }\n};\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,mBAAmB;AAEzC,OAAO,MAAMC,MAAM,GAAG;EAClBC,KAAK,EAAE;IACHC,SAAS,EAAE,IAAIH,KAAK,CAAC;MACjBI,IAAI,EAAE,6BAA6B;MACnCC,IAAI,EAAE,4BAA4B;MAClCC,MAAM,EAAEC,GAAG,IAAI;QACX,OAAO;UACHC,GAAG,EAAED,GAAG,CAACE,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;QAC/B,CAAC;MACL;IACJ,CAAC,CAAC;IACFC,iBAAiB,EAAE,IAAIX,KAAK,CAAC;MACzBI,IAAI,EAAE,wCAAwC;MAC9CC,IAAI,EAAE;IACV,CAAC;EACL;AACJ,CAAC","ignoreList":[]}
package/types.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ import type { WorkflowStateValue } from "@webiny/app-workflows/types.js";
2
+ export interface IRecordWorkflowStateIdentity {
3
+ id: string;
4
+ displayName: string;
5
+ type: string;
6
+ }
7
+ export interface IRecordWorkflowState {
8
+ workflowId: string;
9
+ stepId: string;
10
+ state: WorkflowStateValue;
11
+ savedBy?: IRecordWorkflowStateIdentity | null;
12
+ }
13
+ export interface IRecordWorkflow {
14
+ state?: IRecordWorkflowState | null;
15
+ }
16
+ export type WithWorkflows<T> = T & {
17
+ workflows: IRecordWorkflow | null;
18
+ $selectable: boolean;
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 ADDED
@@ -0,0 +1,3 @@
1
+ export {};
2
+
3
+ //# sourceMappingURL=types.js.map
package/types.js.map ADDED
@@ -0,0 +1 @@
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\ndeclare module \"@webiny/app-website-builder/types.js\" {\n export interface WbSystem {\n workflow: IRecordWorkflow | null;\n }\n}\n\ndeclare module \"@webiny/app-website-builder/domain/Page/PageDto.js\" {\n export interface PageDto {\n $selectable: boolean;\n }\n}\n"],"mappings":"","ignoreList":[]}