@webiny/app-website-builder-workflows 6.0.0-rc.1 → 6.0.0-rc.3
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/package.json +10 -10
- package/presentation/page/PageGet/WorkflowStatesGetPageGraphQLFieldSelection.js +2 -2
- package/presentation/page/PageGet/WorkflowStatesGetPageGraphQLFieldSelection.js.map +1 -1
- package/presentation/page/PageList/PageListPresenterDecorator.js +4 -7
- package/presentation/page/PageList/PageListPresenterDecorator.js.map +1 -1
- package/presentation/page/PageList/WorkflowStateListPagesFieldSelection.js +2 -2
- package/presentation/page/PageList/WorkflowStateListPagesFieldSelection.js.map +1 -1
- package/types.d.ts +10 -0
- package/types.js.map +1 -1
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.3",
|
|
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.3",
|
|
15
|
+
"@webiny/app": "6.0.0-rc.3",
|
|
16
|
+
"@webiny/app-admin": "6.0.0-rc.3",
|
|
17
|
+
"@webiny/app-website-builder": "6.0.0-rc.3",
|
|
18
|
+
"@webiny/app-workflows": "6.0.0-rc.3",
|
|
19
|
+
"@webiny/feature": "6.0.0-rc.3",
|
|
20
|
+
"@webiny/icons": "6.0.0-rc.3",
|
|
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.3",
|
|
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": "228fe25e1a17f248d566bce1c33d11c291955513"
|
|
43
43
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GetPageGraphQLFieldSelection } from "@webiny/app-website-builder/features/pages/getPage/abstractions.js";
|
|
2
2
|
class WorkflowStatesGetPageGraphQLFieldSelection {
|
|
3
3
|
getSelection() {
|
|
4
|
-
return [`
|
|
5
|
-
|
|
4
|
+
return [`system {
|
|
5
|
+
workflow {
|
|
6
6
|
workflowId
|
|
7
7
|
stepId
|
|
8
8
|
stepName
|
|
@@ -1 +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 `
|
|
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":[]}
|
|
@@ -23,14 +23,11 @@ class PageListPresenterWithWorkflows {
|
|
|
23
23
|
decoratePage(page) {
|
|
24
24
|
return {
|
|
25
25
|
...page,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// @ts-expect-error
|
|
30
|
-
state: page.workflows?.state || null
|
|
26
|
+
system: {
|
|
27
|
+
...page.system,
|
|
28
|
+
workflow: page.system?.workflow || null
|
|
31
29
|
},
|
|
32
|
-
|
|
33
|
-
$selectable: !page.workflows?.state
|
|
30
|
+
$selectable: !page.system?.workflow?.state
|
|
34
31
|
};
|
|
35
32
|
}
|
|
36
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["makeAutoObservable","PageListPresenter","PageListPresenterWithWorkflows","constructor","decoratee","vm","data","map","page","decoratePage","init","params","showFilters","show","
|
|
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":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ListPagesGraphQLFieldSelection } from "@webiny/app-website-builder/features/pages/loadPages/abstractions.js";
|
|
2
2
|
class WorkflowStatesListPagesGraphQLFieldSelection {
|
|
3
3
|
getSelection() {
|
|
4
|
-
return [`
|
|
5
|
-
|
|
4
|
+
return [`system {
|
|
5
|
+
workflow {
|
|
6
6
|
workflowId
|
|
7
7
|
stepId
|
|
8
8
|
stepName
|
|
@@ -1 +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 `
|
|
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":[]}
|
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.map
CHANGED
|
@@ -1 +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"],"mappings":"","ignoreList":[]}
|
|
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":[]}
|